compound-learnings

Transform session learnings into permanent capabilities (skills, rules, agents). Use when asked to "improve setup", "learn from sessions", "compound learnings", or "what patterns should become skills".

By parcadei · 501 installs

npx skills add parcadei/continuous-claude-v3 --skill compound-learnings

Source repository · Upstream listing

Compound Learnings Transform ephemeral session learnings into permanent, compounding capabilities. When to Use "What should I learn from recent sessions?" "Improve my setup based on recent work" "Turn learnings into skills/rules" "What patterns should become permanent?" "Compound my learnings" Process Step 1: Gather Learnings Read the most recent 5 10 files (or specify a date range). Step 2: Extract Patterns (Structured) For each learnings file, extract entries from these specific sections: Section Header What to Extract Patterns or Reusable techniques Direct candidates for rules Takeaway: or Actionable takeaway: Decision heuristics What Worked Success patterns What Failed Anti patterns (invert to rules) Key Decisions Design principles Build a frequency table as you go: Step 2b: Consolidate Similar Patterns Before counting, merge patterns that express the same principle: Example consolidation: "Artifact first debugging" "Verify hook output by inspecting files" "Filesystem first debugging" → All express: "Observe outputs before editing code" Use the most general formulation. Update the frequency table. Step 3: Detect Meta Patterns Critical step: Look at what the learnings cluster around. If 50% of patterns relate to one topic (e.g., "hooks", "tracing", "async"): → That topic may need a dedicated skill rather than multiple rules → One skill compounds better than five rules Ask yourself: "Is there a skill that would make all these rules unnecessary?" Step 4: Categorize (Decision Tree) For each pattern, determine artifact type: Artifact Type Examples: Pattern Type Why "Run linting before commit" Hook (PreToolUse) Automatic gate "Extract learnings on session end" Hook (SessionEnd) Automatic trigger "Debug hooks step by step" Skill Manual sequence "Always pass IDs explicitly" Rule Heuristic Step 5: Apply Signal Thresholds Occurrences Action 1 Note but skip (unless critical failure) 2 Consider present to user 3+ Strong signal recommend creation 4+ Definitely create Step 6: Propose Artifacts Present each proposal in this format: Use AskUserQuestion to get approval for each artifact (or batch approval). Step 7: Create Approved Artifacts For Rules: For Skills: Create .claude/skills/<name /SKILL.md with: Frontmatter (name, description, allowed tools) When to Use Step by step instructions (executable) Examples from the learnings Add triggers to skill rules.json if appropriate. For Hooks: Create shell wrapper + TypeScript handler: Then create src/<name .ts , build with esbuild, and register in settings.json : For Agent Updates: Edit existing agent in .claude/agents/<name .md to add the learned capability. Step 8: Summary Report Quality Checks Before creating any artifact: 1. Is it general enough? Would it apply in other projects? 2. Is it specific enough? Does it give concrete guidance? 3. Does it already exist? Check .claude/rules/ and .claude/skills/ first 4. Is it the right type? Sequences → skills, heuristics → rules Files Reference Learnings: .claude/cache/learnings/ .md Skills: .claude/skills/<name /SKILL.md Rules: .claude/rules/<name .md Hooks: .claude/hooks/<name .sh + src/<name .ts + dist/<name .mjs Agents: .claude/agents/<name .md Skill triggers: .claude/skills/skill rules.json Hook registration: .claude/settings.json → hooks section