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
| Concept | Description | Trigger |
|---|---|---|
| Orchestrator | Single entry point that guides toward the right resources | /assistant |
| Commands | Manually invoked instructions | /command-name |
| Agents | Autonomous sub-agents with isolated context | Automatic delegation |
| Skills | Behaviors activated by keywords | Automatic detection |
| Rules | Conventions applied by file path | Automatic based on path |
| Hooks | Actions before/after tool use | PreToolUse / PostToolUse |
| MCP Servers | Extensions via Model Context Protocol | .mcp.json configuration |
| Output Styles | Response formatting styles | /output-style name |
| Templates | Models for specs, plans and tasks | /work:work-specify, /work:work-plan |
| Advanced Features | Opus 4.7, Agent Teams, Plugins, LSP | Advanced 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 │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
└────────────────────────────────────────────────────────────────┘
| Aspect | Command | Skill | Agent |
|---|---|---|---|
| Trigger | Manual (/xxx) | Auto (keywords) | Auto (delegation) |
| Context | Shared | Fork (isolated) | Isolated |
| Tools | All | Restricted | Restricted |
| 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
- New to Claude Code? Start with the Orchestrator (
/assistant) - Want to understand commands? Read Commands
- Want to understand automation? Read Skills and Agents
- Customize behavior? Explore Hooks and Rules
- Extend capabilities? Discover MCP Servers
- Structure your features? Use the Templates
See also
- Installation - Install claude-base
- Architecture - claude-base architecture
- Quick Start - Get started quickly