Recipes for Claude Code — not vibes.
Practitioner-tested patterns for Claude Code — hooks, subagents, skills, MCP servers, settings.json, CLAUDE.md, and the workflows that wrap them. Every recipe ships with the JSON, the timings, and the failure modes from real use, so you can copy what works and skip what didn't.
What is Agent Cookbooks?
Agent Cookbooks is a practitioner blog about Claude Code and the broader AI-agent stack — MCP, hooks, subagents, skills, and the configurations that hold them together. Every post is built around a real artifact: a working hook, a measured cost, a documented failure mode. No paraphrased docs, no five-tips listicles, no AI-generated filler. If you ship with Claude Code daily and you'd rather see the JSON than read another listicle, this is for you.
Three from the last two weeks: 142 of 153 meta descriptions over the 160-char SERP cap, fixed with a six-line helper (post); a robots.txt served at 2,704 bytes against a 966-byte committed file — Cloudflare edge-injecting eight Disallow rules silently (post); five misplaced allow rules relocated in 30 minutes and two of three remote routines scheduled (post). The pattern across all three: a measured number, the config that produced it, the failure mode behind it.
Latest recipes
-
"Give concrete detail" made the LLM invent it
A give-concrete-detail brand-voice line made a content pipeline invent unverifiable specifics. Fix: a context constraint, a [FILL] channel, a banned list.
-
18 pre-commit rules that block the commit, not the launch
Eighteen pre-commit rules encode GDPR, consumer-protection, and thin-content checks as compliance-as-code — ~150ms per commit, blocking commits, not launch.
-
Five specialist subagents, delegated by description
Five domain-scoped .claude/agents/ subagents, each with its own restricted tool list and per-agent pre-commit skip-list, delegated by description not by name.
-
MarkItDown read the 19MB PDF WebFetch wouldn't
WebFetch caps fetches at 10MB, so a 19.5MB system-card PDF stayed unread. MarkItDown converted it in 66s — and recovered the number we couldn't verify.
-
ASR + an LLM corrupted my agent's memory twice in 6 weeks
Each layer was fine alone. Stacked, ASR and an LLM classifier wrote a grammatically valid false fact the agent stated on every call. The audit that catches it.
-
Cloudflare Pages serves stale HTML after every deploy
A Cache Rule makes Cloudflare Pages edge-cache HTML, so your next deploy stays invisible at the canonical URLs for up to 24h — until you purge.
-
Crawled – currently not indexed isn't always a bug
22 URLs hit Search Console's 'Crawled – currently not indexed' — all noindex'd markdown alternates. When that bucket is your noindex working, not a defect.
-
Four Notion API gotchas the docs don't mention
A Notion sync layer that read clean in the docs broke four ways in prod: UTF-16 rich_text limits, appending template enums, orphan writes, and a schema split.