Learn
Claude Code skills marketplace — /claude-md (CLAUDE.md generator) + /learn (compounding self-learning rules)
npx -y skills add givepro91/cc-skills --skill learnAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Capture a lesson from a mistake into CLAUDE.md's Self-Learning Rules so the same mistake isn't repeated. Distills the most recent correction into ONE concise, reusable rule and appends it (deduped). Use right after Claude does something wrong and the user corrects it, or when the user runs /learn.
SKILL.md
3.4 KB, 748 tokens by cl100k_base, as published. Nobody here has run it
/learn — append a rule from a mistake
Turn a correction into a durable rule in the canonical agent file's Self-Learning Rules, so the next session doesn't repeat it. This is the "compounding engineering" loop: every mistake makes the rules sharper.
Procedure
- Find the canonical agent file (the one holding the
CC-RULESblock). Project root =git rev-parse --show-toplevel(fallback: cwd). Resolve the same way/claude-mddoes: aCLAUDE.mdsymlink → its target;CLAUDE.mdimporting@AGENTS.md(or AGENTS.md canonical) →AGENTS.md; onlyAGENTS.md→AGENTS.md; elseCLAUDE.md. In practice: pick whichever ofCLAUDE.md/AGENTS.mdactually contains<!-- LEARN:ANCHOR -->. If neither has it, tell the user to run/claude-mdfirst (don't hand-edit). - Determine the rule:
- If the user passed text after
/learn, use that as the rule (lightly cleaned). - Otherwise, look at the most recent correction in this conversation — what Claude did wrong and what the user actually wanted — and distill it into one rule.
- If the user passed text after
- Write the rule well (this matters more than anything):
- Imperative and general, not a story. ✅ "When editing a shared function, grep all call sites before changing its signature." ❌ "Earlier you broke the build."
- One line, one lesson. Actionable next time. Prefer "always/never/before X do Y" shapes.
- Preserve the user's language (Korean correction → Korean rule).
- Capture the generalizable lesson, not the one-off detail.
- Append (deduped) via the helper:
(node "${CLAUDE_PLUGIN_ROOT}/scripts/append-rule.mjs" <target file> "<the one-line rule>"<target file>= the canonical file resolved in step 1.) It inserts- (YYYY-MM-DD) <rule>after the anchor (newest first) and skips near-duplicates. - Confirm the added line (or report it was a duplicate). Offer to commit (don't commit without approval).
Examples
<good> User: "you changed the API signature but didn't update the callers" → rule: "Before changing a function's signature, grep every call site and update them in the same change." </good> <good> User (Korean): "스키마 바꾸기 전에 꼭 물어봐" → rule (Korean): "DB 스키마를 변경하기 전에 반드시 사용자 승인을 받는다." </good> <bad> rule: "Don't make mistakes." → too vague, not actionable. rule: "I broke the login test at 3pm." → a story, not a reusable rule. </bad>Why a separate section + skill (not full automation)
Auto-detecting "mistakes" from chat is noisy and unreliable. /learn keeps a human in the loop (you decide a correction is worth a rule), while the helper makes the write deterministic and dedup-safe. The rules live in CLAUDE.md so they load every session and travel with the repo.
Gives 0 of the 12 instructions most learn study skills give in 748 tokens
Counted across 546 of the 573 authors here whose files we hold, read 2026-08-06
- produce self-contained HTML lessonsin 24 of 546, across 8 files
- record user preferences in a notes filein 23 of 546, across 5 files
- calculate the zone of proximal development before teachingin 23 of 546, across 6 files
- maintain a teaching workspace in the current directoryin 21 of 546, across 4 files
- make lessons beautiful, short, and quickly completablein 19 of 546, across 3 files
- create reusable components for lessonsin 19 of 546, across 5 files
- create compressed reference documents for quick lookupin 19 of 546, across 3 files
- find high-quality resources before writing lessonsin 18 of 546, across 4 files
- update the mission file and records upon mission changesin 16 of 546, across 2 files
- set min_dist to 0.0 for clustering preprocessingin 16 of 546, across 6 files
- populate the mission file before teachingin 15 of 546, across 1 file
- include interactive feedback loops in lessonsin 15 of 546, across 1 file
Said here and by no other author read
- Find the canonical agent file
- Resolve the project root using git
- Tell the user to run /claude-md if the anchor is missing
- Distill the most recent correction into one rule
- Write a general imperative rule, not a story
- Preserve the original language of the correction
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.