شعار Explain Diff

Explain Diff

المجتمع
kevinslin
explain-diff

Create a self-contained interactive HTML explanation of a code diff, branch, commit, or pull request.

نظرة عامة

الناشرkevinslin
المستودعagstack
اسم المهارةexplain-diff
النجوم
26
التفريعات
1
الملفات المرفقة
تعليمات فقط
الروابط
  • تعليمات بصيغة Markdown

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

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

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

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/kevinslin/agstack/tree/main/active/explain-diff
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

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

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Explain Diff

Turn a code change into a guided explanation that helps a reader build a mental model, understand the implementation, and test their comprehension.

Default to a single local HTML artifact. Do not modify the reviewed repository.

Resolve the change

  1. Identify the repository and exact change boundary.
    • For a pull request, record the repository, PR number, base SHA, and head SHA.
    • For a branch or commit range, resolve both endpoints and their merge base.
    • With no explicit target, inspect git status --short, git diff HEAD, and relevant untracked files as the current working-tree change.
  2. Read the complete changed-file list and diff summary before selecting details.
  3. Explore enough surrounding code and documentation to explain the system that existed before the change. Follow call sites, data shapes, workflow edges, configuration, and tests that define the behavior.
  4. Separate facts observed in code from inferred intent. Label uncertainty.

Build the explanation

Create these sections in order:

  1. Overview: Name the change boundary, summarize the result in two or three sentences, and provide a table of contents.
  2. Background:
    • Start with a skippable beginner-oriented model of the relevant system.
    • Narrow to the exact components, contracts, and failure modes the change touches.
  3. Intuition: Explain the central idea before implementation details. Use a small concrete example with toy values and one or two reusable visual models.
  4. Code walkthrough: Group changes by behavior or execution order rather than filename order. For each group, explain what changed, why it matters, and how tests or evidence support it. Link relationships between files.
  5. Operational impact: Call out compatibility, rollout, failure, security, and observability implications when relevant. Omit this section when the change has none.
  6. Quiz: Include exactly five medium-difficulty multiple-choice questions. Each question must have one correct answer, plausible distractors, and feedback explaining every choice. Reveal feedback only after interaction.

Write with lucid, precise prose. Prefer concrete examples and smooth transitions over exhaustiveness. Explain terminology when first introduced.

Render the artifact

Write one self-contained HTML file with inline CSS and JavaScript.

  • Default path: /tmp/YYYY-MM-DD-explanation-<short-slug>.html.
  • Use the user-provided output directory when specified.
  • Keep the artifact outside the reviewed repository unless the user explicitly requests a repo-owned file.
  • Build one responsive scrolling page with clear section headers and anchored table-of-contents links. Do not use tabs for top-level navigation.
  • Use a small, consistent family of HTML/CSS diagrams. Good choices include a component/data-flow diagram, a simplified UI, or a before/after state model. Include example data in diagrams. Do not use ASCII diagrams.
  • Render code in <pre><code> blocks and escape HTML metacharacters.
  • Make quiz controls keyboard-accessible and provide visible correct/incorrect feedback plus the explanation after a choice.
  • Avoid external scripts, stylesheets, fonts, images, and network requests.

Validate before handoff

  1. Confirm the file starts with the current date and exists outside the reviewed repository unless explicitly requested otherwise.
  2. Confirm every code block preserves whitespace through white-space: pre or white-space: pre-wrap.
  3. Confirm the HTML has no external asset or network dependency.
  4. Confirm all five quiz questions respond to clicks and keyboard activation, reveal feedback, and identify the correct answer.
  5. Confirm every material claim maps to inspected code, tests, documentation, or clearly labeled inference.
  6. Open or render the artifact when browser tooling is available and fix visual overflow, unreadable diagrams, broken anchors, and script errors.

Return a clickable absolute path to the HTML artifact and a one-sentence summary of the reviewed change.

Adapted from Geoffrey Litt's explain-diff gist.

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

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

Create a self-contained interactive HTML explanation of a code diff, branch, commit, or pull request.

لماذا تستخدم Explain Diff على TypingMind؟

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

كيف أثبّت Explain Diff في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/kevinslin/agstack/tree/main/active/explain-diff. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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