Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsApr 28, 2026·2 min de lectura

/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.

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 66/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Install /go and ship verified, simplified code
Comando con revisión previa
npx -y tokrepo@latest install d8f73db9-fb52-4337-961a-7eb0da026410 --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

TL;DR
/go is a community-written Claude Code slash command that chains three ship-time gates into one keystroke. It invokes the verify-app subagent for E2E tests, then the Anthropic-official code-simplifier subagent for cleanup, then re-runs verify-app to catch regressions, and finally calls /commit-push-pr to open a pull request. Any failed gate stops the sequence with a clear failure summary instead of pushing broken or unverified code. Save the prompt template to .claude/commands/go.md and reload Claude Code to install in under sixty seconds.
§01

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.

§02

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:

  1. 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.
  2. code-simplifier second — Anthropic released the code-simplifier subagent 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).
  3. 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.
  4. /commit-push-pr last — only if both verifications pass. According to GitHub CLI documentation at cli.github.com/manual/gh_pr_create, gh pr create is 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.

§03

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.

§04

Hard Boundaries Inside the Command File

Append these guardrails to go.md so Claude Code refuses sloppy invocations:

§05

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.
§06

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.

§07

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.

§08

Installation in 60 Seconds

  1. Copy the prompt template above into .claude/commands/go.md.
  2. Verify the file is readable: ls -la .claude/commands/go.md should show 644 permissions.
  3. Inside Claude Code, run /commands reload (or restart the session).
  4. Confirm the picker by typing /g and looking for go — Verify, simplify, and ship.
  5. Install the two required subagents: verify-app and code-simplifier (links in next section).
  6. 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.

§09

Comparison: /go vs Hand-Run Sequence vs Single-Step PR

ApproachKeystrokesTests RunSimplificationRegression CatchFailure Visibility
/go composite12 (before + after simplify)Yes (Anthropic official)Strong (re-run)One-line summary
Hand-run sequence6-82 manuallyOptional, often skippedWeak (memory)Scattered logs
Single-step /commit-push-pr10 unless coupledNoneNoneNone
Plain gh pr create10NoneNoneNone

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.

§10

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.

§11

Common Failure Modes and Fixes

  1. "verify-app subagent not found" — install verify-app from TokRepo, restart Claude Code, retry.
  2. "git diff main...HEAD" returns nothing — you're on main itself. Switch to a feature branch first.
  3. Simplifier produces a regression — the second verify-app catches it. Read the test failure, manually revert the simplifier diff, file an upstream bug.
  4. /commit-push-pr refuses on main/master — by design. Push from a feature branch.
  5. gh auth status shows logged out — run gh auth login and re-authenticate. According to GitHub CLI documentation, gh auth login supports 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.

§12

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.

§13

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.

§14

Checklist Before Your First /go

  • [ ] .claude/commands/go.md saved with the exact template above.
  • [ ] verify-app subagent installed and tested standalone.
  • [ ] code-simplifier subagent installed (Anthropic official, also on TokRepo).
  • [ ] /commit-push-pr slash command installed (TokRepo featured).
  • [ ] gh auth status shows 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.

Preguntas frecuentes

Why re-run verify-app after the simplifier pass?+

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.

Can I skip the simplify step in /go?+

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.

What happens if I run /go on the main branch?+

/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.

Is this Boris Cherny's actual /go command file?+

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.

Do I need both verify-app and code-simplifier installed?+

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.

How long does a typical /go run take end-to-end?+

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.

🙏

Fuente y agradecimientos

Inspired by Boris Cherny's /go slash command on howborisusesclaudecode.com.

Citations:

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados