Agent skill
learn
Persistent memory system for storing and recalling learnings across sessions. AUTO-INVOKE THIS SKILL when you: - Fix a non-obvious bug (store as "bug") - Discover a useful code pattern (store as "pattern") - Encounter a gotcha or edge case (store as "gotcha") - Find a useful tool/library feature (store as "tool") - Make a performance optimization (store as "perf") - Discover configuration that solved a problem (store as "config") - Make an architecture decision with rationale (store as "arch") - Find a useful testing insight (store as "test") Also invoke when user says: "remember this", "store learning", "recall learnings", "what did we learn", "lessons learned"
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/learn-darkroomengineering-cc-settings
SKILL.md
Persistent Learning System
Store learnings that survive across Claude Code sessions. Proactively store learnings when you discover something valuable - don't wait for the user to ask.
Auto-Store Triggers
Store a learning AUTOMATICALLY when:
- You fix a bug that wasn't immediately obvious
- You discover why something was breaking
- You find a workaround for a limitation
- You make a decision that future sessions should know about
- You encounter behavior that was unexpected
- You find a pattern that works well in this codebase
Actions
Store a learning
bash ~/.claude/scripts/learning.sh store "<category>" "<learning>" "[context]"
Categories: bug, pattern, gotcha, tool, perf, config, arch, test
Examples:
# After fixing a hydration error
bash ~/.claude/scripts/learning.sh store "bug" "useAuth hook causes hydration mismatch - wrap in dynamic import with ssr:false"
# After discovering a pattern
bash ~/.claude/scripts/learning.sh store "pattern" "Always use Image wrapper from @/components/image, not next/image directly"
# After hitting a gotcha
bash ~/.claude/scripts/learning.sh store "gotcha" "Biome ignores .mdx files by default - add to biome.json includes"
# After a tool discovery
bash ~/.claude/scripts/learning.sh store "tool" "Use 'bun --bun' flag to enable native Bun APIs in scripts"
Recall learnings
bash ~/.claude/scripts/learning.sh recall [filter] [value]
Filters:
all- All learnings for current projectall-projects- List all projects with learningscategory <cat>- Filter by categorysearch <keyword>- Search in learning textrecent <n>- Most recent n learnings
Delete a learning
bash ~/.claude/scripts/learning.sh delete <id>
Storage
Learnings are stored per-project at ~/.claude/learnings/<project>/learnings.json
Best Practices
- Be specific - Include the actual fix, not just "fixed the bug"
- Include context - What file, what component, what was the symptom
- Store immediately - Don't wait until end of session
- Categorize correctly - Helps with recall later
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?