Maintains detailed log of errors, bugs, and debugging sessions encountered during development. Use when encountering errors, debugging issues, or solving technical problems...
This skill maintains a detailed ERROR_LOG.md file that chronicles all errors, bugs, and debugging sessions. Unlike LOG.md (which tracks strategic project evolution), ERROR_LOG.md captures tactical debugging knowledge: what went wrong, why, and how it was fixed.
Use this skill when:
Typical triggers:
Recognize when to create an error log entry:
Log immediately when:
Don't log for:
Collect all relevant details:
Required information:
Optional but helpful: 5. Environment details (Python version, OS, dependencies) 6. Input data that triggered the error 7. Related errors or previous occurrences
How to gather:
# Copy full error traceback
# Note current file and line number
# Describe the action that triggered it
Determine error type and severity:
Error Types:
Severity Levels:
Investigate the underlying issue:
Debugging process:
Document your process:
Root cause should answer:
Fix the error and document the solution:
Solution types:
Document:
Identify how to avoid this in the future:
Prevention strategies:
Examples:
Create structured entry in ERROR_LOG.md:
Location: .claude/ERROR_LOG.md
Entry format:
## [ERROR_TYPE] Error Title
**Timestamp:** YYYY-MM-DD HH:MM
**Severity:** [Critical/High/Medium/Low]
**Status:** [Resolved/Workaround/Open]
### Location
- File: `path/to/file.py:123`
- Function: `function_name()`
- Component: [which part of the system]
### Context
[What were you doing when this happened? What was the expected behavior?]
### Error Message
\`\`\`
[Full error traceback or error output]
\`\`\`
### Root Cause
[Why did this error occur? What was the underlying issue?]
### Solution
**Type:** [Fix/Workaround/Refactor/Config/Dependency]
[How was it fixed? What code changed?]
\`\`\`python
# Code snippet showing the fix
[before/after comparison if helpful]
\`\`\`
### Prevention
[How to avoid this in the future?]
- [Prevention strategy 1]
- [Prevention strategy 2]
### Related
- Similar errors: [Links to related error entries]
- Extracted to: [Which skill was updated with this knowledge]
- Issue tracker: [External issue link if applicable]
---
Insertion point:
Connect error to skill improvements:
If error reveals general knowledge:
If error is project-specific:
Examples:
Scenario: Simple error with obvious fix
Example: TypeError from typo
Log format (condensed):
## [TYPE] TypeError: 'NoneType' object is not subscriptable
**Timestamp:** 2025-12-31 14:30
**Severity:** Low
**Status:** Resolved
**Location:** `skill_analyzer.py:45`
**Root Cause:** Forgot to check if section exists before accessing
**Solution:** Added None check: `if section is not None:`
**Prevention:** Always validate before accessing optional data
---
Scenario: Multi-hour debugging with false leads
Log format (detailed):
## [PERFORMANCE] Skill loading timeout after 30 seconds
**Timestamp:** 2025-12-31 09:00
**Severity:** High
**Status:** Resolved
**Location:** `.claude/core/skill_loader.py:234`
**Context:**
Loading skills from directory with 50+ skills causes timeout.
Expected load time <1s, actual time >30s.
**Error Message:**
\`\`\`
TimeoutError: Skill loading exceeded 30 second timeout
at skill_loader.py:234 in load_all_skills()
\`\`\`
**Debugging Process:**
1. First thought: Too many files → profiled file I/O (not the issue)
2. Second attempt: Large SKILL.md files → checked file sizes (all <100KB)
3. Key insight: Noticed repeated regex compilation in loop
4. Root cause found: Regex pattern recompiled for each skill
**Root Cause:**
Regex pattern for parsing frontmatter was compiled inside the loop,
causing O(n) regex compilations instead of O(1).
**Solution:**
**Type:** Refactor
Moved regex compilation outside loop:
\`\`\`python
# Before
for skill in skills:
pattern = re.compile(r'^---\n(.*?)\n---', re.DOTALL)
match = pattern.search(skill_content)
# After
pattern = re.compile(r'^---\n(.*?)\n---', re.DOTALL)
for skill in skills:
match = pattern.search(skill_content)
\`\`\`
Load time reduced from 30s → 0.3s (100x improvement)
**Prevention:**
- Profile before optimizing (avoid premature optimization)
- Move invariant computations out of loops
- Cache compiled regex patterns
- Add performance tests for operations on collections
**Related:**
- Extracted to: skill-creator/references/performance-patterns.md
- Similar pattern: references/common-mistakes.md#loop-invariants
---
Scenario: Same error type appears multiple times
Log format (with links):
## [TYPE] AttributeError: 'dict' object has no attribute 'get_value'
**Timestamp:** 2025-12-31 16:45
**Severity:** Medium
**Status:** Resolved
**Context:**
Third occurrence of this pattern - trying to call method on dict
instead of accessing key.
**Root Cause:**
Confusion between dict access (dict['key'] or dict.get('key'))
and object attribute access (obj.attribute).
**Solution:**
Changed to dict access: `config.get('value')` → `config['value']`
**Prevention:**
- Use type hints to catch at development time
- Remember: dicts use [], not .attribute
- Consider using dataclasses for structured config
**Related:**
- Previous occurrences: See [TYPE] entries from 2025-12-30
- Pattern documented in: python-patterns/references/dict-vs-object.md
---
Archive old errors when:
Archive location:
ERROR_LOG_ARCHIVE_2025.mdNever delete:
knowledge-extractor analyzes ERROR_LOG.md to:
Example extraction:
Complete ERROR_LOG.md template with:
See this file for the full template and examples.
Stable: 8-step workflow, error classification taxonomy, entry format structure
Mutable: Error type categories, example patterns, prevention strategies, integration with knowledge-extractor
Update rules: See references/contract.md for detailed rules
Full contract specification in
references/contract.md