Key Takeaway
The Command, Agent, and Skill orchestration pattern is the difference between using Claude Code as a fancy autocomplete and using it as a development team. Commands encode repeatable workflows that run identically every time. Agents handle autonomous sub-problems with their own context and tool access. Skills inject on-demand capabilities without polluting your main conversation. Together, they let you build complex development workflows that are reproducible, parallelizable, and context-efficient.
The Three-Layer Architecture
Most developers use Claude Code in a single conversation, typing instructions one at a time and waiting for results. This works for simple tasks, but it breaks down for complex workflows. You end up repeating the same instructions across sessions, losing context when conversations get long, and manually coordinating tasks that could run in parallel. The three-layer architecture solves each of these problems with a dedicated mechanism.
Commands are stored prompts that you invoke with a slash. They live in .claude/commands/ as markdown files with YAML frontmatter. When you type /check, Claude loads the corresponding command file and executes its instructions exactly. No ambiguity, no drift, no forgotten steps. They are the foundation layer.
Agents are sub-Claude instances that run in their own context with their own tool access. They handle a specific sub-problem and return a result. The main Claude session orchestrates them like a tech lead delegating to team members. They are the autonomy layer.
Skills are on-demand capability injections. When Claude encounters a task that requires specialized knowledge, it can load a skill that provides context, instructions, and tool access for that specific domain. Once the task is complete, the skill context is released. They are the specialization layer.
Commands: Repeatable Stored Workflows
A command is a markdown file in .claude/commands/ that Claude executes when you type the corresponding slash command. The file can contain YAML frontmatter for metadata and a body with instructions. The body supports string substitutions that inject dynamic values at runtime, making commands flexible without making them ambiguous.
Command Frontmatter Fields
The frontmatter block at the top of a command file defines its metadata. The allowed-tools field restricts which tools the command can use. The description field appears in the slash command autocomplete menu. The model field pins the command to a specific model, useful for cost control on routine tasks.
String Substitutions
Commands support several dynamic substitutions that are resolved at runtime. $ARGUMENTS inserts whatever text the user typed after the slash command. $FILE inserts the file currently open in the editor. $SELECTION inserts the currently selected text. These let you build commands that adapt to context without hardcoding paths or content.
Unlock the full Knowledge Base
This article continues for 27 more sections. Upgrade to Pro for full access to all 96 articles.
That's just $0.10 per article
- Full access to all blueprints, frameworks, and playbooks
- Interactive checklists with progress tracking
- Downloadable templates (.xlsx, .pptx, .docx)
- Quarterly Technology Radar updates