systematic-debugging
ما الذي تفعله
تساعد هذه المهارة على إيجاد السبب الحقيقي للمشكلات التقنية، مثل أخطاء البرامج أو السلوك غير المتوقع. ترشدك إلى التحقيق قبل محاولة الإصلاح، لضمان أن الحل دائم وليس مؤقتًا.
متى تستخدمها
- ✓عندما يُظهر برنامج خطأً لا تفهمه.
- ✓إذا جربت إصلاح شيء ما عدة مرات دون نجاح.
- ✓في الحالات الطارئة التي يكون فيها إغراء الحل السريع كبيرًا.
رابط المهارة
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/systematic-debugging/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“شيفرتي تعطي خطأً غريبًا عندما أحاول حفظ ملف، ماذا أفعل للتحقيق في السبب الجذري؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تقترح المهارة خطوات منظمة: أولًا، فهم الخطأ وكيفية إعادة إنتاجه؛ ثم فحص ما الذي تغيّر مؤخرًا. وبعد ذلك فقط، تكوّن فرضية وتختبر أصغر تغيير ممكن لتأكيد السبب.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Systematic Debugging
Overview
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
Core principle: Investigate before guessing and separate a verified repair from a temporary mitigation. During an incident, an authorized rollback or containment action may restore service while root-cause work continues.
Violating the letter of this process is violating the spirit of debugging.
The Iron Law
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Start with the observable failure and the smallest useful evidence check. Label any emergency mitigation explicitly and preserve evidence for the later root-cause investigation.
When to Use
Use for ANY technical issue:
- Test failures
- Bugs in production
- Unexpected behavior
- Performance problems
- Build failures
- Integration issues
Use this ESPECIALLY when:
- Under time pressure (emergencies make guessing tempting)
- "Just one quick fix" seems obvious
- You've already tried multiple fixes
- Previous fix didn't work
- You don't fully understand the issue
Don't skip when:
- Issue seems simple (simple bugs have root causes too)
- You're in a hurry (rushing guarantees rework)
- Manager wants it fixed NOW (systematic is faster than thrashing)
The Four Phases
You MUST complete each phase before proceeding to the next.
Phase 1: Root Cause Investigation
BEFORE attempting ANY fix:
Read Error Messages Carefully
- Don't skip past errors or warnings
- They often contain the exact solution
- Read stack traces completely
- Note line numbers, file paths, error codes
Reproduce Consistently
- Can you trigger it reliably?
- What are the exact steps?
- Does it happen every time?
- If not reproducible → gather more data, don't guess
Check Recent Changes
- What changed that could cause this?
- Git diff, recent commits
- New dependencies, config changes
- Environmental differences
Gather Evidence in Multi-Component Systems
WHEN system has multiple components (CI → build → signing, API → service → database):
BEFORE proposing fixes, add diagnostic instrumentation:
For EACH component boundary: - Record allowed field names, sizes, statuses and correlation IDs - Redact secrets and private payloads before logging - Verify environment/config propagation - Check state at each layer Run once to gather evidence showing WHERE it breaks THEN analyze evidence to identify failing component THEN investigate that specific componentExample (multi-layer system):
# In each relevant process, report presence only; never dump secret values. if [ -n "${IDENTITY:-}" ]; then echo 'IDENTITY is set' else echo 'IDENTITY is absent or empty' fi # Read-only validation of an already-built artifact, when available. codesign --verify --verbose=2 "$APP"Interpretation: Compare presence checks at the actual workflow/build boundaries. Artifact verification does not itself prove that the correct signing identity propagated.
Trace Data Flow
WHEN error is deep in call stack:
See
root-cause-tracing.mdin this directory for the complete backward tracing technique.Quick version:
- Where does bad value originate?
- What called this with bad value?
- Keep tracing up until you find the source
- Fix at source, not at symptom
Phase 2: Pattern Analysis
Find the pattern before fixing:
Find Working Examples
- Locate similar working code in same codebase
- What works that's similar to what's broken?
Compare Against References
- If implementing pattern, read reference implementation COMPLETELY
- Don't skim - read every line
- Understand the pattern fully before applying
Identify Differences
- What's different between working and broken?
- List every difference, however small
- Don't assume "that can't matter"
Understand Dependencies
- What other components does this need?
- What settings, config, environment?
- What assumptions does it make?
Phase 3: Hypothesis and Testing
Scientific method:
Form Single Hypothesis
- State clearly: "I think X is the root cause because Y"
- Write it down
- Be specific, not vague
Test Minimally
- Make the SMALLEST possible change to test hypothesis
- One variable at a time
…
الأسئلة الشائعة
لماذا لا أجرب حلًا سريعًا فقط؟
قد تُخفي الحلول السريعة المشكلة الحقيقية، وقد تؤدي إلى أخطاء جديدة، وتكلّف وقتًا أكبر في النهاية. أما التحقيق في السبب الجذري فيضمن حلًا دائمًا.
ما هو «السبب الجذري»؟
هو السبب الأساسي الذي يُحدث المشكلة. فبدلًا من معالجة العَرَض (الخطأ الظاهر)، يكون السبب الجذري هو المشكلة الأصلية التي إن أُصلحت منعت الخطأ من الحدوث مجددًا.
ماذا لو كانت المشكلة تشمل أجزاء متعددة من النظام؟
تطلب المهارة فحص التواصل بين الأجزاء، وتسجيل المعلومات عند كل «حد» (أي حيث يتواصل جزء مع آخر) لمعرفة أين يحدث الفشل أولًا.
التفاصيل
الوصف الأصلي من المؤلف
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
الشعبية
- نجوم GitHub
- 48k
- الترتيب
- #5918
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
00-andruia-consultant
48kيساعد وكيلك على بدء مشاريع الذكاء الاصطناعي أو تحسينها. يحلل الكود ويقترح الأدوات ويُعد خطط عمل بالإسبانية.
007
48kيتيح لوكيلك إجراء تدقيقات أمنية ونمذجة التهديدات. مفيد لحماية المشاريع من الهجمات والثغرات الأمنية.
10-andruia-skill-smith
48kيساعد وكيلك على إنشاء أدوات الذكاء الاصطناعي أو تحسينها. يحدد طريقة عملها، ويكتب توثيقها، ويتحقق من بنيتها.
20-andruia-niche-intelligence
48kيتيح لوكيلك إعداد ملخص عن صناعة محددة. مفيد لفهم السياق والقواعد وأنماط الاستخدام والمخاطر لمشروع ما، باستخدام مصادر موثوقة.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.