Skip to content
Log in

Free resources · For developers

What goes in CLAUDE.md, what in a skill, what in a hook?

What goes where, when to add each, and how to keep CLAUDE.md short enough to be obeyed.

Three parts

You want Claude Code to follow your project's rules without you repeating them. Three parts do this. We think of all three as context engineering: the right information at the right time.

When to add each

You do not need all three on day one. Each has a trigger, so add it when the trigger shows up.

Keep CLAUDE.md short

The target is under 200 lines per file. Longer files use more context and may be followed less well. Keep only what Claude cannot work out from the code itself. Claude may ignore a file full of rules that do not apply to the task at hand. If two lines contradict each other, Claude may pick one at random.

Write rules you can verify

Concrete beats vague. “Use 2-space indentation” works. “Format code properly” does not. “Run npm test before committing” works. “Test your changes” does not.

What to leave out

A skill is a recipe card

This is our picture of a skill. It is a SKILL.md file with a name, a description that tells Claude when to use it, and the steps. Claude Code loads a list of skill names and descriptions, so it knows what is available. The full steps load only when the task needs them, so a skill costs little until then.

Test a skill

Collect a few realistic prompts. Run each in a fresh session with the skill and again with it turned off, then compare. We think a skill that does not improve the result is not earning its place.

Start here

We would start in this order:

Check

Sources

Sign up for membership to see the sources.