Claude Code Operational Patterns
The handful of Claude Code features that quietly turn a useful coding assistant into a real engineering teammate — plan mode, slash commands, hooks, subagents.
11 min read
There's a version of Claude Code that's "AI autocomplete with a chat window." There's another version where it's a junior engineer who knows your codebase, follows your conventions, and asks before doing anything dangerous. The difference is roughly five configuration choices.
1. Plan mode for anything non-trivial
Plan mode is the single biggest behavior change available. Instead of executing immediately, Claude drafts an implementation plan, surfaces choices that warrant your input, writes the plan to a file, and waits for explicit approval before touching code.
The pattern that works:
- Open the conversation with the task.
- Add: "Use plan mode. Ask 2–3 clarifying questions if anything is genuinely ambiguous, then write the plan."
- Review the plan in the file. Edit it directly if needed.
- Approve.
2. Slash commands for the work you repeat
Anything you've explained twice belongs in a slash command. Conventions, deploy steps, code review templates, "ship this PR" workflows — all of it. The win isn't speed of typing; it's the elimination of which version of the prompt did I use last time?
A useful starter set:
/ship— formats the diff, writes the PR description, opens the PR/review— runs an opinionated review with the project's known pitfalls/playbook <name>— loads a project-specific operating doc into context/recover— rolls back to the last clean state when an iteration goes sideways
3. Hooks for the safety net
Hooks let the harness intercept tool calls — perfect for blocking destructive commands in production directories, auto-formatting after edits, or running typecheck on every save. They run outside of Claude's decision loop, so they aren't subject to "the model decided not to."
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "scripts/block-destructive.sh" }
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "pnpm format" }
]
}
]
}
}The hook is just a shell script. It can exit non-zero to block the call, write a message to stderr to tell the model why, or modify the input. This is where you encode the rules that should be enforced, not negotiated.
4. Subagents for context isolation
Subagents are the most underused feature. They're independent agent instances spawned by the main conversation — full tool access, but their work product comes back as a single message, so they don't pollute the main context window.
Use them for:
- Searches that span the codebase ("find every place we read from the SQS queue"). The subagent reads dozens of files; you get a clean summary.
- Independent reviews ("look at this migration with fresh eyes — am I missing a race condition?"). No anchoring bias.
- Parallel work — kick off three subagents at once for genuinely independent investigations.
5. CLAUDE.md as the project's onboarding doc
CLAUDE.md is read at the start of every session. Treat it the way you'd treat the README for a new hire on their first day:
- The why — what is this codebase trying to be?
- The commands — how do I run, build, test?
- The non-obvious — anything a thoughtful engineer would still get wrong without context.
- The pointers — where to find deeper docs (PRDs, runbooks, the gnarly bits).
What does NOT go in CLAUDE.md: things derivable from git log, things obvious from reading one file, generic platitudes ("write good code"), or anything that would rot in a week.
What "operational" actually means here
The pattern across all five: stop using Claude Code as a smarter autocomplete. Start using it like a teammate you've onboarded. Plan mode is the kickoff meeting. Slash commands are the team conventions. Hooks are the CI guardrails. Subagents are the focused contributors. CLAUDE.md is the wiki. Each one is a small investment that pays compound interest across every future session.
The trap is treating these as "advanced features for later." They're the difference between a chat window and a workflow.