Claude Code: Applying Anthropic’s 5 Principles with an 8‑Point Checklist

This article dissects Claude Code’s architecture—its atomic toolset, three built‑in subagents, hook system, skill structure, MCP integration, and CLAUDE.md contract—using an eight‑point checklist to show how Anthropic translates five design principles into concrete, observable engineering decisions.

AI Digital Ideal
AI Digital Ideal
AI Digital Ideal
Claude Code: Applying Anthropic’s 5 Principles with an 8‑Point Checklist

Built‑in toolset

Claude Code ships with seven atomic tools that illustrate the decision matrix for tool granularity:

Read – read a file – high‑frequency stable → atomization

Write – write a new file – high‑frequency stable → atomization

Edit – precisely edit a file – high‑frequency stable → atomization

Glob – find files by pattern – high‑frequency stable → atomization

Grep – search file contents – high‑frequency stable → atomization

Bash – run any shell command – long‑tail operations → Bash fallback

Agent (old Task) – spawn Subagent – task isolation → Subagent

Design observation 1: Read/Write/Edit/Glob/Grep are high‑frequency stable actions used thousands of times per day; each tool does one thing and has a very specific description, matching the principle “description decides everything”.
Design observation 2: Bash is retained as a universal fallback for long‑tail operations (tests, dependency installs, git push, any shell tool). Atomizing every possible command is impossible; providing a single Bash tool lets the model compose commands as needed, following the decision matrix rule “long‑tail → Bash”.

The seven built‑in tools cover roughly 90 % of development tasks; the remaining 10 % are handled by Bash + MCP.

Subagents

Explore Subagent

// Configuration extracted from the official source
// - skip CLAUDE.md
// - skip parent session git status
// - tool set: Read / Glob / Grep (read‑only)
Design observation 3: Skipping CLAUDE.md saves tokens and speeds execution. This aligns with the principle “context scarcity” because loading the whole project handbook for a temporary worker would waste token budget and slow the model.

Plan Subagent

Design observation 4: Plan is almost identical to Explore (read‑only, skips CLAUDE.md) but has a different prompt description (“plan a solution”). Keeping separate descriptions prevents mismatches because the model selects the subagent based on the description, satisfying the principle “description decides everything”.

General‑purpose Subagent

Design observation 5: General‑purpose mirrors the main agent (full tool set, full model) and exists to provide single‑shot isolation: a complex task can run in a fresh context and return a single text result, reflecting the core value of context isolation.

Checklist comparison for Subagents

Dynamic tool calls cannot be replaced by a static workflow – ✓

Abstractions are implicit to the model – ✓

Compaction + Truncation + Subagent isolation keep the main context under 80 % budget – ✓

Descriptions focus on “when to use me” – ✓

Hook system

Claude Code places a “write Hook” skill under plugins/plugin-dev/. Hooks are intended as an advanced extension point, not a default behavior.

PreToolUse – audit logs, dangerous command interception – principle 5 “reversibility first”.

PostToolUse – result sanitization, auto‑formatting – principle 2 “model transparency”.

UserPromptSubmit – add timestamp, project context – principle 3 “context scarcity”.

PermissionRequest – dynamic authorization based on command mode – principle 5.

Design observation 7: All official examples treat hooks as handling exceptions (logging, sensitive‑info filtering, dynamic auth) rather than rewriting core rules, exactly as the principle “hooks handle exceptions” prescribes.

Skill system – progressive disclosure

The directory plugins/plugin-dev/skills/ contains built‑in skills such as agent-development/ and command-development/. A representative skill layout:

agent-development/
├── SKILL.md                # navigation + when‑to‑use
└── references/
    ├── system-prompt-design.md   # six prompt modes
    └── agent-creation-system-prompt.md  # full system‑prompt example
Design observation 8: SKILL.md acts as a short menu (what scenario, brief summary); references/ holds the detailed documentation loaded on demand. This implements the decision‑matrix rule “knowledge injection → Skill”.

Typical skill description:

description: Use this skill when designing or reviewing agent system prompts...
Design observation 9: Descriptions focus on “when to use” and do not list “what to do, how to do, cautions”. This avoids description bloat and follows the principle that the description should be a menu, not a recipe.

MCP integration – standard‑first

.mcp.json

– project‑level configuration ~/.claude.json – user‑level configuration

CLI command:

claude mcp add
Design observation 10: Claude Code does not invent its own protocol; it directly adopts the existing MCP protocol. This follows the “use existing standards” rule and allows third‑party MCP servers to integrate seamlessly.

CLAUDE.md – minimal project contract

# Example project CLAUDE.md
- Use pnpm, not npm
- Test with pnpm test
- Follow conventional commits
- API style: REST + JSON, snake_case for fields
Design observation 11: CLAUDE.md is intentionally short (under 100 lines) and contains only foundational conventions. Detailed knowledge is placed in Skills, keeping the token budget low and avoiding a bloated project contract.

Permission modes – reversibility‑first layering

default – irreversible, strict – daily development (file edit, Bash)

acceptEdits – reversible via git rollback – trust Claude to edit files but be cautious with Bash

plan – read‑only, naturally reversible – planning / analysis / code understanding

auto – batch audit of background commands – optimizing long‑running tasks

dontAsk – auto‑reject – disallow any privileged action

bypassPermissions – skip all safety checks – isolated CI/Docker environment

Design observation 12: The six modes are ordered by reversibility, not by user‑friendliness or complexity, embodying the principle that permission design is driven first by how irreversible an operation is.

Eight‑point checklist scoring

Dynamic tool calls cannot be replaced by a workflow – ✓

Abstractions are implicit to the model – ✓

Main context stays under 80 % budget via compaction, truncation, subagent isolation – ✓

Descriptions are concise and scenario‑focused – ✓

Irreversible actions have permission prompts – ✓

No unused components – ✓

Subagents are used in high‑frequency scenarios – ✓

Skill descriptions are menu‑style – ✓

Hooks handle exceptions only – ✓

No deviation from existing standards (MCP, compaction, permission) – ✓

Reusable design patterns derived from Claude Code

Dual‑layer architecture: a small built‑in toolset (~90 % coverage) plus MCP for the long‑tail.

Layered Subagent matching: lightweight Explore/Plan for frequent read‑only work and a heavyweight general‑purpose for complex tasks.

Reversibility‑first permission layering: modes ordered by how easily an action can be rolled back.

Three‑layer context protection: compaction + truncation + subagent isolation to keep token usage safe.

Progressive disclosure directory: SKILL.md (menu) → references/ (details) → scripts/ (executable), each with its own loading strategy.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AI agentsMCPhooksdesign principlesskill systemtool architecture
AI Digital Ideal
Written by

AI Digital Ideal

Express ideas with code, expand imagination with AI.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.