Understanding Building Blocks
Claude Code offers five powerful customization features that work together to enhance your development workflow. Understanding when to use each one helps you create efficient, maintainable setups.
Quick Reference Matrixβ
Feature | Invocation | Purpose | Context Impact |
---|---|---|---|
CLAUDE.md | Auto | Persistent instructions & preferences | Additive to system prompt |
Slash Commands | Manual (main)/Auto | Reusable prompt templates | Single interaction, has parameters |
Subagents | Auto/Manual | Separate AI with own system prompt | Separate context window and system prompt |
Agent Skills | Auto | Modular capabilities (no separate context) | Automatically loaded into current context on demand |
Output Styles | Manual Session-wide | Change interaction mode | Replaces system prompt |
π‘ Key Insight: Both Subagents and Agent Skills can be automatically triggered, but they serve different purposes:
- Subagents = Separate AI agent with its own system prompt and context window (can also be manually invoked)
- Agent Skills = Capabilities loaded into the current agent's context (always automatic, no separate context)
- Subagents can use Skills: A security-auditor subagent could leverage a vulnerability-scanner skill!
Decision Flowchartβ
When Features Activateβ
Real-World Scenariosβ
Scenario 1: Code Review Workflowβ
Best Choice: Slash Command
- You control when reviews happen
- Consistent review criteria
- Parameterized (which file to review)
/review 'src/components/UserProfile.tsx'
Scenario 2: Persistent Coding Standardsβ
Best Choice: CLAUDE.md
- Applies to every conversation
- Team-shared via git
- No manual invocation needed
Scenario 3: Security Auditβ
Best Choice: Subagent
- Specialized security expertise
- Separate context (doesn't clutter main chat)
- Different tool permissions (read-only)
Scenario 4: Learning Modeβ
Best Choice: Output Style
- Changes entire interaction style
- Educational explanations throughout
- Collaborative problem-solving
Scenario 5: PDF Report Generationβ
Best Choice: Agent Skill
- Claude activates when you mention "create a report"
- Complex workflow (template selection, styling, generation)
- Multi-file supporting resources
Why not use a Slash Command? Because you want this to happen automatically when relevant, without manual triggers. It enhances an agent/subagent with on-demand loaded capabilities.
Feature Relationshipsβ
Key Takeawaysβ
- CLAUDE.md: "Always-on" context and preferences
- Slash Commands: Manual prompt shortcuts you control
- Subagents: Separate AI with own system prompt and isolated context (auto or manual)
- Output Styles: Change the conversation mode itself
- Agent Skills: Automatic capabilities loaded into current agent (no separate context)
Understanding these distinctions helps you choose the right tool for each task and build efficient, maintainable development workflows.
Next Stepsβ
Now that you understand these individual features, you can bundle them together using Plugins to create shareable, reusable development environments.