Skip to main content

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​

FeatureInvocationPurposeContext Impact
CLAUDE.mdAutoPersistent instructions & preferencesAdditive to system prompt
Slash CommandsManual (main)/AutoReusable prompt templatesSingle interaction, has parameters
SubagentsAuto/ManualSeparate AI with own system promptSeparate context window and system prompt
Agent SkillsAutoModular capabilities (no separate context)Automatically loaded into current context on demand
Output StylesManual Session-wideChange interaction modeReplaces 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​

  1. CLAUDE.md: "Always-on" context and preferences
  2. Slash Commands: Manual prompt shortcuts you control
  3. Subagents: Separate AI with own system prompt and isolated context (auto or manual)
  4. Output Styles: Change the conversation mode itself
  5. 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.