شعار Debug Method

Debug Method

المجتمع
0xBakeer
debug-method

A method for fixing a bug when the cause is unknown - reproduce with the smallest input, read the state before the symptom, bisect by halves (input, code, commits), name one cause, change one thing, re-run the same reproduction.

نظرة عامة

الناشر0xBakeer
المستودعTandemLLM
اسم المهارةdebug-method
النجوم
75
التفريعات
14
الملفات المرفقة
تعليمات فقط
الترخيصAGPL-3.0
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/0xBakeer/TandemLLM/tree/main/packages/library/debug-method
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/0xBakeer/TandemLLM.git /tmp/TandemLLM
mkdir -p .claude/skills
cp -r /tmp/TandemLLM/packages/library/debug-method .claude/skills/debug-method
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Debugging method

Rules:

  1. Reproduce before anything: the exact command or input that fails, written as one line, with the observed and the expected output. No reproduction, no fix.
  2. Shrink: halve the input until the failure stays with the smallest case (one row, one key press, one value).
  3. Read the state just before the symptom: a print, a log line, a debugger break, the __state() dump. Do not guess from the code.
  4. Bisect when the cause is far from the symptom: by code (comment out or stub half), by data (half the rows), or by history (git bisect between a good and a bad commit).
  5. Name the one cause in one sentence. Then change one thing. Re-run the exact reproduction, then the full tests.

What goes wrong:

  • Fixing the symptom (a try/except, a default value) and the cause stays.
  • Changing three things at once; the bug disappears and nobody knows why, then returns.
  • Evidence from before the last edit used as proof; always re-run after the fix.

Check: the reproduction command fails before the fix and passes after, in the same session, both outputs in the result; the full suite still passes.

Done when:

  • The one-line reproduction with its failing output before the change.
  • The one-sentence cause and the single change (file:line).
  • The same reproduction passing after, plus the full test summary line.

Reference

Reproduction line: python -m mytool.cli samples/bad.csv # expected 3 rows, got "KeyError: 'amount'".

Shrink a file: head -n 2 big.csv > /tmp/small.csv (header plus one row); then one column.

State before the symptom:

python
import logging; log = logging.getLogger(__name__)
log.warning("before parse: row=%r keys=%s", row, list(row))    # one line, remove after
breakpoint()   # pdb: p row, pp locals(), n, c

Browser: evaluate_script window.__state() after a real input; debugger; with DevTools open; console.table(entities).

Bisect history:

bash
git bisect start; git bisect bad; git bisect good v1.2.0
git bisect run pytest -q tests/test_parse.py -x     # or a script that exits non-zero on failure
git bisect reset

Bisect code: stub half the pipeline (return input at a midpoint) and see on which side the symptom stays.

Common causes to check in one minute each: a stale build or cached .pyc/dist; a different environment (which python, node -v); an off-by-one at a boundary (empty, 0, last element); shared mutable state (a default [], a module-level dict); an unawaited promise or coroutine; a time zone or encoding; a race between two async tasks (add an ordering log line).

Write-up format: Repro: <cmd> -> <wrong>. Cause: <sentence>. Fix: <file:line> <one change>. Proof: <cmd> -> <right>; suite N passed.

More rules:

  • After two failed fixes on one bug: stop, re-read the function from the top, write the bug down again, and question the reproduction.

More pitfalls:

  • Trusting an error message's line number from a stale build or a cached module.
  • Reproducing in a different environment (prod data, another Python) than the one that fails.

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

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

A method for fixing a bug when the cause is unknown - reproduce with the smallest input, read the state before the symptom, bisect by halves (input, code, commits), name one cause, change one thing, re-run the same reproduction.

لماذا تستخدم Debug Method على TypingMind؟

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

كيف أثبّت Debug Method في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/0xBakeer/TandemLLM/tree/main/packages/library/debug-method. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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