Claude Code's Five Core Component Types
CoreIdentify Claude Code's core component types · Difficulty 1/5
Explanation
The Five Component Types
Claude Code organizes its extensibility surface into five distinct component types:
| Component | What it is |
|---|---|
| Rules | Standing instructions/conventions Claude Code should always follow in the repo (coding style, do/don't). Often expressed in CLAUDE.md. |
| Skills | Packaged, reusable capabilities defined by a SKILL.md (instructions + optional scripts/resources) that Claude loads when relevant. |
| Commands | Slash commands -- built-in (e.g., /clear, /init, /help) and custom commands defined as Markdown prompt files in .claude/commands/. |
| Agents | Subagents with focused roles/tool sets that Claude Code can delegate to. |
| Agent Memory | Persisted context (notably CLAUDE.md) that survives across turns/sessions so Claude "remembers" project conventions. |
Telling Them Apart
Each component solves a different operational problem:
- Rules are passive, always-on conventions -- they don't get invoked, they just constrain behavior continuously.
- Skills are invoked on relevance -- Claude loads a
SKILL.mdwhen the task matches what it packages. - Commands are invoked explicitly by name (
/foo) -- either built-in or authored as a Markdown file. - Agents are delegated to -- a focused-role, focused-tool-set Subagent handles a subtask and returns a result.
- Agent Memory persists across turns and sessions, most visibly as `CLAUDE.md`.
A useful discriminator: Skills and Commands both package reusable instructions, but a Command is explicitly invoked by name (/command-name) while a Skill is loaded automatically when Claude judges it relevant to the task at hand.
Common exam traps
- Confusing Skills with Commands because both are markdown-authored, reusable instructions. The distinguishing factor is invocation: Commands are named and explicitly called; Skills are loaded implicitly based on relevance.
- Treating Agent Memory and CLAUDE.md as two different things -- CLAUDE.md is the primary, most visible instance of Agent Memory, not a separate mechanism.
- Assuming Rules must live only in CLAUDE.md -- CLAUDE.md is the common place to express them, but the concept (standing conventions Claude always follows) is distinct from any one file.
Key Takeaways
- The five core component types are Rules, Skills, Commands, Agents, and Agent Memory
- Rules are passive, always-on conventions; Skills load on relevance; Commands are explicitly invoked by name; Agents are delegated subtasks; Agent Memory persists context across sessions
- The Skill vs. Command distinction is invocation: implicit/relevance-based (Skill) vs. explicit/named (Command)
- CLAUDE.md is the primary instance of Agent Memory, not a separate mechanism
Glossary Terms
A markdown configuration file read by Claude Code at startup that injects persistent context, project conventions, and tool guidance into every session — without re-prompting. Claude Code supports CLAUDE.md files at the global, project-root, and subdirectory levels (see /glossary/path-specific-rules for the hierarchy). Uses @import for modular organization.
Reusable markdown instruction files with YAML frontmatter that define custom slash commands in Claude Code. Invoked with /skill-name. Frontmatter configures: description (for trigger matching), allowed-tools (tool restrictions), and context (fork for isolation). Stored in .claude/skills/.
Named, explicitly invoked instructions in Claude Code -- built-in (e.g., /clear, /init, /help) or custom commands authored as Markdown prompt files in .claude/commands/. Distinguished from Skills by invocation: a Command is called by name; a Skill loads automatically when Claude judges it relevant.
A Claude instance spawned by an orchestrator to handle one bounded subtask in complete context isolation. Each subagent starts with a fresh context window — the orchestrator's history is never inherited — and is invoked via the [Task tool](/glossary/task-tool). The subagent runs its own full [Agentic Loop](/glossary/agentic-loop), then returns a single structured result to the orchestrator.
Related Concepts