Design patterns for AI-augmented engineering with Claude Code. Like classic software design patterns, these are reusable approaches that solve common problems when building subagents and skills.
Before diving in, you should have:
- Claude Code installed and working β you can run
claudeand have conversations - Basic familiarity with Claude Code β you've used tools, read files, run commands
- Comfort with Markdown and YAML β the configuration formats used throughout
Each directory contains a standalone design pattern with its own .claude configuration.
Important: Run Claude Code from within a pattern directory, not this parent directory.
cd knowledge-hooks
claudeYou'll find a README.md for each pattern that goes over how it works, how to apply it, further reading, and more. Follow along with the each tutorial, interact with the agents and skills, and get an idea of how they hang together and how you might apply them.
If you find a pattern you'd like to use look for the link to the teach-claude.md for that pattern. Paste a link to the teach-claude.md for the design pattern you want to use and Claude will get your project wired up for it. I suggest you do it on a branch, just in case after applying it the pattern doesn't seem like a great fit or Claude messed something up.
Recommended starting points:
- Knowledge Hooks β Most self-contained, demonstrates hooks clearly
- Procedural Skills β Shows how to make agents follow exact procedures
Front-load subagents with knowledge via hooks on invocation. More token-efficient and deterministic than runtime fetching.
β Knowledge Hooks
Trade autonomy for determinism. Skills execute step-by-step using Task tools (TaskCreate, TaskUpdate, TaskList) to enforce execution order.
Dynamic skill discovery for subagents. Claude Code subagents don't inherit skill manifests from the parent conversation β this pattern solves that efficiently.
β Skill Discovery
Subagents that augment their own abilities by creating skills as they learn. A self-reinforcing system that improves over time.
Caution: Review the skills your subagent creates. Combine with Skill Discovery for growth without token overhead.
These design patterns are ones I've "discovered." This doesn't mean I'm the first person to think of them β likely not. But I reasoned my way into them independently. I'm happy to add links to other design patterns or variations that others have discovered.
I'm also aware that these patterns resemble well-known design patterns in software engineering. What I find interesting and hopefully helpful to others is applying them specifically to Claude Code and creating reusable examples that others can try out and explore.