gopher-fix

gopher-fix is a command for coding agents from car12o/claude-workflows. It costs 24 tokens per session (1,208 once invoked), scanned A, original, MIT.

An automated workflow for fixing small, focused bugs in Go 1.24 or later projects. It reproduces the problem with a failing test, finds the cause, makes a minimal code change, checks the result, and reviews the fix.

In plain words
What is it for?
Use it for contained Go bug fixes that can be tested and solved without changing interfaces or touching many files.
Why use it?
It gives a structured path from a reported bug to a verified change, reducing guesswork and unnecessary edits.

Command

Part of the gopher plugin — 6 skills, 5 commands, 5 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/car12o/claude-workflows/gopher-fix
Clone the repo
git clone --depth 1 https://github.com/car12o/claude-workflows

Or install gopher, the plugin that ships this one along with the rest of its 6 skills, 5 commands, 5 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gopher-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/car12o/claude-workflows/gopher-fix.svg)](https://agentmods.dev/commands/car12o/claude-workflows/gopher-fix)
Your own site
<a href="https://agentmods.dev/commands/car12o/claude-workflows/gopher-fix"><img src="https://agentmods.dev/badge/commands/car12o/claude-workflows/gopher-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.01208
Opus 5 $0.00012 $0.00604
Sonnet 5 $0.00005 $0.00242
Haiku 4.5 $0.00002 $0.00121

Measured 3d ago against content hash 643d04ff9ddb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gopher-fix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/gopher/commands/gopher-fix.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the gopher-fix orchestrator for Go 1.24+ projects.

Core rule: You are an orchestrator. Your job is to delegate work to specialized subagents via the Task tool, make decisions at stop points, and communicate with the user.

Bug Report

$ARGUMENTS

Workflow

Phase 1: Reproduce   → go-implementer (write failing test)
Phase 2: Diagnose    → go-analyzer (investigate root cause)
Phase 3: Fix         → go-implementer (minimal code change)
         → go-quality-gate
         → git commit
Phase 4: Review      → go-reviewer

No stop points — this workflow is autonomous for small, focused fixes. If the fix turns out to be complex (touching 5+ files or requiring interface changes), escalate to the user and suggest using /gopher-feat instead.

Subagent Reference

Phase Agent subagent_type
Reproduce go-implementer gopher:go-implementer
Diagnose go-analyzer gopher:go-analyzer
Fix go-implementer gopher:go-implementer
Quality Gates go-quality-gate gopher:go-quality-gate
Review go-reviewer gopher:go-reviewer

Phase 1: Reproduce

Use the Task tool with subagent_type: "gopher:go-implementer" to write a failing test that demonstrates the bug. Include in the task prompt:

  • The bug description from $ARGUMENTS
  • Instruction to write a test that fails due to the reported bug
  • Instruction to use table-driven test format with a clear test name reflecting the bug
  • Instruction to run the test and confirm it fails (RED phase only — do not fix it)

The implementer should return:

  • The test file and test name
  • The failure output proving the bug exists
  • The package where the bug manifests

If the bug cannot be reproduced (test passes unexpectedly): report this to the user with the test that was written, and ask for clarification.

Capture the reproduction output for subsequent phases.

Phase 2: Diagnose

Use the Task tool with subagent_type: "gopher:go-analyzer" to investigate the root cause. Include in the task prompt:

  • The bug description
  • The failing test and its output from Phase 1
  • The package where the bug manifests
  • Instruction to trace the code path that leads to the failure
  • Instruction to identify the root cause and the minimal set of files that need to change

Read the full file on GitHub · 125 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 125 lines · 24 tokens per session scan A 643d04ff9ddb

Subscribe to this mod's changes

gopher-fix is a command published in the GitHub repository car12o/claude-workflows (2 stars, last pushed 6mo ago), licensed MIT. It adds 24 tokens to every session and 1,208 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.