From core
Self-improving loop for the project's institutional knowledge. This project maintains a structured knowledge system — a root CLAUDE.md that indexes standards docs (error handling, database, security, accessibility, etc.), directory-level CLAUDE.md files for each module, and dedicated docs for cross-cutting concerns. These steering docs are what enable high-quality, consistent, secure code across every session. Invoke /learn after sessions where mistakes were made, corrections given, or non-obvious patterns validated. It scans the conversation, extracts generalizable lessons, and updates the right doc so the same mistake never happens twice. User-invoked only — never triggers automatically.
How this skill is triggered — by the user, by Claude, or both
Slash command
/core:learnThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This project's code quality depends on a structured knowledge system: CLAUDE.md files, standards docs, and conventions that steer every future session. When a session surfaces a correction, a bug from a bad assumption, or a pattern that worked well, that knowledge needs to flow back into the docs — otherwise the next session will make the same mistake.
This project's code quality depends on a structured knowledge system: CLAUDE.md files, standards docs, and conventions that steer every future session. When a session surfaces a correction, a bug from a bad assumption, or a pattern that worked well, that knowledge needs to flow back into the docs — otherwise the next session will make the same mistake.
This skill closes that loop. It reads the conversation, extracts what was learned, and updates the right steering doc. It never touches application code.
Scan the conversation for these signals:
For each candidate lesson, ask: "Would this apply to the next 10 similar situations, or just this one?"
.maybeSingle() instead of .single() when a row might not exist" — generalizable, keep itindex.ts, validation.ts, and __tests__/" — generalizable, keep itIf in doubt, discard. The docs should stay lean. One strong rule beats three weak ones.
Every project structures its documentation differently. Rather than following a fixed mapping, discover the project's steering structure and place lessons where they naturally fit.
The root CLAUDE.md is the master index. It typically points to standards docs, directory-level CLAUDE.md files, and other steering files. Read it to understand the project's documentation topology — what docs exist, what they cover, and how they're organized.
Based on what you found in Step 1, match each lesson to the most specific existing doc that covers that topic. The hierarchy, from most preferred to least:
src/store/CLAUDE.md, not the root)For example, a project might have docs/ERROR_HANDLING.md for error patterns, or it might just have a section in the root CLAUDE.md. A monorepo might have per-package CLAUDE.md files. Use whatever structure already exists.
If a lesson doesn't fit any existing doc:
docs/STANDARDS.md or docs/CONVENTIONS.md) and add a pointer to it from the root CLAUDE.md. This is the one exception to the "never create new files" rule — but only for this single catch-all, and only when no existing file is appropriate.Read through the conversation and list every potential lesson. For each one, note:
Drop anything that fails the generalizability test. Drop anything the user didn't actually validate or correct — don't infer lessons from your own internal reasoning.
Read the root CLAUDE.md. Scan for pointers to standards docs, directory CLAUDE.md files, and any other steering files. Build a mental map of what exists and what each file covers.
For each surviving lesson, read the target doc. Check whether:
For docs and CLAUDE.md files:
For memory (user preferences / workflow lessons):
Output a short summary:
## Lessons Learned
### 1. [Short title]
- **Updated**: [file path]
- **Rule**: [the 1-2 sentence rule that was added]
### 2. [Short title]
...
### Skipped
- [Brief note on anything considered but discarded, and why]
npx claudepluginhub trickycdm/tricky-cc-plugins --plugin coreGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.