Aller au contenu principal

Architecture

claude-base is composed of several types of components that work together to help you be more productive.

Overview

File structure

claude-base/
├── .claude/
│ ├── commands/ # <!-- count:commands -->131<!-- /count --> manual commands (/name)
│ │ ├── work/ # Main workflow
│ │ ├── dev/ # Development
│ │ ├── qa/ # Quality
│ │ ├── ops/ # Operations
│ │ ├── doc/ # Documentation
│ │ ├── biz/ # Business
│ │ ├── growth/ # Growth
│ │ ├── data/ # Data
│ │ └── legal/ # Legal
│ ├── agents/ # <!-- count:agents -->63<!-- /count --> autonomous sub-agents
│ ├── skills/ # <!-- count:skills -->54<!-- /count --> auto-triggered skills
│ ├── rules/ # <!-- count:rules -->30<!-- /count --> rules per technology
│ ├── templates/ # Spec/plan templates
│ ├── output-styles/ # Output styles
│ └── settings.json # Configuration and hooks
├── CLAUDE.md # Main instructions
└── .mcp.json # MCP servers configuration

Main components

Commands (131)

Commands are instructions triggered manually with /name.

Characteristics:

  • Manual and explicit triggering
  • Context shared with the conversation
  • All tools available
  • .md files in .claude/commands/

Example:

/work:work-explore
/dev:dev-tdd "Implement the user service"
/qa:qa-security

Agents (63)

Agents are autonomous sub-agents with an isolated context.

Characteristics:

  • Automatic triggering by delegation
  • Isolated context (does not pollute the conversation)
  • Restricted tools (read-only for some)
  • Specific model (haiku or sonnet)

Delegation example:

"Run a security audit" → Claude delegates to the qa-security agent (sonnet)
"Explore the auth code" → Claude delegates to the work-explore agent (haiku)

Skills (54)

Skills are auto-triggered by keywords in the conversation.

Characteristics:

  • Automatic triggering on keywords
  • Forked (isolated) or shared context
  • Restricted tools via allowed-tools
  • SKILL.md files in .claude/skills/

Triggering example:

"I want to do TDD" → test-driven-development skill activated
"Make a commit" → generating-commit-messages skill activated

Rules (30)

Rules are rules applied by file path.

Characteristics:

  • Automatic application based on the file
  • Specific paths (e.g., **/*.tsx, **/api/**)
  • Code conventions per technology

Example:

---
paths:
- "**/*.ts"
- "**/*.tsx"
---
# TypeScript rules applied to these files

Comparison

AspectCommandsAgentsSkills
DeclenchementManuel (/nom)Automatique (delegation)Automatique (mots-cles)
ContextePartageIsoleFork ou partage
ModeleHerite du parentHaiku ou SonnetHerite du parent
OutilsTous disponiblesRestreintsRestreints (allowed-tools)
Cas d'usageActions explicitesTaches autonomesDeclenchement contextuel
Nombre1316354

When to use what?

Use a Command when:

  • You want an explicit and controlled action
  • You need all the tools
  • The conversation context is important

Use an Agent when:

  • The task can be autonomous
  • You want to isolate the context
  • The task is standardized (audit, exploration)

Use a Skill when:

  • The action is recurring and contextual
  • The keywords are specific
  • You want automatic triggering

Models used

ModelUsageAgents
HaikuFast, economical taskswork-explore, doc-onboard, wcag-audit
SonnetComplex tasks, analysesqa-security, qa-audit, dev-debug
OpusMaximum capabilities(Not used by default)

Hooks and automations

The .claude/settings.json file configures automatic hooks:

{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"command": "scripts/validate.sh protect-main"
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"command": "scripts/validate.sh auto-format $FILE_PATH"
}
]
}
}

Available hooks:

  • Main protection: Blocks modifications on main/master
  • Auto-format: Prettier on TS/JS files
  • Type-check: TypeScript verification
  • Auto-install: npm install after modification of package.json

MCP configuration

The .mcp.json file configures MCP (Model Context Protocol) servers:

{
"mcpServers": {
"filesystem": { "enabled": false },
"memory": { "enabled": false },
"github": { "enabled": false }
}
}

Enable the servers as needed to extend Claude's capabilities.

Next steps