The 5-layer Claude Code agent kit: memory, skills, hooks, subagents, plugins
blaizedsouza · x · 2026-11-04
A widely shared infographic breaks down a 5-layer framework for building reliable agents with Claude Code, arguing that "giving an LLM a prompt" isn't enough — you need memory, knowledge, guardrails, delegation, and distribution:
- CLAUDE.md (memory layer): persistent context via root and .claude/claude.md — architecture rules, naming conventions, test expectations, repo structure, with global/project-level config;
- SKILLS (knowledge layer): package reusable expertise (reference docs, scripts, templates) as on-demand skills, modular context chunks instead of always-on prompts;
- HOOKS (guardrail layer): deterministic controls around the agent — PreToolUse, PostToolUse, SessionStart/Stop events for auto-formatting, blocking rm -rf, notifications; "deterministic code, not LLM judgment";
- SUBAGENTS (delegation layer): code-reviewer, test-runner, explorer subagents each with their own context window and tool permissions, keeping the main context clean and avoiding context rot;
- PLUGINS (distribution layer): bundle skills/hooks/commands/agents into installable plugins, npm-style, for team distribution.
Surrounding pieces include MCP servers (external tools/GitHub/databases/APIs) and agent teams (parallel execution, message passing, orchestration, shared permissions).
More from coding & agent
- Microsoft's WebHarbor docks 153 real websites into dockerized environments for GUI agent RL — microsoft · 2026-11-04
- ToolSpace mines real MCP execution traces to synthesize tool environments for long-horizon agents — RUC · 2026-11-04
- Turn count misleads agent benchmarks: DEPTH measures sequential dependency depth instead — Yu Jiang · 2026-11-04
- Karpathy builds HackerTube in ~2 hours with zero code using Opus 5.5 — FinanceYF5 · 2026-11-04
- Adversarial AI code review prompt: independent reviewers with human escalation — jiayuan_jy · 2026-11-04
- X exec Nikita Bier asks: 'does anyone remember how to code' — nikitabier · 2026-11-04