From compounding-skills
Teaches Claude to analyze codebases for patterns, write effective skills using real examples and reasoning, and keep skills synchronized for personalized .claude/ setups.
How this skill is triggered — by the user, by Claude, or both
Slash command
/compounding-skills:skill-gardenThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generator logic for the `compounding-skills` plugin. Loaded by `compounding-skills:setup`.
Generator logic for the compounding-skills plugin. Loaded by compounding-skills:setup.
This skill teaches Claude how to:
Load these as needed:
| File | When to use |
|---|---|
references/brownfield.md | During compounding-skills:setup Phase 2A — step-by-step codebase analysis |
references/greenfield.md | During compounding-skills:setup Phase 2B — preference interview questions and rationale |
references/workflow-templates.md | During compounding-skills:setup Phase 5.1 — parametrized templates for each workflow skill |
references/skill-templates.md | During compounding-skills:setup Phases 5.2–5.3 — skill output templates |
references/agent-templates.md | During compounding-skills:setup Phases 5.5–5.6 — subagent definition templates |
Today's LLMs are smart. They have good theory of mind and when given reasoning can go beyond rote instructions. A skill that says "Always use service objects" is less useful than one that says:
"Business logic lives in
app/services/because controllers should only handle HTTP concerns — mixing business logic into controllers makes it untestable outside a request context and leads to duplication when the same logic is needed from a background job."
When writing skills, explain why a convention exists. This lets the model make good judgment calls in edge cases rather than blindly following rules. If you find yourself writing ALWAYS or NEVER in all caps, reframe it as reasoning the model can internalize.
A skill that says "use service objects for complex business logic" is less useful than one that says:
"In this codebase, complex business logic lives in
app/services/— seeapp/services/subscription_renewal_service.rb:23for a canonical example."
Always prefer real file paths and real code over generic descriptions. Real examples ground the model in how this project actually works.
Skills use a three-level loading system. Understanding this helps write skills that are effective without wasting context window space:
Put the most important information in the SKILL.md body. Detailed examples and reference material go in references/ files with clear pointers about when to read them.
Write skills so individual sections can be updated without rewriting the whole file. Use clear section headers. Each pattern should be a standalone unit. This matters because {command_prefix}:compound needs to insert new examples near related content.
A skill with 3 well-chosen examples is more useful than one with 20 mediocre ones. Every line in a skill costs context window space — unused instructions actively hurt by crowding out useful ones.
When {command_prefix}:compound adds examples, prefer replacing a weak generic example with a real one over appending endlessly. If a section isn't contributing to better outcomes, remove it.
If the codebase refactored away from a pattern, remove it from the skill. Outdated guidance is worse than no guidance — it actively misleads.
Claude has a tendency to "undertrigger" skills — to not use them when they'd be useful. Combat this by making descriptions a little "pushy." Instead of:
"Coding patterns for this Rails project"
Write:
"Follow ProjectName conventions for all code generation — services, controllers, policies, models. Always active when working in this repository. Use this whenever writing, modifying, or reviewing any code."
Include specific contexts for when to use the skill, not just what it does.
Testing description effectiveness: After writing a description, mentally simulate these scenarios:
If the answer is no for any common scenario, revise the description to include that context.
Common undertriggering patterns to avoid:
When reading a codebase (brownfield analysis), look for signals:
UserService vs. user_service.rb vs. user-service.ts?concerns/, mixins/, lib/ directories?user.save! vs. begin; user.save!; rescue => e; ...?Service, all workers in Worker.where in controllersDon't just document what the patterns are — understand why they exist:
Capture the reasoning when it's apparent from code comments, commit messages, or the structure itself. Skills that explain why produce better results than skills that just list what.
The best workflow skills:
See references/workflow-templates.md for parametrized templates.
The code-simplifier agent is the most personalized artifact. It should:
The agent should feel like it was written by someone who has read all the code, not copied from a style guide.
Use the imperative form in instructions. Prefer explaining reasoning over heavy-handed directives:
Weaker: "ALWAYS use guard clauses. NEVER nest more than 2 levels."
Stronger: "Prefer guard clauses and early returns — they reduce nesting depth and make the happy path easier to follow. Deep nesting forces readers to mentally track multiple conditions simultaneously."
The model will follow well-reasoned guidance more reliably than rigid rules, and it will make better judgment calls in edge cases the rules didn't anticipate.
When generating or updating any skill, follow this structure:
.claude/skills/{skill-name}/
SKILL.md # Core rules, brief examples, pointers to references
README.md # Optional: usage guide for user-invocable skills
references/
{topic-1}.md # Detailed annotated examples
{topic-2}.md # More detailed examples
scripts/ # Optional: bundled utility scripts
These are guidelines, not hard limits — go longer if the content earns its space:
Description (~50–100 words): What the skill does AND when to trigger it. Be pushy about triggering — "Always active when working in this repository" is better than "Rails patterns."
SKILL.md body (~300–800 words, under 500 lines): Core rules with brief inline examples (10–15 lines each). Every rule should explain why, not just what. Link to references for details.
Reference files (unlimited, but prefer 200–400 lines each): Full annotated examples with real file paths. Each example should demonstrate a pattern and explain the reasoning behind it.
Defining output formats: When a skill needs the model to produce structured output, show the exact format with a real example rather than describing it abstractly.
The examples pattern: Show 1–2 real examples inline in SKILL.md, then point to references for more. Each example should demonstrate a different aspect of the pattern.
The anti-pattern pattern: When a rule is frequently violated, show both the wrong way and the right way, with reasoning for why the right way is better.
Generated skills should produce behavior that a developer familiar with the stack would expect. If a skill recommends an unusual approach, it must explain why the obvious approach doesn't work here.
When the compound skill proposes updates to skills, apply these filters:
If a single work session revealed a pattern, that's interesting. If three sessions all needed the same pattern, that's a skill update. One data point is an observation; multiple data points are a convention. Don't add fiddly rules that only help the specific test cases you've seen.
Periodically read through generated skills and ask: "Did this section actually help in recent sessions?" If a rule hasn't influenced any generated code in the last several compound runs, consider removing it. Dead rules crowd out useful ones.
If you find yourself writing ALWAYS or NEVER in all caps, that's a signal the rule needs better reasoning, not more emphasis. Reframe: "NEVER use raw SQL" becomes "Use the ORM for queries because it handles escaping, logging, and connection pooling — raw SQL bypasses all three."
If multiple work sessions result in writing similar utility scripts (API client generators, migration helpers, test data builders), that's a signal to bundle the script in the skill's references/scripts/ directory so future sessions start with it already available. Only bundle scripts that are needed in 3+ work sessions — one-off scripts belong in the codebase, not the skill.
npx claudepluginhub profburial/compounding-skills --plugin compounding-skillsDesign and iterate Claude Code skills: SKILL.md structure, description formulas, content architecture, and quality evaluation. Invoke whenever task involves any interaction with Claude Code skills — creating, reviewing, evaluating, debugging, or improving skills.
Guides creation of Claude Code skills: evaluates suitability with recurrence/automation/value/duplication tests, details SKILL.md structure, best practices, and quick-start commands.
Create, improve, and test SKILL.md files to extend Claude Code with project-specific knowledge and reusable workflows.