شعار Debugging

Debugging

المجتمع
neuromechanist
debugging

Use this skill when the user asks to "debug", "find the root cause", "figure out why X fails", "investigate this bug", "this test is flaky", "the build broke", "production incident", "why is the output wrong", or when any observed behavior contradicts expected behavior. Covers the reproduce-isolate-prove-fix-verify loop, anti-shortcut gates, and numerical/scientific debugging.

Add to TypingMind

نظرة عامة

الناشرneuromechanist
المستودعresearch-skills
اسم المهارةdebugging
النجوم
51
التفريعات
9
الملفات المرفقة
1
الترخيصBSD-3-Clause
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

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

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

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

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

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Debugging

A disciplined root-cause loop. The goal is a stated causal mechanism with proof, then a fix verified by the exact check that first exposed the problem. Never fix by guessing, and never make a symptom disappear without knowing why.

The loop

  1. Reproduce. Run the failing thing yourself and capture the exact error, command, and environment. If you cannot reproduce, stop and gather the reporter's exact conditions; do not fix blind. Side observations found on the way get noted and set aside, not chased.
  2. Trace the intended path. Before reading logs, read the code/docs to state what SHOULD happen, step by step. You cannot recognize the broken step without knowing the intended sequence.
  3. Check live state. What is actually on disk, in the database, running as a process, deployed? A grep that finds no trace of a migration is not proof it never ran; completed one-off scripts are routinely deleted. Absence in code is not absence in reality.
  4. Find the smoking gun. Logs, CI runs, git history. Cheapest checks first: installed version vs latest, the artifact's own declared type or config, the library's supported list. Only conclude "unsupported" or "impossible" after checking the declared capability directly.
  5. Prove the mechanism. Confirm with a live probe, not log trust (example: the blob that returned 403 in the failing run returns 200 now, so it was a permission-timing issue, not missing data). A differential test beats an assumption: when two configurations should differ, run both and compare.
  6. Only now read source for the WHY, and state the cause in one sentence with the evidence that proves it, plus what changes AND what deliberately does not change because it was not the cause.
  7. Fix, minimally. Fix the upstream cause, not the symptom (a service that dies when the machine sleeps needs the sleep addressed, not a restart loop).
  8. Verify with the original failing check, unchanged. Then run the wider gates (tests, lint, typecheck). Add a regression test that would have caught this bug. If recovery of live state was part of the fix, its success doubles as diagnosis confirmation.

Isolation techniques (when the cause is entangled)

  • Single-variable toggles: flip one factor at a time (feature flag, config bit, environment) and record the result per state. Never attempt a compound fix while two candidate causes are still entangled.
  • Necessary-but-not-sufficient check: after any partial fix, re-run the original failing check. The first improving number is not proof of a complete fix; say "necessary but not sufficient" and keep going.
  • Ranked compounding causes: many incidents have several contributing causes (stale binary + lost race + shared timeout). Enumerate and rank them; do not stop at the first plausible one.
  • Confound check: before concluding "the fix did not work" or "the test is wrong", look for an independent confound (a second process racing the test, a hook rewriting the file). Re-run clean.
  • Instrumentation-first for weird results: a flat or extreme result that fails to discriminate across conditions that should matter is an instrumentation bug until a targeted, isolated reproduction says otherwise. Do not report it as a finding, and do not let it block unrelated work while you wait to reproduce it.
  • Doc-vs-code conflicts: when documentation (or an Architecture Decision Record) and code disagree, determine the actual source of truth empirically (test the code), then fix whichever artifact is wrong, making the fix more precise about where the invariant is enforced. Never silently pick a side.

Anti-shortcut gates (hard rules)

  • Never delete, skip, or loosen a failing test to make a suite pass. If a test is genuinely wrong, prove it (git history: did the tested thing move or disappear?) and say so explicitly.
  • Never add a broad catch, silent fallback, or retry loop to make a symptom disappear. That converts a loud bug into a silent one.
  • Never weaken a designated safety mechanism (rate limit, halt, permission gate) because it fired. When a guardrail fires during a bad outcome, the default hypothesis is that the new code is incompatible with a correct guardrail. Changing the guardrail requires separate, explicit user sign-off.
  • Never read or print secrets (.env contents, tokens) while debugging credential or environment issues; test credentials differentially instead (call the API with each and compare behavior).
  • Retry a flaky operation at most once under changed conditions. If it fails again under conditions you believe clean, stop retrying and surface a structural hypothesis instead.

Verification is layered

An automated check passing covers only what that check was built to detect. Before declaring a generated or visual artifact done, do one perceptual/manual pass for defect classes the validator cannot see (label collisions, off-canvas content, semantic errors). If the ideal verification is structurally unavailable, run the nearest safe non-mutating substitute and state exactly what it does and does not cover; never report "verified" against a silently downgraded check.

Numerical and scientific code

For parity work against a reference implementation, tolerance judgment, and trajectory comparison, read references/numerical-debugging.md before starting. Summary of its hard rules: compare from identical initialization, know the float noise floor before calling a residual a bug, reserve "bit-exact" for residuals at machine precision, and test whether the metric itself is well-posed before chasing an unmet target.

When to stop

  • Root cause stated in one sentence, with cited evidence.
  • Fix verified by the original failing check plus the standard gates.
  • Regression test added (or an explicit reason why not).
  • If the investigation dead-ends: document it (goal, issue, root cause if known, lesson, alternative) in the project's scratch/history notes and the issue tracker; a documented dead end is a valid outcome, a silent one is not.
  • If you are deep in a long session and the remaining fix is risky, prefer a validated, independently re-runnable handoff artifact (script plus ordered notes, verified to run) over a rushed multi-file edit.

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

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

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

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

Use this skill when the user asks to "debug", "find the root cause", "figure out why X fails", "investigate this bug", "this test is flaky", "the build broke", "production incident", "why is the output wrong", or when any observed behavior contradicts expected behavior. Covers the reproduce-isolate-prove-fix-verify loop, anti-shortcut gates, and numerical/scientific debugging.

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

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

كيف أثبّت Debugging في TypingMind؟

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

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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