AI Tools

Claude Code for Daily Engineering: A Senior's Playbook

Arpit TripathiArpit TripathiLinkedIn·May 20, 2026·12 min read

How senior engineers actually use Claude Code in 2026. CLAUDE.md, skills, hooks, sub-agents, and the 5 anti-patterns that kill productivity.

It is 11pm. You opened Claude Code three hours ago to ship one PR. You now have a 600-line CLAUDE.md, a context window of regret, and a feature that almost compiles. The verdict after running this tool every day for six months: Claude Code is the highest-leverage engineering tool of 2026, and most senior engineers are using it wrong.

The patterns below come from six months of daily use at MemX and quietly cost real engineers real hours when they get them wrong. Anthropic's own August 2025 internal survey of 132 engineers reported a 67% increase in merged PRs per engineer per day after Claude Code adoption. Dog-fooded number, so treat it as an upper bound, but the direction is honest if you copy the way the people who built the tool actually use it.

Insight

Quick takeaways (as of May 2026): the highest-leverage file in your repo is CLAUDE.md, and it should be under 200 lines. Skills replaced bloated slash-command sprawl in late 2025. Hooks turn fragile advice into deterministic guardrails. Sub-agents save 50 to 70% of tokens when used right and triple your bill when used wrong. The Pragmatic Engineer survey (n≈1,000, fielded Jan 27 to Feb 17, 2026) put Claude Code first at 46%, Cursor second at 19%, GitHub Copilot third at 9% on "AI tool I love most".

Where Claude Code actually is in May 2026

Quick state of the world so the rest of the post makes sense. Editor's note added May 29: this post originally shipped on May 20 with Opus 4.7 as the API default; Opus 4.8 went GA on May 28, 2026 and is now the default for the opus alias. Opus 4.7 is still selectable for stability. Sonnet 4.6 is the default for sonnet and the right pick for headless or CI runs. Haiku 4.5 is the cheap loop option. Subscription pricing: Pro $20 a month, Max 5x $100, Max 20x $200, Team Premium $100 per seat billed annually ($125 monthly) with a five seat minimum. API tokens: Sonnet 4.6 is $3 in and $15 out per million; Opus 4.7 and Opus 4.8 are $5 in and $25 out per million. Heads up: Opus 4.7's new tokenizer can use up to 35% more tokens for the same text, so the per-request bill rises even at unchanged headline prices.

The recent feature timeline matters because it shapes how teams use the tool. Agent Skills launched October 16, 2025. Claude Code on the web launched October 20, 2025. Skills became a public open standard at agentskills.io on December 18, 2025 (Atlassian, Figma, Canva, Stripe, Notion, and Zapier shipped launch skills; OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI, and VS Code adopted the standard). The May 6, 2026 Code with Claude event doubled the 5-hour rate limits on Pro, Max, Team, and seat-based Enterprise, removed peak-hour throttling on Pro and Max, and shipped three Managed Agents features: Dreaming (memory curation between sessions), Outcomes (rubric-driven success grading), and multi-agent orchestration (a lead agent that delegates to up to 20 specialist sub-agents).

The only workflow that matters: explore, plan, implement, verify

Anthropic's official guidance is the same loop every senior engineer ends up running. Explore the relevant code first in read-only mode. Plan the change in Plan Mode (press Shift-Tab twice to enter, Ctrl-G to open the plan in your editor and edit it). Implement. Verify with a test, a build, or a screenshot diff. The loop is boring on purpose. Skipping any step is where careers in autonomous coding go to die.

One variant scales better than anything else. Run writer and reviewer in two separate sessions. One Claude implements the feature with full context. A second Claude, fresh, reviews the diff with no context at all. The reviewer is unbiased because it did not write the code. Same logic as a human code review. Ten minutes. Catches the class of bugs your first session was too invested to see.

Insight

Contrarian take most senior engineers will not say out loud: run BOTH Claude Code AND Cursor. Picking one is a junior mistake. The combined $40 a month is a rounding error compared to the leverage of using each where it wins.

CLAUDE.md: the highest-leverage file in your repo (and the most over-stuffed)

CLAUDE.md is a markdown file at your project root that Claude auto-loads into every session. It loads in a hierarchy: your global file at ~/.claude/CLAUDE.md, then the project root, then ./CLAUDE.local.md (gitignored, your personal overrides), then any child-directory CLAUDE.md files Claude walks into. Pull other files inline with @path/to/file imports. That is how you keep the main file thin.

Anthropic's own diagnostic heuristic is the one to write on a sticky note: if Claude keeps doing something you do not want despite having a rule against it, the file is probably too long and the rule is getting lost. Target under 200 lines. Community consensus stretches that to 300 if you are disciplined.

What belongs in CLAUDE.md

  • Bash commands Claude cannot guess (your test runner, your build, your migration command).
  • Non-default code style (you use tabs, you forbid default exports, you require named props).
  • Branch and PR conventions specific to your team.
  • Architectural decisions that are not obvious from the code.
  • Environment quirks (the dev DB lives in this Docker container, never touch prod).
  • Negative rules. "Never commit .env files." "No class components." Higher value than positive ones.
  • Gotchas. The stuff a new engineer would have discovered three weeks in.

What does not belong

  • Anything Claude could infer by reading the code itself.
  • Standard language conventions (JavaScript uses camelCase, you do not need to say so).
  • API documentation. Link to it instead, do not inline it.
  • File-by-file descriptions. Use @-imports for the few that actually matter.
  • Vague platitudes. "Write clean code" buys you nothing and burns context budget.
  • Anything that changes weekly. That is a hooks problem, not a CLAUDE.md problem.

For monorepos the working pattern is simple. A thin root CLAUDE.md with security, commit conventions, the canonical stack, and pointers down the tree. Then per-package CLAUDE.md files with package-specific rules. Open the session inside the subdirectory relevant to the task. Claude walks up the tree and loads every CLAUDE.md along the path automatically. Scoped context, zero copy-paste.

Skills vs slash commands: the 2026 distinction

Slash commands are control surfaces for the session. /clear, /plan, /rewind, /compact, /init, /permissions, /hooks. They ship with Claude Code or live as user scripts.

Skills are different. A Skill is a directory at .claude/skills/<name>/ with a SKILL.md file containing YAML frontmatter, instructions, and optional scripts or resources. Skills load on demand when Claude judges them relevant. They do not bloat the context of every conversation the way CLAUDE.md does. If you want a skill to fire only when you call it manually with /skill-name, set `disable-model-invocation: true` in the frontmatter. Use that flag for anything expensive or destructive (deploys, schema migrations, posting to Slack).

Mental model: persistent advice goes in CLAUDE.md, domain knowledge or named workflows go in Skills. Most engineers in 2026 have ten or fifteen Skills and a 150-line CLAUDE.md. Two years ago they would have had a 600-line CLAUDE.md and called it a day. The 600-line version is worse.

Hooks: where engineering discipline lives

Hooks run shell commands at lifecycle events: PreToolUse, PostToolUse, SessionStart, Stop, and a handful of others. The key difference from CLAUDE.md is determinism. Exit code 2 from a PreToolUse hook blocks the tool and pipes stderr back to the model. Exit code 2 from a Stop hook forces Claude to keep working. Claude Code sets stop_hook_active=true after the Stop hook fires once and the model would re-enter, so you can detect the loop and exit cleanly inside your script.

Three high-leverage hooks

  • PostToolUse formatter and typechecker. Match Write|Edit|MultiEdit, run prettier --write and tsc --noEmit. Boris Cherny (creator of Claude Code) runs exactly this. It prevents the entire class of "the file looks fine but CI is red" surprises.
  • PreToolUse safety gate. Block writes to /migrations, block rm -rf, block reads of secret files. A single regex saves an entire class of accidents and removes the need for nervous prompt-watching.
  • Stop hook as definition-of-done. Run the test suite at the end of every session. If red, return exit code 2 and Claude keeps going. The verification loop closes without you watching the terminal.

Sub-agents and worktrees: when parallelism pays

Sub-agents run in isolated contexts with their own tool allowlists. You define them as .claude/agents/<name>.md files with YAML frontmatter specifying tools: and model:. Used right, they cut multi-file work 50 to 70%. Used wrong, they triple your bill.

Use sub-agents when the task spans three or more unrelated domains with no shared state and clear file boundaries (frontend, backend, db); when you are doing codebase research and do not want the exploration to pollute your main context; or when you want an adversarial review of a diff in fresh context.

Do not use sub-agents when the work is small and focused; when the steps are sequential and each one depends on the last; or when you are tempted to run "plan, code, test, review, commit" as five separate agents. Every handoff loses the context the next one needs. One agent doing all five wins.

Worktrees are the underrated complement. Boris Cherny ships 20 to 30 PRs a day by spinning up three to five git worktrees, each running its own Claude Code session in numbered terminal tabs, and pairing those with five to ten more sessions on claude.ai in his browser. The 2026 baseline for senior engineers is four to eight concurrent worktrees per day. Each one is a contained experiment. Most get thrown away. The ones that survive get merged.

Claude Code vs Cursor vs Cline vs Aider in 2026

Honest scorecard, drawn from running more than one of these every day.

ToolDefault modelPricingWhere it wins
Claude CodeOpus 4.8 / Sonnet 4.6$20 to $200/moMigrations, large refactors, autonomous multi-file work
Cursor 3.0Anthropic + OpenAI mix$20/mo ProDaily editing, tab-complete, greenfield features
ClineBYOK (10+ providers)Free + API costsVS Code native, auto-routes to cheapest capable model
AiderBYOKFree + API costsGit-first workflow, ~4.2x fewer tokens on diff-heavy work

The data points worth knowing: Claude Code uses around 5.5x fewer tokens than Cursor on identical high-complexity tasks (a benchmark that ate 188k tokens in Cursor's agent finished in 33k in Claude Code), but Cursor delivers about 42 accuracy-points-per-dollar on simple utility code versus Claude Code's about 31. On complex multi-file work the ratio flips: Claude Code 8.5, Cursor 6.2. Aider is the credible open-source pick if BYOK matters or you want a git-aware workflow over an agent runtime. Cline is the right answer if you live in VS Code and care about auto-routing to the cheapest capable model per task.

Five anti-patterns that wreck productivity

  • Kitchen-sink session. Three unrelated tasks piling into one context. Fix: /clear between tasks, every time.
  • Correcting over and over. After two failed corrections the context is poisoned with the failed approaches. Fix: /clear, write a better prompt that bakes in what you learned.
  • Bloated CLAUDE.md. Claude starts ignoring rules when the file is too long. Fix: prune ruthlessly, convert hard rules to hooks, push domain knowledge into Skills.
  • Trust-then-verify gap. Shipping plausible-looking code that does not handle edge cases. Fix: always give Claude something it can run to verify itself (test, build, screenshot).
  • Infinite exploration. "Investigate X" with no scope. Claude reads hundreds of files and fills context. Fix: scope tightly, or delegate to a sub-agent with a token budget.

A sixth anti-pattern worth flagging because it shows up in the news: running unattended without permission limits. The "someone left Claude Code running overnight and it cost $6,000" Reddit story is real. The root cause was a 30-minute looping update check against an 800k-token conversation that re-cached 48 times a day after Anthropic silently cut prompt-cache TTL from one hour to five minutes. Hard limits beat hope.

Even when limits are set, models drift. The screenshot-worthy data point of 2026: AMD's Stella Laurenzo, Senior Director in the AI group, instrumented 6,852 Claude Code sessions and 234,760 tool calls, then published the telemetry on April 2, 2026. Median reasoning depth fell about 73%, from roughly 2,200 characters down to 600, and the model's habit of reading files before editing them dropped over 70%. Anthropic confirmed two changes: an "adaptive thinking" mechanism shipped February 9, and the default thinking level flipping from high to medium on March 3. Lesson: pin your thinking level and keep your own telemetry.

A senior's 30-day adoption plan

  • Week 1: write the CLAUDE.md. Aim for 150 lines, max 200. Use /init to bootstrap.
  • Week 2: add three hooks (formatter, safety gate, test runner on Stop). Watch a whole class of mistakes vanish.
  • Week 3: write two Skills. Pick the two workflows you do every day and codify them.
  • Week 4: try parallel worktrees on a real task. Pick a refactor with clear file boundaries. Run two Claudes side by side and merge the better diff.
Insight

Five commands to memorise today: /clear (reset between tasks), /plan or Shift-Tab twice (read-only exploration), /rewind or Esc-Esc (restore checkpoint), /compact [focus] (compress history with a hint), /btw (side-question overlay that does not enter history).

Insight

Key takeaway: Claude Code rewards discipline, not cleverness. The teams winning with it have short CLAUDE.md files, three hooks, a handful of Skills, and a /clear habit. The teams losing have a 600-line CLAUDE.md and no verification loop. Pick the discipline.

Frequently Asked Questions
01What is the difference between CLAUDE.md and Agent Skills?

CLAUDE.md loads into every session and costs context budget on every turn. Skills load on demand when Claude judges them relevant, so they do not bloat normal conversation. Persistent rules and conventions go in CLAUDE.md. Named workflows and domain knowledge go in Skills.

02How long should my CLAUDE.md be?

Under 200 lines. Anthropic's own diagnostic: if Claude keeps doing something you told it not to, the file is probably too long and the rule is getting lost. Use @-imports to pull supporting files in only when relevant.

03Is Claude Code better than Cursor in 2026?

They win at different things. Claude Code is stronger on multi-file refactors and migrations. Cursor is stronger on daily editing and tab-complete. Most senior engineers run both. The Pragmatic Engineer early-2026 survey (fielded Jan 27 to Feb 17, 2026) put Claude Code first at 46%, Cursor second at 19%, and GitHub Copilot third at 9% on "AI tool I love most".

04What is the best use of Claude Code hooks?

Run a formatter and typechecker on PostToolUse, block dangerous file writes on PreToolUse, and run your test suite on Stop with exit code 2 forcing Claude to keep going. Those three remove most of the surprises that ship to CI.

05How do I stop Claude Code from burning my budget?

Set permission limits per session, never run unattended without a timeout, use /clear between tasks so context does not grow forever, and delegate long exploration to a sub-agent with a tight scope. The $6,000 overnight stories are real, and they all start with no limits set.

06Which model should I use inside Claude Code?

As of May 2026, Opus 4.8 is the API default for opus and the best pick for hard reasoning and multi-file refactors; Opus 4.7 is still selectable if you want stability. Sonnet 4.6 is the right default for daily editing, headless runs, and CI. Haiku 4.5 is the cheap option for loops and bulk work.

Read Next

Or try MemX to access 40+ AI models in one place — including Claude Sonnet 4.6 and GPT-5.4 — and get your questions answered today.

Was this article helpful?

Found this useful? Share it with someone who needs it.

Free · iOS, Android & WhatsApp

Stop losing what you save.
Let MemX remember it for you.

Every screenshot, photo, PDF and voice note — captured, encrypted, and instantly searchable. Ask in plain English, get the answer in seconds.

  • Reads text inside images and handwriting
  • Private and encrypted by default
  • Free to start, no credit card

Takes under a minute to set up. Your data stays yours.

Arpit Tripathi
Written by
Arpit TripathiLinkedIn

Founder of MemX. Ex-Google Staff Tech Lead Manager, ex-AWS Senior SDE (Elastic Block Store). Writes about practical AI on the MemX blog.

Keep reading

More guides for AI-powered students.