Skillpedia
برمجة عامة33k · #8753

Error Resolver

ما الذي تفعله

تساعد هذه المهارة وكيلك على معالجة رسائل الأخطاء بطريقة منظمة. وهي لكل من يواجه تعطلًا مربكًا أو تتبع مكدس أو سلوكًا غير متوقع في كوده.

متى تستخدمها

  • ✓عندما تلصق رسالة خطأ أو تتبع مكدس وتحتاج إلى معرفة معناها.
  • ✓عندما يتصرف برنامجك بشكل غير متوقع ويكون السبب غير واضح.
  • ✓عندما يتكرر الخطأ نفسه وتريد إصلاحًا دائمًا.

رابط المهارة

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/error-resolver/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/error-resolver/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“يعرض تطبيقي رسالة «Cannot read properties of undefined» عندما أنقر على حفظ. ساعدني في معرفة السبب.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يصنّف الوكيل الخطأ، ويستخرج التفاصيل المهمة، ويطابقه مع أنماط معروفة، ثم يحلل السبب الجذري المرجح. بعد ذلك يقترح إصلاحًا وطريقة لمنع تكراره.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Error Resolver

A first-principle approach to diagnosing and resolving errors across all languages and frameworks.

Core Philosophy

The 5-step Error Resolution Process:

1. CLASSIFY  ->  2. PARSE  ->  3. MATCH  ->  4. ANALYZE  ->  5. RESOLVE
     |              |             |             |              |
  What type?    Extract key    Known       Root cause      Fix +
               information    pattern?     analysis       Prevent

Quick Start

When you encounter an error:

  1. Paste the full error (including stack trace if available)
  2. Provide context (what were you trying to do?)
  3. Share relevant code (the file/function involved)

Error Classification Framework

Primary Categories

Category Indicators Common Causes
Syntax Parse error, Unexpected token Typos, missing brackets, invalid syntax
Type TypeError, type mismatch Wrong data type, null/undefined access
Reference ReferenceError, NameError Undefined variable, scope issues
Runtime RuntimeError, Exception Logic errors, invalid operations
Network ECONNREFUSED, timeout, 4xx/5xx Connection issues, wrong URL, server down
Permission EACCES, PermissionError File/directory access, sudo needed
Dependency ModuleNotFound, Cannot find module Missing package, version mismatch
Configuration Config error, env missing Wrong settings, missing env vars
Database Connection refused, query error DB down, wrong credentials, bad query
Memory OOM, heap out of memory Memory leak, large data processing

Secondary Attributes

  • Severity: Fatal / Error / Warning / Info
  • Scope: Build-time / Runtime / Test-time
  • Origin: User code / Framework / Third-party / System

Analysis Workflow

Step 1: Classify

Identify the error category by examining:

  • Error name/code (e.g., ENOENT, TypeError)
  • Error message keywords
  • Where it occurred (compile, runtime, test)

Step 2: Parse

Extract key information:

- Error code: [specific code if any]
- File path: [where the error originated]
- Line number: [exact line if available]
- Function/method: [context of the error]
- Variable/value: [what was involved]
- Stack trace depth: [how deep is the call stack]

Step 3: Match Patterns

Check against known error patterns:

  • See patterns/ directory for language-specific patterns
  • Match error signatures to known solutions
  • Check replay history for previous solutions

Step 4: Root Cause Analysis

Apply the 5 Whys technique:

Error: Cannot read property 'name' of undefined
  Why 1? -> user object is undefined
  Why 2? -> API call returned null
  Why 3? -> User ID doesn't exist in database
  Why 4? -> ID was from stale cache
  Why 5? -> Cache invalidation not implemented

Root Cause: Missing cache invalidation logic

Step 5: Resolve

Generate actionable solution:

  1. Immediate fix - Get it working now
  2. Proper fix - The right way to solve it
  3. Prevention - How to avoid in the future

Output Format

When resolving an error, provide:

## Error Diagnosis

**Classification**: [Category] / [Severity] / [Scope]

**Error Signature**:
- Code: [error code]
- Type: [error type]
- Location: [file:line]

## Root Cause

[Explanation of why this error occurred]

**Contributing Factors**:
1. [Factor 1]
2. [Factor 2]

## Solution

### Immediate Fix
[Quick steps to resolve]

### Code Change
[Specific code to add/modify]

### Verification
[How to verify the fix works]

## Prevention

[How to prevent this error in the future]

## Replay Tag

[Unique identifier for this solution - for future reference]

Replay System

The replay system records successful solutions for future reference.

Recording a Solution

After resolving an error, record it:

# Create solution record in project
mkdir -p .claude/error-solutions

# Solution file format: [error-type]-[hash].yaml

Solution Record Format

# .claude/error-solutions/[error-signature].yaml
id: "nodejs-module-not-found-express"
created: "2024-01-15T10:30:00Z"
updated: "2024-01-20T14:22:00Z"

error:
  type: "dependency"
  category: "ModuleNotFound"
  language: "nodejs"
  pattern: "Cannot find module 'express'"
  context: "npm project, missing dependency"

diagnosis:
  root_cause: "Package not installed or node_modules corrupted"
  factors:
    - "Missing npm instal
الأسئلة الشائعة

ماذا أشارك مع الوكيل؟

شارك رسالة الخطأ كاملة، وما الذي كنت تحاول فعله، والكود المعني إن أمكن.

ما ميزة إعادة التشغيل؟

يمكن للمهارة تسجيل حل لإعادة استخدامه عندما يظهر خطأ مشابه.

هل تعمل مع أي لغة؟

نعم، الأسلوب مصمم لكل اللغات والأطر.

التفاصيل

الوصف الأصلي من المؤلف

Systematic error diagnosis and resolution using first-principle analysis. Use when encountering any error message, stack trace, or unexpected behavior. Supports replay functionality to record and reuse solutions.

repo: davila7/claude-code-templates

الشعبية

نجوم GitHub
33k
الترتيب
#8753
الترخيص
MIT
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة