Skip to content

adamrdrew/claude-code-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

βš™οΈ Claude Code Design Patterns

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.

βœ… Prerequisites

Before diving in, you should have:

  • Claude Code installed and working β€” you can run claude and 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

πŸ§‘β€πŸ« Using This Repo

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
claude

You'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

πŸ› οΈ The Design Patterns

πŸͺ Knowledge Hooks

Front-load subagents with knowledge via hooks on invocation. More token-efficient and deterministic than runtime fetching.

β†’ Knowledge Hooks

πŸ“‹ Procedural Skills

Trade autonomy for determinism. Skills execute step-by-step using Task tools (TaskCreate, TaskUpdate, TaskList) to enforce execution order.

β†’ Procedural Skills

πŸ”­ Skill Discovery

Dynamic skill discovery for subagents. Claude Code subagents don't inherit skill manifests from the parent conversation β€” this pattern solves that efficiently.

β†’ Skill Discovery

πŸ“š Subagent Skill Creation

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.

β†’ Subagent Skill Creation

πŸ† Attribution

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.

About

Design patterns for AI Augmented Engineering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages