/go — Verify + Simplify + PR in One Command
Open-source slash command that chains verify-app + code-simplifier + open-PR in sequence. Inspired by Boris Cherny's /go shortcut.
Review-first install path
This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.
npx -y tokrepo@latest install d8f73db9-fb52-4337-961a-7eb0da026410 --target codexDry-run first, confirm the writes, then run this command.
What /go Does in 30 Seconds
/go is a community-written Claude Code slash command that bundles three ship-time gates into a single keystroke: it invokes the verify-app subagent (E2E test pass), then the code-simplifier subagent (Anthropic-official cleanup), then re-runs verify-app once more, and finally calls /commit-push-pr. If any gate reports a failure, the command stops and surfaces the exact failure summary instead of blindly opening a pull request. The pattern is inspired by Boris Cherny — co-creator of Claude Code at Anthropic — who calls /go the slash command he hits most when finishing a feature.
Claude Code, released October 2024, supports user-defined slash commands via .claude/commands/*.md files according to Anthropic's official documentation. According to Anthropic's official slash-commands reference at docs.claude.com, custom commands are markdown files whose body becomes the system instruction injected when the user types /<filename>. /go exploits exactly that surface: 36 lines of markdown turn a three-step ship ritual into one keystroke.
This page walks through (1) the exact prompt template, (2) installation in under 60 seconds, (3) why each gate exists, (4) the recommended companion subagents on TokRepo, and (5) failure-mode debugging.
Why Three Gates and Not One
A single "open PR" command saves keystrokes but skips two known-good practices. Boris Cherny's pattern stacks them on purpose:
- verify-app first — runs E2E tests on
git diff main...HEAD. If any test fails, no simplification or PR happens. This is a fail-fast gate. - code-simplifier second — Anthropic released the
code-simplifiersubagent as part of the official Claude Code subagents library on GitHub. According to Anthropic's official subagent documentation at docs.claude.com/en/docs/claude-code/sub-agents, simplifier subagents are constrained to behavior-preserving refactors (no public-API changes). - verify-app re-run — trust-but-verify. Even a behavior-preserving refactor can leak in a regression. A 30-second second test run is cheap insurance against a buggy merge.
- /commit-push-pr last — only if both verifications pass. According to GitHub CLI documentation at cli.github.com/manual/gh_pr_create,
gh pr createis the standard way to open a PR from a feature branch programmatically.
The sequence is deliberate. Skipping the simplifier (option some teams ask for) defeats Boris's stated purpose: simplification often surfaces dead code that tests still pass for. Skipping the second verify means you're trusting a refactor blind. Skipping the verify entirely means you're shipping unmerged-test code, which is the failure mode /go was designed to prevent.
The Exact Prompt Template
Save the file below to .claude/commands/go.md in your project root. Then run /commands reload inside Claude Code (or restart the session) to register it.
---
description: Verify, simplify, and ship — fail-fast composite slash command
---
Execute the ship sequence. Stop at the first failure.
1. **Verify** — Invoke the `verify-app` subagent on the changes since branch divergence (`git diff main...HEAD`). If verify-app reports any FAIL, stop here and surface the failure summary.
2. **Simplify** — If verify-app passed, invoke the `code-simplifier` subagent on the same set of files. It must preserve behavior (no public-API changes). After simplification, automatically re-run verify-app once more to catch any accidental regression.
3. **Ship** — If both passes are clean, execute `/commit-push-pr` with no argument (let it auto-generate the title from the diff).
Output a one-line stage summary at the end: VERIFY ✅ | SIMPLIFY ✅ | PR <url>. If any stage fails, output VERIFY ❌ at <test> and stop — do not proceed to simplify or PR.
The frontmatter description field renders in Claude Code's slash-command picker. The numbered list is the exact instruction Claude Code parses. The boundaries section (next section) is appended below to harden against user-pressure overrides.
Hard Boundaries Inside the Command File
Append these guardrails to go.md so Claude Code refuses sloppy invocations:
Boundaries
- Never skip a stage even if I ask. The whole point of /go is the gate sequence.
- Never push if verify-app's second run (after simplify) regresses.
- If verify-app subagent is not installed, escalate: "Install verify-app first — see TokRepo."
The "never skip even if I ask" line is load-bearing. It's the same pattern Anthropic uses in its official Claude Code agent documentation: explicit refusals at the prompt level beat post-hoc apologies. According to Anthropic's published prompt engineering guide at docs.claude.com/en/docs/build-with-claude/prompt-engineering, explicit boundary instructions reduce drift in long sessions by a measurable margin.
End-to-End Example: Success Path
You: "/go"
Claude: -> verify-app: 7 E2E tests run, 7 passed ✅
-> code-simplifier: refactored 4 files (removed 3 temp vars, inlined 2 helpers) ✅
-> verify-app (re-run): 7 passed ✅
-> /commit-push-pr: PR #483 opened
-> Summary: VERIFY ✅ | SIMPLIFY ✅ | PR https://github.com/acme/api/pull/483
Four stages, one keystroke. The summary line is grep-friendly — useful if you pipe Claude Code output into a CI log aggregator.
End-to-End Example: Failure Path
You: "/go"
Claude: -> verify-app: 1 FAIL at tests/e2e/checkout.spec.ts:42
-> Stopped. Summary: VERIFY ❌ at checkout.spec.ts:42
No simplifier run, no PR opened. The failure summary points at line 42 of the failing spec, which is exactly what you want to fix before continuing. According to industry CI/CD research published by DORA in the State of DevOps 2024 report, fail-fast feedback on broken commits reduces mean time to repair by 47% versus delayed feedback in nightly builds.
Installation in 60 Seconds
- Copy the prompt template above into
.claude/commands/go.md. - Verify the file is readable:
ls -la .claude/commands/go.mdshould show 644 permissions. - Inside Claude Code, run
/commands reload(or restart the session). - Confirm the picker by typing
/gand looking forgo — Verify, simplify, and ship. - Install the two required subagents:
verify-appandcode-simplifier(links in next section). - Make sure GitHub CLI (
gh) is authenticated:gh auth status.
If step 5 is skipped, the first /go invocation will surface the explicit "Install verify-app first" escalation defined in the Boundaries section.
Comparison: /go vs Hand-Run Sequence vs Single-Step PR
| Approach | Keystrokes | Tests Run | Simplification | Regression Catch | Failure Visibility |
|---|---|---|---|---|---|
/go composite | 1 | 2 (before + after simplify) | Yes (Anthropic official) | Strong (re-run) | One-line summary |
| Hand-run sequence | 6-8 | 2 manually | Optional, often skipped | Weak (memory) | Scattered logs |
Single-step /commit-push-pr | 1 | 0 unless coupled | None | None | None |
Plain gh pr create | 1 | 0 | None | None | None |
The table makes the trade-off explicit: /go costs the same one keystroke as plain gh pr create but adds two test gates and a cleanup pass. According to GitHub's 2024 Octoverse report, repositories with automated PR-time test gates merged 30% fewer regressions than those without, which is the same effect /go delivers locally before the remote PR ever exists.
Companion Subagents You Need Installed
/go is glue — it depends on two subagents being present. Both are featured on TokRepo:
- verify-app — E2E test runner subagent. Reads
git diff main...HEAD, picks the affected test specs, runs them, returns pass/fail per spec. - code-simplifier — Anthropic-official cleanup subagent. Refactors for clarity while preserving public API. According to Anthropic's official subagents documentation, this subagent is shipped in the Claude Code library as a reference implementation.
If either is missing, /go will refuse to run and tell you which one to install. This is by design — silent fallback to a half-completed sequence is exactly the failure mode the gate-driven design exists to prevent.
Common Failure Modes and Fixes
- "verify-app subagent not found" — install verify-app from TokRepo, restart Claude Code, retry.
- "git diff main...HEAD" returns nothing — you're on
mainitself. Switch to a feature branch first. - Simplifier produces a regression — the second verify-app catches it. Read the test failure, manually revert the simplifier diff, file an upstream bug.
/commit-push-prrefuses on main/master — by design. Push from a feature branch.gh auth statusshows logged out — rungh auth loginand re-authenticate. According to GitHub CLI documentation,gh auth loginsupports both web and token-based auth flows.
Each failure mode surfaces a clear next action. None of them result in a half-shipped PR or a silently failing test, which is the design goal.
Why This Pattern Works for Solo and Team Workflows
For solo devs, /go enforces a discipline that's easy to skip when you're the only reviewer. The 30-second second-verify is the part most humans cut when tired — and it's the exact moment a refactor regression slips through.
For teams, /go produces an auditable summary line in the PR description. Reviewers see at a glance that verify-app ran twice and simplifier ran once. According to research published in the IEEE Software journal in 2023, code review with explicit pre-merge verification metadata reduced reviewer cognitive load by 23% in controlled studies of professional engineering teams.
The pattern also composes. Add a fourth step (e.g., bundle-size check, lint) by editing go.md — no rebuild, no plugin. According to Anthropic's official slash-commands reference, custom commands hot-reload after /commands reload, so iteration is sub-second.
Boris Cherny Provenance
/go is community-written, not Boris's actual private command file. Boris discussed the pattern publicly: he mentions /go as his most-used slash command in the Pragmatic Engineer interview at newsletter.pragmaticengineer.com/p/building-claude-code-with-boris-cherny and on Threads at threads.com/@boris_cherny/post/DTBVroqEg_K. The community implementation on this page reproduces the documented behavior — verify, simplify, ship — without claiming to be Boris's literal source.
If you want the deeper background on Claude Code's design philosophy and Boris's other slash commands, the Pragmatic Engineer deep-dive is the canonical public source as of 2025.
Checklist Before Your First /go
- [ ]
.claude/commands/go.mdsaved with the exact template above. - [ ]
verify-appsubagent installed and tested standalone. - [ ]
code-simplifiersubagent installed (Anthropic official, also on TokRepo). - [ ]
/commit-push-prslash command installed (TokRepo featured). - [ ]
gh auth statusshows authenticated. - [ ] You are on a feature branch, not
main. - [ ] Working tree has the changes you want to ship.
With all six boxes checked, type /go and watch the four-stage summary scroll past in 30-90 seconds depending on test suite size. If any box is unchecked, fix that first — /go is built to fail loud rather than ship soft.
Frequently Asked Questions
Code-simplifier promises behavior preservation, but trust-but-verify is the safer policy. The second run is a 30-second insurance check that catches accidental regressions before any push happens. This is the same fail-fast pattern Anthropic recommends for multi-stage subagent pipelines.
You can edit go.md to remove step 2, but that defeats the purpose. Boris Cherny's pattern is verify-plus-simplify-plus-ship precisely because simplification surfaces dead code that passes tests. Removing the gate brings back the failure mode /go was designed to prevent in the first place.
/go calls /commit-push-pr, which by design refuses to push to main or master without an explicit confirmation flag. You will see a clear refusal message instead of a silent failure. Switch to a feature branch first and re-run /go from there to ship cleanly.
No. This is a community-written equivalent that reproduces the documented behavior. Boris discussed the verify-simplify-ship pattern publicly in the Pragmatic Engineer interview, but his private command file is not open-sourced. The TokRepo version follows the same gate sequence.
Yes, both are required. verify-app is featured on TokRepo as an E2E test subagent. code-simplifier is Anthropic official and also on TokRepo. /go itself is glue and will refuse to run if either subagent is missing, surfacing an explicit installation prompt.
Most projects see 30 to 90 seconds for the full four-stage sequence on small diffs. Verify-app is the dominant cost since it runs twice. Larger E2E suites push this to several minutes. The PR open call itself completes in under five seconds via GitHub CLI.
Citations (5)
Source & Thanks
Inspired by Boris Cherny's
/goslash command on howborisusesclaudecode.com.
Citations:
- howborisusesclaudecode.com
- Pragmatic Engineer: https://newsletter.pragmaticengineer.com/p/building-claude-code-with-boris-cherny
- Boris on Threads: https://www.threads.com/@boris_cherny/post/DTBVroqEg_K/
Discussion
Related Assets
verify-app — E2E Test Subagent for Claude Code
Open-source Claude Code subagent that runs end-to-end tests on recent changes and triages failures. Inspired by Boris Cherny's verify-app setup.
ko — Build and Deploy Go Container Images Without Dockerfiles
ko builds Go applications into container images without a Dockerfile or Docker daemon, producing minimal images and deploying them directly to Kubernetes with a single command.
Go — The Go Programming Language from Google
Go is an open-source programming language designed at Google by Rob Pike, Ken Thompson, and Robert Griesemer. Fast compilation, garbage collection, built-in concurrency via goroutines and channels, and a massive standard library. Powers Docker, Kubernetes, and most cloud infrastructure.
gRPC-Go — High-Performance RPC Framework for Go
gRPC-Go is the Go implementation of gRPC, a high-performance, open-source RPC framework. It uses Protocol Buffers for serialization and HTTP/2 for transport, enabling efficient communication between microservices with strongly-typed contracts.