Aller au contenu principal

Claude Code Concepts

Understand the Claude Code ecosystem to better use claude-base

Overview

Claude Code is a CLI tool from Anthropic that lets you interact with Claude directly in the terminal. It offers several extension and customization mechanisms.

┌─────────────────────────────────────────────────────────────────┐
│ CLAUDE CODE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ COMMANDS │ │ AGENTS │ │ SKILLS │ │ RULES │ │
│ │ │ │ │ │ │ │ │ │
│ │ Manual │ │ Auto │ │ Auto │ │ Path- │ │
│ │ invocation│ │delegation │ │activation │ │ based │ │
│ │ /xxx │ │ by Claude │ │ keywords │ │application│ │
│ └───────────┘ └───────────┘ └───────────┘ └───────────┘ │
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ HOOKS │ │ MCP │ │ OUTPUT │ │ TEMPLATES │ │
│ │ │ │ SERVERS │ │ STYLES │ │ │ │
│ │ Pre/Post │ │ │ │ │ │ Specs & │ │
│ │ ToolUse │ │ Extensions│ │ Formatting│ │ Plans │ │
│ └───────────┘ └───────────┘ └───────────┘ └───────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

The 10 key concepts

ConceptDescriptionTrigger
OrchestratorSingle entry point that guides toward the right resources/assistant
CommandsManually invoked instructions/command-name
AgentsAutonomous sub-agents with isolated contextAutomatic delegation
SkillsBehaviors activated by keywordsAutomatic detection
RulesConventions applied by file pathAutomatic based on path
HooksActions before/after tool usePreToolUse / PostToolUse
MCP ServersExtensions via Model Context Protocol.mcp.json configuration
Output StylesResponse formatting styles/output-style name
TemplatesModels for specs, plans and tasks/work:work-specify, /work:work-plan
Advanced FeaturesOpus 4.7, Agent Teams, Plugins, LSPAdvanced configuration

Quick comparison

Commands vs Skills vs Agents

┌────────────────────────────────────────────────────────────────┐
│ │
│ COMMAND SKILL AGENT │
│ ──────── ───── ───── │
│ │
│ /work:work-explore "I want to do Automatic │
│ /dev:dev-tdd TDD" delegation │
│ /qa:qa-security by Claude │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Trigger: │ │ Trigger: │ │ Trigger: │ │
│ │ MANUAL │ │ AUTO │ │ AUTO │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Context: │ │ Context: │ │ Context: │ │
│ │ SHARED │ │ FORK │ │ ISOLATED │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
└────────────────────────────────────────────────────────────────┘
AspectCommandSkillAgent
TriggerManual (/xxx)Auto (keywords)Auto (delegation)
ContextSharedFork (isolated)Isolated
ToolsAllRestrictedRestricted
File.claude/commands/*.md.claude/skills/*/SKILL.md.claude/agents/*.md

File structure

.claude/
├── commands/ # Manual commands
│ ├── work/
│ ├── dev/
│ ├── qa/
│ └── ...
├── agents/ # Autonomous sub-agents
├── skills/ # Auto-triggered skills
│ └── */SKILL.md
├── rules/ # Rules per technology
├── output-styles/ # Output styles
├── templates/ # Spec/plan templates
└── settings.json # Hooks and configuration

Typical workflow

User types: "Run a security audit"


┌─────────────────────────────────────┐
│ Claude analyzes the request │
│ │
│ 1. Skill "security-audit" detected? │──── No ────┐
│ (keywords: security, OWASP) │ │
└─────────────────────────────────────┘ │
│ Yes │
▼ │
┌─────────────────────────────────────┐ │
│ Skill injects security audit │ │
│ instructions │ │
└─────────────────────────────────────┘ │
│ │
▼ ▼
┌─────────────────────────────────────┐ ┌──────────────┐
│ Claude delegates to the │ │ Claude │
│ qa-security agent (isolated context)│ │ responds │
└─────────────────────────────────────┘ │ directly │
│ └──────────────┘

┌─────────────────────────────────────┐
│ Agent runs the audit │
│ (tools: Read, Grep, Glob) │
└─────────────────────────────────────┘


┌─────────────────────────────────────┐
│ Result returned to the │
│ main conversation │
└─────────────────────────────────────┘

Next steps

  1. New to Claude Code? Start with the Orchestrator (/assistant)
  2. Want to understand commands? Read Commands
  3. Want to understand automation? Read Skills and Agents
  4. Customize behavior? Explore Hooks and Rules
  5. Extend capabilities? Discover MCP Servers
  6. Structure your features? Use the Templates

See also