Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Choose the Right Claude Code Primitive

Claude Code gives you a ladder of mechanisms. The effective move is to use the lowest rung that solves the problem, then add bounds and verification when autonomy increases. This table is the fast path through that choice.

NeedReach forAvoid
One-off direction in the current conversationA promptPermanent config for temporary intent
Persistent project conventionCLAUDE.mdRepeating the same chat instruction every session
Path-specific convention.claude/rules/A global rule that only applies to one directory
Reusable knowledge or workflowA skillLong pasted prompts or a custom agent for one procedure
Harness-level operationA slash commandAsking Claude to guess state the harness can measure
Hard guarantee before or after tool useA hook or permission rule“Please always…” instructions
Isolated research or planningA subagentPolluting the main context with side-quest output
External system accessAn MCP serverCopy-pasting live system data into chat
Repeatable non-interactive workHeadless modeAn interactive session nobody is watching
Parallel work in one repositoryGit worktreesMultiple sessions fighting over one checkout
Many independent agents with coordination needsAn agent teamA team when one session plus subagents is enough
Recurring unattended workA scheduled routineManual reminders or an immortal chat session

The decision is not about which primitive is most powerful. It is about which property the step needs: memory, reuse, enforcement, isolation, external access, unattended execution, or coordination. When the primitive matches the property, the workflow stays small enough to understand and strong enough to trust.