شعار Diagnosing Bugs

Diagnosing Bugs

المجتمع
Dark-Alex-17
diagnosing-bugs

منهجية تصحيح أخطاء تعطي الأولوية لحلقات التغذية الراجعة، لمعالجة أخطاء الشيفرة الصعبة وتراجعات الأداء. أنشئ حلقة إعادة إنتاج محكمة وقادرة على إظهار الخطأ قبل وضع أي فرضية، ثم قلّصها واختبر من 3 إلى 5 فرضيات قابلة للدحض باستخدام أدوات رصد موسومة، وثبّت الإصلاح باختبار تراجعي عند نقطة فصل مناسبة. حمّل هذه المهارة عندما لا يكون الإصلاح واضحًا من رسالة الخطأ، أو يستمر الخطأ بعد المحاولة الأولى لإصلاحه، أو يكون السلوك متقطعًا، أو يبلغ المستخدم عن مشكلة أو عطل أو بطء. تكمل هذه المهارة التشخيصات، التي تتولى استكشاف مشكلات العمليات والأنظمة وإصلاحها، مثل الخدمات والشبكات والحاويات؛ أما هذه المهارة فتتولى أخطاء الشيفرة. تتيح هذه المهارة الوصول إلى shell لتشغيل حلقات إعادة الإنتاج.

نظرة عامة

الناشرDark-Alex-17
المستودعcoyote
اسم المهارةdiagnosing-bugs
النجوم
56
التفريعات
2
الملفات المرفقة
تعليمات فقط
الترخيصAGPL-3.0
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Dark-Alex-17/coyote.git /tmp/coyote
mkdir -p .claude/skills
cp -r /tmp/coyote/assets/skills/diagnosing-bugs .claude/skills/diagnosing-bugs
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

You are hunting a bug in code. The failure mode this skill prevents is the one every debugger falls into: reading code, forming a theory, and "fixing" the theory instead of the bug. The discipline: no hypothesis until a feedback loop exists. Skip phases only when you can say why.

Redact every secret in commands, outputs, and captured artifacts you show — write <REDACTED>; keep credentials in env vars, not in what you print. Quote only the lines of captured artifacts that carry signal.

Phase 1: Build the feedback loop (this IS the skill)

Everything else is mechanical. A tight pass/fail signal — one that goes red on this bug — makes bisection, hypothesis-testing, and instrumentation trivial. Without one, no amount of code-reading will save you. Spend disproportionate effort here.

Ways to construct one, in rough order of preference:

  1. Failing test at whatever seam reaches the bug: unit, integration, e2e.
  2. curl / HTTP script against a running dev server.
  3. CLI invocation with a fixture input, diffing output against a known-good snapshot.
  4. Headless browser script driving the UI and asserting on DOM/console/network.
  5. Replay a captured trace — save a real request/payload/event log, replay it through the code path in isolation.
  6. Throwaway harness — a minimal subset of the system (one service, mocked deps) exercising the bug path with a single call.
  7. Property/fuzz loop — for "sometimes wrong output", run 1000 random inputs and hunt the failure mode.
  8. Bisection harness — bug appeared between two known states? Automate "boot at X, check" so git bisect run can consume it.
  9. Differential loop — same input through old vs new version (or two configs), diff the outputs.

Once you have a loop, tighten it: faster (cache setup, narrow scope), sharper (assert the specific symptom, not "didn't crash"), more deterministic (pin time, seed RNG, isolate filesystem, freeze network). A 2-second deterministic loop is a debugging superpower; a 30-second flaky one is barely better than nothing.

Non-deterministic bugs: the goal is a higher reproduction rate, not a clean repro. Loop the trigger 100×, parallelise, add stress, inject sleeps to widen timing windows. A 50% flake is debuggable; 1% is not.

Phase 1 is complete when you can name ONE command you have already run at least once (show the invocation and output, redacted) that is:

  • Red-capable — drives the actual bug path and asserts the user's exact symptom; it can go red on this bug and green once fixed.
  • Deterministic — same verdict every run (or a pinned, high reproduction rate).
  • Fast — seconds, not minutes.
  • Agent-runnable — you can run it unattended.

If you catch yourself reading code to build a theory before this command exists — STOP. That is the exact failure this skill exists to prevent. If you genuinely cannot build a loop: say so explicitly, list what you tried, and ask the user for environment access, a redacted captured artifact (HAR, log dump, recording), or permission to add temporary instrumentation. Do NOT proceed to hypothesise without a loop.

Phase 2: Reproduce + minimise

Run the loop; watch it go red. Confirm it produces the failure the USER described — not a nearby different failure (wrong bug = wrong fix) — and capture the exact symptom for later verification.

Then minimise: shrink to the smallest scenario that still goes red. Cut inputs, callers, config, and steps one at a time, re-running after each cut. Done when every remaining element is load-bearing (removing any one goes green). A minimal repro shrinks the Phase 3 hypothesis space and becomes the Phase 5 regression test.

Phase 3: Hypothesise

Generate 3-5 ranked hypotheses before testing ANY of them — single-hypothesis generation anchors on the first plausible idea. Each must be falsifiable: "if X is the cause, then changing Y makes the bug disappear / changing Z makes it worse." Can't state the prediction? It's a vibe — discard or sharpen.

Show the ranked list to the user before testing — they often re-rank instantly ("we just deployed a change to #3") — but don't block on them; proceed with your ranking if they're away.

Phase 4: Instrument

Every probe maps to a specific Phase 3 prediction. One variable at a time.

  1. Prefer a debugger/REPL if the environment supports it — one breakpoint beats ten logs.
  2. Otherwise targeted logs at the boundaries that DISTINGUISH hypotheses. Never "log everything and grep".
  3. Tag every debug log with a unique prefix (e.g. [DEBUG-a4f2]) so cleanup is a single grep. Untagged logs survive into production; tagged logs die.

Performance regressions: logs are usually the wrong tool. Establish a baseline measurement first (timing harness, profiler, query plan), then bisect. Measure first, fix second.

Phase 5: Fix + regression test

Write the regression test BEFORE the fix — but only at a correct seam: one where the test exercises the real bug pattern as it occurs at the call site. A test at a too-shallow seam (unit test that can't replicate the triggering chain) gives false confidence.

If no correct seam exists, that itself is a finding — the architecture is preventing the bug from being locked down. Document it; don't fake the test.

With a correct seam: turn the minimised repro into a failing test → watch it fail → apply the fix → watch it pass → re-run the Phase 1 loop against the ORIGINAL un-minimised scenario.

Phase 6: Cleanup (required before declaring done)

  • Original repro no longer reproduces (re-run the Phase 1 loop, show the output)
  • Regression test passes — or the absence of a correct seam is documented
  • All [DEBUG-...] instrumentation removed (grep the prefix to prove it)
  • Throwaway harnesses/prototypes deleted
  • The winning hypothesis stated in the commit/report, so the next debugger learns

Anti-patterns

  • Hypothesising from code-reading before a red-capable loop exists.
  • "Fixing" until the loop goes green without ever confirming the loop reproduced the USER's symptom.
  • Shotgun instrumentation — untargeted logs that distinguish nothing.
  • Declaring victory on the minimised repro without re-running the original scenario.
  • Deleting or weakening the failing test to get green.

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

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

منهجية تصحيح أخطاء تعطي الأولوية لحلقات التغذية الراجعة، لمعالجة أخطاء الشيفرة الصعبة وتراجعات الأداء. أنشئ حلقة إعادة إنتاج محكمة وقادرة على إظهار الخطأ قبل وضع أي فرضية، ثم قلّصها واختبر من 3 إلى 5 فرضيات قابلة للدحض باستخدام أدوات رصد موسومة، وثبّت الإصلاح باختبار تراجعي عند نقطة فصل مناسبة. حمّل هذه المهارة عندما لا يكون الإصلاح واضحًا من رسالة الخطأ، أو يستمر الخطأ بعد المحاولة الأولى لإصلاحه، أو يكون السلوك متقطعًا، أو يبلغ المستخدم عن مشكلة أو عطل أو بطء. تكمل هذه المهارة التشخيصات، التي تتولى استكشاف مشكلات العمليات والأنظمة وإصلاحها، مثل الخدمات والشبكات والحاويات؛ أما هذه المهارة...

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

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

كيف أثبّت Diagnosing Bugs في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Dark-Alex-17/coyote/tree/main/assets/skills/diagnosing-bugs. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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