Claude Playbook
A working .claude/ directory for Claude Code, and
the reasoning behind every file in it.
Rules that load only when they apply, skills for review and verification,
subagents that keep exploration out of your context, and hooks that enforce what
instructions can only request.

Independent community project. "Claude" and "Claude Code" are products of
Anthropic. Not affiliated with, endorsed by, or
sponsored by Anthropic.
Contents
Why this exists
Claude Code writes good code and still drifts, because nothing in your
repository tells it what "good" means here. Left alone it will patch symptoms
rather than causes, build a component that already exists three directories
over, leave dead code behind, and report that tests pass without running them.
None of that is a model failure. It is missing context, in the specific places
Claude Code gives you to put context.
This repository fills those places, and explains each choice, so you can keep
what fits your project and delete the rest.
New in 2.0 (September 2026): the hook registration format, the memory
precedence model, and half the frontmatter documented here changed since the
first release. Rules are now path-scoped, which cut the always-loaded context
by 82%. See what's new and the
changelog.
Before you install
Two things, both quick.
1. Install jq. Every hook needs it to read its input.
brew install jq # macOS
sudo apt install jq # Debian, Ubuntu
Without it the lint hook does nothing, and the guardrail hook falls back to a
less precise check and tells you so. Nothing breaks, but you are not getting
what you installed.
2. Read the four hook scripts. They run automatically, so they are code you
are choosing to trust. About 200 lines in total, in .claude/hooks/.
SECURITY.md says what they do and why you should check rather
than take that on trust.
Claude Code v2.1.196 or later covers everything here. Some tooling wants a newer
version; the compatibility table lists which.
Install
Three ways. Pick by how much you want to own.
As a plugin, recommended for trying it out
/plugin marketplace add smartwhale8/claude-playbook
/plugin install claude-playbook@claude-playbook
You get the skills, the subagents, and the hooks, namespaced as
/claude-playbook:review. They update when you update the plugin, and nothing
lands in your repository.
Rules are not a plugin component, so copy those separately if you want them:
mkdir -p .claude/rules
curl -sL https://github.com/smartwhale8/claude-playbook/archive/main.tar.gz \
| tar xz --strip=2 -C .claude/rules claude-playbook-main/.claude/rules
As a template, recommended for a new project
Click Use this template on GitHub, or:
gh repo create my-project --template smartwhale8/claude-playbook --public --clone
You own every file and edit it freely. Nothing updates automatically.
Copied into an existing project
git clone https://github.com/smartwhale8/claude-playbook /tmp/playbook
cp -r /tmp/playbook/.claude .
cp /tmp/playbook/.mcp.json.example . # optional, inert until renamed
Then read Make it yours. Copying it unchanged gets you maybe
half the value.
Your first fifteen minutes
Do these four in order and the playbook is working. Everything else is optional.