install
source ยท Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code ยท Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/auto-debug" ~/.claude/skills/majiayu000-claude-skill-registry-auto-debug && rm -rf "$T"
manifest:
skills/data/auto-debug/SKILL.mdsource content
๐ Auto Debug Skill
name: auto-debug description: Automatically detect bugs from terminal output and suggest/apply fixes without manual intervention
๐ฏ Purpose
เธเธฃเธงเธเธเธฑเธ errors เธเธฒเธ terminal output เธญเธฑเธเนเธเธกเธฑเธเธด เนเธฅเธฐเนเธเธฐเธเธณเธซเธฃเธทเธญเนเธเนเนเธเธเธฑเธเธซเธฒเธเธฑเธเธเธต เธฅเธเนเธงเธฅเธฒ debug เธฅเธเธญเธขเนเธฒเธเธกเธฒเธ
๐ When to Use
- เนเธกเธทเนเธญ terminal เนเธชเธเธ error messages
- เนเธกเธทเนเธญ build/compile fail
- เนเธกเธทเนเธญ tests fail
- เนเธกเธทเนเธญ runtime errors occur
- เนเธกเธทเนเธญ linting errors เนเธเธดเธเธเธถเนเธ
๐ง Capabilities
1. Error Detection
| Error Type | Detection Pattern |
|---|---|
| TypeScript | , |
| ESLint | , |
| Runtime | , |
| Build | , |
| Test | , |
2. Common Error Fixes
TypeScript Errors
// TS2322: Type 'string' is not assignable to type 'number' // Fix: Change variable type or value // TS2339: Property does not exist // Fix: Add property to interface or use optional chaining // TS7006: Parameter implicitly has 'any' type // Fix: Add explicit type annotation
Module Errors
# Cannot find module 'xyz' # Fix 1: npm install xyz # Fix 2: Check import path spelling # Fix 3: Add to tsconfig paths # Module not found: Can't resolve './component' # Fix: Check file exists, check extension, check case sensitivity
Runtime Errors
// TypeError: Cannot read property 'x' of undefined // Fix: Add null check or optional chaining // ReferenceError: variable is not defined // Fix: Declare variable or check scope // SyntaxError: Unexpected token // Fix: Check JSON format, missing brackets
๐ Auto-Debug Process
โโโโโโโโโโโโโโโโโโโ โ Error Occurs โ โโโโโโโโโโฌโโโโโโโโโ โ โผ โโโโโโโโโโโโโโโโโโโ โ Parse Error Msg โ โ Extract error type, location, message โโโโโโโโโโฌโโโโโโโโโ โ โผ โโโโโโโโโโโโโโโโโโโ โ Identify Cause โ โ Match patterns, analyze context โโโโโโโโโโฌโโโโโโโโโ โ โผ โโโโโโโโโโโโโโโโโโโ โ Generate Fix โ โ Create solution based on error type โโโโโโโโโโฌโโโโโโโโโ โ โผ โโโโโโโโโโโโโโโโโโโ โ Apply & Verify โ โ Apply fix, re-run to verify โโโโโโโโโโฌโโโโโโโโโ โ โผ Fixed? โโโโNoโโโโโถ Try alternative fix โ Yes โ โผ Done! โ
๐ Auto-Fix Loop
MAX_ATTEMPTS = 5 attempt = 0 while error_exists and attempt < MAX_ATTEMPTS: error = parse_error(terminal_output) fix = generate_fix(error) apply_fix(fix) result = run_command_again() if result.success: log_solution(error, fix) # Save for future break else: attempt += 1 try_alternative_fix()
๐ Error Pattern Database
Build Errors
| Pattern | Cause | Auto-Fix |
|---|---|---|
| File not found | Check path, create file |
| Permission denied | Check permissions |
| Port in use | Kill process or change port |
Dependency Errors
| Pattern | Cause | Auto-Fix |
|---|---|---|
| Version mismatch | Update package |
| Conflict | Use --legacy-peer-deps |
| Missing package | npm install |
Syntax Errors
| Pattern | Cause | Auto-Fix |
|---|---|---|
| Typo, missing bracket | Add missing syntax |
| Missing quote | Add closing quote |
| Malformed JSON | Fix JSON syntax |
โ Self-Check
- Error correctly identified
- Root cause understood
- Fix is safe (won't break other code)
- Fix verified by re-running
- Solution logged for future reference
๐ข Announcement Format
[๐ Auto-Debug] Detected: {error type} [๐ Auto-Debug] Cause: {root cause} [๐ Auto-Debug] Fixing: {applying fix} [๐ Auto-Debug] โ Fixed: {summary}
๐ Related Skills
- Manual debuggingdebugging
- Graceful error handlingerror-recovery
- Prevent errors with teststesting