Cross-session learning system that extracts insights from session transcripts and injects relevant past learnings at session start. Uses simple keyword matching for relevance. Complements DISCOVERIES.md and PATTERNS.md with structured YAML storage.
Cross-session learning system that preserves insights and injects relevant past knowledge.
The skill works automatically via hooks:
Manual management:
/amplihack:learnings show # Show all learnings
/amplihack:learnings show errors # Show error-related learnings
/amplihack:learnings search import # Search for 'import' across all categories
When a session ends, the skill:
When a session starts, the skill:
| Category | What It Stores |
| -------------- | ------------------------------------ |
| errors | Error patterns and their solutions |
| workflows | Process insights and shortcuts |
| tools | Tool usage patterns and gotchas |
| architecture | Design decisions and trade-offs |
| debugging | Debugging strategies and root causes |
.claude/data/learnings/
errors.yaml # Error patterns
workflows.yaml # Workflow insights
tools.yaml # Tool patterns
architecture.yaml # Design decisions
debugging.yaml # Debug strategies
Each learning follows this structure:
learnings:
- id: "err-001"
created: "2025-11-25T12:00:00Z"
keywords:
- "import"
- "circular"
summary: "Circular imports cause ImportError"
insight: |
When module A imports from B and B imports from A,
Python raises ImportError. Move shared code to third module.
example: |
# Extract shared types to types.py
# Both modules import from types.py
confidence: 0.9
times_used: 3
| System | Best For | Format | | ---------------- | --------------------------------- | -------- | | DISCOVERIES.md | Major findings with full context | Markdown | | PATTERNS.md | Proven reusable patterns | Markdown | | Session Learning | Quick insights for auto-injection | YAML |
All three systems are complementary:
/amplihack:learnings show
/amplihack:learnings show errors
/amplihack:learnings show workflows
/amplihack:learnings search <query>
/amplihack:learnings add
Then follow the prompts to add category, keywords, summary, insight.
/amplihack:learnings stats
Simple keyword overlap scoring:
No complex ML - just effective text matching.
Error Pattern:
keywords: [import, circular, dependency]
summary: "Circular imports cause module not found errors"
insight: "Move shared code to a separate module that both can import from"
Workflow Insight:
keywords: [git, worktree, parallel, development]
summary: "Use git worktrees for parallel feature development"
insight: "Create worktree per feature to avoid branch switching overhead"
Learnings not being injected?
~/.amplihack/.claude/data/learnings/ directory existsToo many irrelevant matches?
/amplihack:learnings search to check what's storedTo improve this skill:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer