How I Claude

I've been using Claude code since April of 2025, shortly after it was released and before the hype around vibe coding sky-rocketed it into the zeitgeist. It's a powerful harness, and comes with the best coding model on the market today right in the box.

Session and context management

Disable compression by default. Compression is the enemy. It's unpredictable, slow, and post-compression sessions always seem to go awry. Instead, I prefer to start a new session once Claude is approaching the "dumb zone".

I use planning mode, and a custom /plan skill liberally. Planning mode is handy for small-ish tasks, where I'm confident that Claude can plan and implement within one context window (while staying out of the dumb zone). My custom plan command uses a plan template, which I'm still tweaking. I find that having a consistent plan structure helps me review those plans. It also gives me a place to inject some pre-defined instructions e.g. validation rules, progress tracking, telling Claude to log it's learnings, and shaping large bets into multiple PRs.

I also have a custom statusbar which shows context usage, amongst other useful data (like which repo I'm in, which branch I'm on). This helps me keep an eye on the session and make judgement calls about when to pull the rip cord and move to a fresh session. It's also handy for wayfinding when I'm running multiple Claude sessions in parallel.

After many iterations, frustrations, and learnings. I keep my baseline Claude setup pretty minimal. I disable all MCP servers by default and only include commands and skills via a plugin that I maintain locally, installed from a local path marketplace. This allows me to manage the context window for each session. If I need Sentry's MCP I'll enable it for that session, rather than carrying the context around unnecessarily where I usually do not need it.

Permissions and security

I keep a pretty long list of disallowed commands in my user-scoped Claude settings.json, this is a first line of defense against a set of commands that I don't want Claude running. This includes limiting Claude's access to env vars, disallowing curl, and preventing ssh, amongst other things.

I also often run Claude in a sandbox environment, this is the only place I'll use auto mode, or invoke claude with the aptly named --dangerously-skip-permissions. The sandbox is a lima VM, running on my host machine only receives credentials to connect to my anthropic account - there are no other API keys in the sandbox, Claude has web access but cannot perform any write actions in this environment. I push a git worktree into the sandbox, allow claude to do it's thing, then pull the worktree down to the host for review before I push the branch to GitHub.

Outside of the sandbox, I also have two PreToolUse hooks which act as guardrails to:

  1. Prevent destructive git actions (e.g. no git reset --hard)
  2. Disallow github write actions like commenting, opening PRs, or otherwise modify GitHub state without my involvement.

This may all sound a little paranoid, but since Claude is using my credentials, I am accountable for anything that it does with them. I prefer to be pretty aggressive about disallowing potentially dangerous commands, rather than have to apologize for some rogue agent commenting on GitHub as me.

Loop engineering

Recently, I have been further automating my Claude usage by running a deterministic loop that orchestrates Claude sessions for me. I'll write more about this in the future, for now it's pretty experimental but I think it's the next evolution in how I think about and use agentic coding tools.