Build a 4-layer Claude Code extension stack in 20 minutes. CLAUDE.md, skills (with auto-invocation), hooks, and agents - plus a decision framework for choosing the right one.
The four-layer stack consisting of CLAUDE.md, skills, hooks, agents is so important. Thanks for detailing such a well rounded repeatable use case for Claude Code, Dheeraj! ✨
Indeed, I love sharing right from the fundamentals and hence started from the very basics yet tried to deliver value readers can take home. Thank you so much for reading thru it
Heard that Claude.md could also be in subfolder of the main project aka if Claude needs to work on files from project X / folder Y it will look from the Claude.md in x and the Claude from Y and load both … but not sure if it really works
The four-layer stack you describe - CLAUDE.md, skills, hooks, agents - is exactly where I landed after a year of iteration too. One thing I'd add: the 200-line limit on CLAUDE.md is real.
I've blown past it and watched context quality drop noticeably. The decision to auto-invoke skills vs hook-triggered is where I've spent most of my tuning time - getting that heuristic right changes everything.
Thanks Pawel for sharing it, it makes so much sense and resonate how CLAUDE.md file makes all the difference.. key thing i learned is less is more. Your article covers the topic in much more detail.
Claude code agents are becoming the standard. The agents + hooks combo is chef's kiss for automation
Indeed Claude Code Rocks :)
The four-layer stack consisting of CLAUDE.md, skills, hooks, agents is so important. Thanks for detailing such a well rounded repeatable use case for Claude Code, Dheeraj! ✨
Indeed, I love sharing right from the fundamentals and hence started from the very basics yet tried to deliver value readers can take home. Thank you so much for reading thru it
Heard that Claude.md could also be in subfolder of the main project aka if Claude needs to work on files from project X / folder Y it will look from the Claude.md in x and the Claude from Y and load both … but not sure if it really works
generally it works well with .claude/CLAUDE.md path within the project but even in the main root of the project it works
Amazing guide Dheeraj. Complete and to the point!
thank you Ilia, coming from another expert means justice was done in the article 😍
Hooks for deterministic behaviour, skills for judgment. That framing clicked for me. I've been building on exactly that pattern with a plugin called context-mode. Uses hooks to intercept tool calls before they execute, runs commands in sandboxed subprocesses, and indexes output locally. Covered it here: https://reading.sh/how-one-plugin-cuts-claude-codes-context-bloat-by-98-096355e68166?sk=e06168222a38a98d4bf6add2daa10973
So cool, Ilooks amazing! I will check it. Thanks for sharing.
The four-layer stack you describe - CLAUDE.md, skills, hooks, agents - is exactly where I landed after a year of iteration too. One thing I'd add: the 200-line limit on CLAUDE.md is real.
I've blown past it and watched context quality drop noticeably. The decision to auto-invoke skills vs hook-triggered is where I've spent most of my tuning time - getting that heuristic right changes everything.
I wrote about my own CLAUDE.md structure after 1000+ sessions if you want a field-tested comparison: https://thoughts.jock.pl/p/how-i-structure-claude-md-after-1000-sessions
Thanks Pawel for sharing it, it makes so much sense and resonate how CLAUDE.md file makes all the difference.. key thing i learned is less is more. Your article covers the topic in much more detail.