Claude Code PR automation: babysit to green
Set up Claude Code PR automation that takes pull requests from red to green: diagnose CI failures, answer review threads, and escalate on cue.
Technical writing on building, securing and operating systems with Claude.
20 articles published
Set up Claude Code PR automation that takes pull requests from red to green: diagnose CI failures, answer review threads, and escalate on cue.
Scope Claude Code to the slice of your monorepo a task touches: layered CLAUDE.md files, path-scoped rules, sibling grants, and cheaper search.
Turn CLAUDE.md best practices into a contract: few verifiable clauses, path-scoped rules, hooks for hard limits, and a repeatable adherence audit.
Treat Claude Code context window management as a performance budget: profile with /context, cut MCP overhead, and spend tokens on real work.
Learn when to interrupt Claude Code, when to rewind, and when to reset. A cost-ordered framework for corrections that compound with context depth.
Decide when to use plan mode vs subagents in Claude Code with an escalation ladder that prices every rung, from hand edits to headless fan-out.
Build structured incident response runbooks as Claude Code skills that check service health, gather logs, and suggest root causes.
Build JWT auth, rate limiting, input sanitization, and CORS middleware using security-first Claude Code prompts mapped to OWASP API risks.
Choose the right Claude Code extension point with one question: does the harness execute it, or does the model interpret it? Includes three migrations.
Run Claude Code headless in CI pipelines and cron jobs with JSON output, deny-by-default permissions, and bounded cost. Includes three full recipes.
Turn advisory CLAUDE.md rules into Claude Code hooks that block dangerous commands, verify every edit, and reload state after compaction.
Turn Claude Code OpenTelemetry metrics and local JSONL transcripts into cost-per-task, interrupt-rate, and permission-friction data you act on.
Run parallel Claude Code sessions in git worktrees: split work by ownership, freeze contracts first, and merge branches in dependency order.
Interrogate Claude Code plan mode output before approving. Covers plan anatomy, iteration prompts, a caught-assumption case, and when to skip planning.
Stop rubber-stamping giant diffs. Review AI-generated code with five layers: plans, tests, staged commits, adversarial sessions, and human eyes.
Copy three Claude Code prompt templates for bug fixes, features, and refactors, plus the four spec slots that let tasks land on the first pass.
Use Claude Code subagents as context firewalls. Three patterns that keep test output, search noise, and review bias out of your main thread.
Learn what Claude Code auto-compact actually drops, why sessions degrade after compaction, and the disk-first workflow that makes resets free.
Understand the single API contract behind every Claude tool call — and how Claude Code's built-in tools, permissions, and agentic loop all connect to the same primitive.
Stop being your agent's test runner. Build Claude Code verification loops with TDD harnesses, Stop hooks, /goal, and fresh-context review.
Nothing in this pillar yet.