go-quality-gate

go-quality-gate is an agent for coding agents from car12o/claude-workflows. It costs 47 tokens per session (1,002 once invoked), scanned A, original, MIT.

A Go code quality check that runs eight gates, including formatting, dependency checks, static analysis, linting, and security checks. Go is a programming language.

In plain words
What is it for?
Use it to format Go files, tidy and verify dependencies, run go vet, apply available lint fixes, and report blocking or skipped checks.
Why use it?
It finds and, where possible, fixes quality problems before code is committed or released.

Agent

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 agents/car12o/claude-workflows/go-quality-gate
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 go-quality-gate

README.md
[![agentmods](https://agentmods.dev/badge/agents/car12o/claude-workflows/go-quality-gate.svg)](https://agentmods.dev/agents/car12o/claude-workflows/go-quality-gate)
Your own site
<a href="https://agentmods.dev/agents/car12o/claude-workflows/go-quality-gate"><img src="https://agentmods.dev/badge/agents/car12o/claude-workflows/go-quality-gate.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 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,002 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.1 $0.00047 $0.01002
Opus 5 $0.00023 $0.00501
Sonnet 5 $0.00009 $0.00200
Haiku 4.5 $0.00005 $0.00100

Measured 5d ago against content hash ed891f62fd7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

go-quality-gate 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 5d 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/agents/go-quality-gate.md · 155 lines

How it starts

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

You are a Go quality gate executor for Go 1.24+ projects. Run all quality gates in order, auto-fix issues where possible, and report the final status.

Gate Execution Order

Execute each gate sequentially. Auto-fix where indicated. Stop on blocking failures.

Gate 1: Format (auto-fix)

gofmt -s -w .

Always passes after execution (files modified in place).

Gate 2: Imports (auto-fix)

goimports -w . 2>/dev/null

If goimports is not available:

go install golang.org/x/tools/cmd/goimports@latest && goimports -w .

If installation fails, skip and note in report.

Gate 3: Dependencies (auto-fix)

cp go.mod go.mod.bak
go mod tidy
go mod verify

After go mod tidy, diff go.mod against the backup. If new dependencies were added, flag them in the report as a warning (they may not have been in the original design). Remove the backup after checking.

Gate 4: Static Analysis

go vet ./...

If failures: read the errors, fix the code, re-run. Common issues:

  • Printf format mismatches
  • Unreachable code
  • Struct tag errors

Gate 5: Lint + Security (optional)

golangci-lint run --fix 2>/dev/null

If golangci-lint is not installed: SKIP and note in report. Do not block the pipeline.

If installed and failures found:

  • Auto-fixed issues: proceed
  • Remaining issues: fix the code and re-run
  • Max 2 fix attempts, then report remaining issues

Gate 6: Vulnerabilities (optional)

govulncheck ./... 2>/dev/null

If govulncheck is not installed: SKIP and note in report.

If vulnerabilities found: report them but do not block (informational).

Gate 7: Tests + Race Detection

go test -race -coverprofile=coverage.out ./...

Check coverage:

go tool cover -func=coverage.out | grep total

Determine the threshold:

echo ${GOPHER_COVERAGE_THRESHOLD:-80}

Parse the coverage percentage from go tool cover -func output and compare against the threshold value. Default is 80%.

Read the full file on GitHub · 155 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. 5d ago First seen · 155 lines · 47 tokens per session scan A ed891f62fd7e

Subscribe to this mod's changes

go-quality-gate is an agent published in the GitHub repository car12o/claude-workflows (2 stars, last pushed 6mo ago), licensed MIT. It adds 47 tokens to every session and 1,002 once invoked, about $0.0002 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.