شعار Code Alchemist

Code Alchemist

المجتمع
Fldicoahkiin
code-alchemist

Distill developer coding style from git history into Author Profile, AGENTS snippet, Copilot instructions, or reusable Skill. Use when analyzing code patterns, preserving engineering habits, or creating shareable style guides.

نظرة عامة

الناشرFldicoahkiin
المستودعcode-alchemist
اسم المهارةcode-alchemist
النجوم
34
التفريعات
1
الملفات المرفقة
10
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 10

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها Fldicoahkiin على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Code Alchemist في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Fldicoahkiin/code-alchemist/tree/main/.agents/skills/code-alchemist
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Fldicoahkiin/code-alchemist.git /tmp/code-alchemist
mkdir -p .claude/skills
cp -r /tmp/code-alchemist/.agents/skills/code-alchemist .claude/skills/code-alchemist
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Code Alchemist في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Code Alchemist تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Code Alchemist بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Code Alchemist

Turn one developer's repeatable engineering habits into an installable Claude Code Skill.

When to Use

Use this skill when you want to:

  • ** distill coding style**: "把张三炼成 skill", "analyze senior-dev's coding style", "preserve someone's habits"
  • Generate style guides: Create Author Profile, AGENTS.md snippet, Copilot instructions, or reusable Skill
  • Analyze code patterns: Understand how a developer structures code, names variables, handles errors
  • Preserve engineering habits: Capture repeatable patterns from an experienced developer
  • Create shareable artifacts: Turn personal coding conventions into team standards

Do not use this skill when:

  • You just need general code review (no specific author's style to emulate)
  • The repository has too few commits from the target author (< 10 commits)
  • You need real-time analysis of code not yet committed

One-Command Workflow

The user can say:

"把张三炼成 skill" "分析 senior-dev 的代码风格并生成 skill" "把李四的习惯保存成 skill"

You (Claude) will:

Step 1: Run Analysis

Execute the extraction script automatically:

bash
bash .agents/skills/code-alchemist/scripts/distill_author.sh \
  --repo <repo-path> \
  --author "<author-name-or-email>" \
  --since "6 months ago" \
  --out /tmp/<author>-analysis

If the user didn't specify a repo, ask for it. If they didn't specify an author, ask for it.

Step 2: Read Analysis Results

Read these files to understand the author's patterns:

  • /tmp/<author>-analysis/summary.md - overview
  • /tmp/<author>-analysis/summary.json - structured data
  • /tmp/<author>-analysis/live_files.txt - files that still exist
  • /tmp/<author>-analysis/example_commits.json - sample commits

Step 3: Deep Dive Code Samples

From live_files.txt, read 3-5 representative files based on:

  • Top 2-3 most modified files (highest change frequency)
  • 1 file from the most active directory
  • 1 test file if present in the stats

Look for: naming patterns, import order, state management, error handling, file organization.

Step 4: Generate Output

Based on the user's goal, produce one of the following deliverables (see references/output-contract.md for details):

Option A: Author Profile (style-profile.md)

Use when: User wants a readable style analysis without creating a reusable skill.

Structure:

  • Scope (repo, author, time range)
  • High-Confidence Rules (evidence-backed patterns)
  • Tentative Observations (lower confidence, marked as such)
  • Anti-Patterns (what to avoid)
  • Evidence Index (traceability to commits/files)
Option B: AGENTS Snippet

Use when: User wants rules added to repository collaboration guidance.

Structure:

  • Code Alchemist Author Style Rules
  • Naming, Structure, Error handling, Testing conventions
  • Anti-patterns
Option C: Copilot Instructions Snippet

Use when: User wants rules added to .github/copilot-instructions.md.

Structure:

  • Apply the style in these areas
  • Scope, Naming, Module boundaries, Error handling, Testing
  • Do not over-apply guidelines
Option D: Reusable Skill (SKILL.md + evals.json) ⭐ Default

Use when: User wants a reusable, installable skill. This is the default when no specific format is requested.

4.1 Determine Installation Preferences

Default behavior (use without asking):

  • Location: Current project .agents/skills/
  • Name: <author>-style

Only ask the user if they explicitly mention wanting a different location (global) or a custom name. Otherwise, proceed directly with the defaults.

4.2 Create Directory Structure (Staging)

First generate the skill to a staging directory, then install to the target location:

/tmp/<author>-skill/          # Staging directory (temporary)
├── SKILL.md
└── evals/
    └── evals.json

The staging directory allows review before final installation.

4.3 Generate SKILL.md Use this template (adapt content based on analysis):

---
name: <skill-name>
description: 'Code like <author> - [brief description of their style]. Use when writing [language/framework] code that should match their conventions in [project type].'
---

# <author> Coding Style

## Naming Conventions

### [Components/Functions/Types]
- [Pattern 1 with example]
- [Pattern 2 with example]

## Code Organization

### Imports
1. [Import order rule]
2. [Import order rule]

### File Structure
- [Rule 1]
- [Rule 2]

## Patterns

### [Category]
```[language]
// Example code showing the pattern
```

## Anti-Patterns

- Do not [anti-pattern 1]
- Do not [anti-pattern 2]

## Applicability

Apply to:
- `path/pattern/**/*`

Do not over-apply to:
- `excluded/pattern/**/*`

---
*Distilled from [N] commits ([+additions]/-[deletions]) in [repo]*
4.4 Generate evals.json

Create at least 3 test cases:

json
{
  "skill_name": "<skill-name>",
  "evals": [
    {
      "id": 1,
      "prompt": "Write a [component type] that [does something] following <author>'s style",
      "expected_output": "Component uses [pattern 1], [pattern 2]",
      "assertions": ["Uses naming convention X", "Follows import order Y"]
    }
  ]
}
4.5 (Optional) Generate README.md

If the user explicitly requests it, create a brief usage guide for the generated skill. Otherwise, skip this step.

Step 5: Install the Skill

Install using the default method (copy) at the default location. Only use symlink if the user explicitly requests it.

Default (复制):

bash
mkdir -p .agents/skills/<skill-name>
cp -r /tmp/<author>-skill/* .agents/skills/<skill-name>/

Alternative (软链接) - only if user requests:

bash
mkdir -p $(dirname .agents/skills/<skill-name>)
ln -s /tmp/<author>-skill .agents/skills/<skill-name>

Confirm success with details in user's language:

Chinese:

"已成功将 炼成 skill" "安装位置: [full-path]" "安装方式: [复制/软链接]" "使用: 直接说'使用 风格写代码'"

English:

"Successfully distilled into a skill" "Installed at: [full-path]" "Method: [copy/symlink]" "Usage: Say 'write code in style'"

Manual Workflow (Advanced)

If the user wants more control:

bash
# 1. Run analysis manually
bash .agents/skills/code-alchemist/scripts/distill_author.sh \
  --repo /path/to/repo \
  --author "name" \
  --out ./analysis

# 2. Then ask Claude
"基于 ./analysis 生成 skill"

Analysis Script Options

bash
bash .agents/skills/code-alchemist/scripts/distill_author.sh \
  --repo /path/to/repo \          # Required: target repository
  --author "name|email" \          # Required: author identifier
  --since "6 months ago" \         # Optional: start date
  --until "1 month ago" \          # Optional: end date
  --include "src/**" \             # Optional: include paths (repeatable)
  --exclude "src/generated/**" \   # Optional: exclude paths (repeatable)
  --max-commits 100 \              # Optional: limit commits (default: 100)
  --max-examples 10 \              # Optional: example commits (default: 10)
  --out /path/to/output            # Required: output directory

What Makes a Good Skill

High-Confidence Rules (keep these)

  • Naming patterns seen across multiple files
  • Consistent import organization
  • Repeated architectural patterns
  • Stable file structure preferences

Tentative Observations (mark as low confidence)

  • Patterns from < 3 files
  • One-off naming exceptions
  • Experimental code patterns
  • Formatting-only changes

Anti-Patterns (explicitly forbid)

  • Patterns the author consistently replaces in refactor commits
  • Styles seen in old commits but not recent ones
  • Copy-pasted patterns from external sources

Troubleshooting

IssueSolution
No commits foundCheck author spelling or try email instead of name
Analysis too slowUse --include to narrow to specific directories
Generated skill doesn't matchRead more sample files from different time periods
Author uses inconsistent stylesNote this in "Do not over-apply" section

References

  • references/distillation-dimensions.md: 8 dimensions to analyze
  • references/output-contract.md: Output format specifications
  • Official skill spec: https://agentskills.io/specification

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Code Alchemist؟

Distill developer coding style from git history into Author Profile, AGENTS snippet, Copilot instructions, or reusable Skill. Use when analyzing code patterns, preserving engineering habits, or creating shareable style guides.

لماذا تستخدم Code Alchemist على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Code Alchemist عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Code Alchemist في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Fldicoahkiin/code-alchemist/tree/main/.agents/skills/code-alchemist. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Code Alchemist؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Code Alchemist؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Code Alchemist معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Code Alchemist مجانية؟

نعم. نشرها Fldicoahkiin على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇