From claude-commands
Captures durable learnings from failures, corrections, and patterns into Claude memory, roadmap logs, beads, and LLM wiki. Supports /learn and save/remember requests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:learnThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to turn a concrete lesson into durable, discoverable artifacts. Do
Use this skill to turn a concrete lesson into durable, discoverable artifacts. Do not stop at a chat summary. A complete learning capture writes the file-backed records that future agents and reviewers will actually find.
Every confirmed learning must produce or update all of these:
~/.claude/projects/<project-key>/memory/.~/roadmap/learnings-YYYY-MM.md..beads/issues.jsonl when the current repo has beads.~/llm_wiki: raw source copy, source page, index entry, log entry, and relevant concept/entity updates.If a persistence target is unavailable, report the exact blocker and continue with the remaining targets. Do not silently skip wiki ingest.
/learn without specifics, inspect the recent
conversation and extract the most actionable failure, correction, or pattern.Critical, Mandatory, Best Practice, or Anti-Pattern.~/.claude/projects/**/memory~/roadmap/learnings-*.md.beads/issues.jsonl~/llm_wiki/wiki/index.md and relevant concepts/ pagesUse the current git root to derive the project memory path:
project_key = git_root.replace("/", "-")
memory_dir = ~/.claude/projects/<project_key>/memory/
Create or update:
<type>_YYYY-MM-DD_<slug>.mdMEMORY.mdThe memory file must include frontmatter:
---
name: <learning title>
description: <one-line summary>
type: feedback|project|reference
bead: <bead id or none>
---
The body must include context, technical detail, solution or rule, verification, references, and a reusable pattern.
Save a concise text record only when a configured helper and required API key are available. Prefer the repo-local helper when present:
$(git rev-parse --show-toplevel)/.claude/hooks/mem0_save.py with
OPENAI_API_KEYIf unavailable, report mem0 unavailable with the missing dependency. This is
non-blocking.
~/roadmap learning logAppend to ~/roadmap/learnings-YYYY-MM.md:
## YYYY-MM-DD - <learning title>
- **Type**: feedback|project|reference
- **Classification**: Critical|Mandatory|Best Practice|Anti-Pattern
- **Summary**: <one-line summary>
- **Bead**: <bead id or none>
- **Files**: <paths created or updated>
- **References**: <PRs, commits, artifact links, commands>
If .beads/issues.jsonl exists:
learning and
documentation.br create ... --type task --priority 3 or the existing rev- prefix rather
than inventing a bd- id.If beads are unavailable, write none and report why.
Wiki ingest is mandatory for /learn.
Use the Claude memory file or roadmap entry as the source document. Follow the
wiki-ingest workflow:
~/llm_wiki/raw/<basename>.~/llm_wiki/wiki/sources/<slug>.md.~/llm_wiki/wiki/index.md under ## Sources.~/llm_wiki/wiki/log.md with ## [YYYY-MM-DD] ingest | <title>.[[jeffrey-oracle]]; most technical
workflow learnings do not.Do not skip wiki ingest because the learning seems "not wiki-bearing"; the learning itself is the source.
Before reporting complete:
.beads/issues.jsonl parses when modified.Final report must name the created/updated paths and any skipped persistence target with its reason.
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsExtracts learnings from the current conversation and appends them to the project's CLAUDE.md as generalized rules. Captures non-obvious solutions and workarounds.
Persists learnings into a 5-layer memory hierarchy (CLAUDE.md files, memory/MEMORY.md) and consolidates by pruning outdated entries and promoting recurring patterns. Triggers on 'extract learnings', 'remember', 'dream'.
Use when completing any meaningful task - distill patterns, lessons, and insights from the interaction and persist them for future sessions