Claude Code has five ways to add behaviour, and each is defined by when it applies. Picking by that behaviour avoids forcing one mechanism to carry every responsibility.1

MechanismWhat distinguishes itUse it for
CLAUDE.mdAlways loadedProject-wide rules and constraints
SkillMatched to the request, loaded on demandTask-specific knowledge and procedures
SubagentSeparate execution contextIsolated delegated work or different tool access
HookTriggered by an eventRepeatable checks or side effects around tool actions
MCP serverSupplies external capabilitiesIntegrations, data sources, tools

As described in the course.1

Skills extend the current conversation; subagents leave it, work independently, and return a result. Hooks react to events rather than to what a request means. MCP is a capability boundary, not an instruction format.1 Slash commands differ from skills in needing explicit invocation, where skills activate from the intent of an ordinary request.1

The mechanisms combine: permanent rules in CLAUDE.md, review knowledge in a skill, automatic validation in a hook, an isolated review in a subagent, and external services through MCP.1

Keeping them maintainable

The AI-native SDLC playbook recommends a short, reviewed CLAUDE.md holding build and test commands, conventions, architecture, and recurring mistakes, with reusable organization-wide policy in skills, and treats instructions, skills, hooks, and permission rules as reviewed, version-controlled code.2

The GH-600 course describes hooks as policy enforcement that does not depend on the model’s judgment: a pre-tool-use hook can block an unsafe command, a post-action hook can write an audit log, and an error hook can escalate.3 (Its example uses GitHub Copilot agents’ .github/hooks/; Claude Code hooks fill the same role.)

Footnotes

  1. Introduction to Claude Code Agent Skills (study guide) 2 3 4 5

  2. The AI-Native SDLC Playbook

  3. GitHub Certified: Agentic AI Developer (study notes)