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.
npx skills add yarlson/yarstack --skill go-code-reducegit clone --depth 1 https://github.com/yarlson/yarstackWrote 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.
[](https://agentmods.dev/skills/yarlson/yarstack/go-code-reduce)<a href="https://agentmods.dev/skills/yarlson/yarstack/go-code-reduce"><img src="https://agentmods.dev/badge/skills/yarlson/yarstack/go-code-reduce/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/yarlson/yarstack/go-code-reduce"><img src="https://agentmods.dev/badge/skills/yarlson/yarstack/go-code-reduce.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.00771 |
| Opus 5.5 | $0.00020 | $0.00308 |
| Sonnet 5.5 | $0.00010 | $0.00154 |
| Haiku 4.5 | $0.00005 | $0.00077 |
Grade A, and why
go-code-reduce 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 39 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Reduce Go Code
Reduce authored maintenance burden, not raw repository lines. Prefer deleting mechanics through standard Go constructs over compressing domain logic or introducing project-specific abstractions.
Workflow
-
Read the repository guidance, module Go version, closest source and tests, generated-file markers, and affected public consumers. Keep an assessment read-only unless edits are authorized.
-
State the behavior that must remain unchanged, including errors and wrapped identities, nil versus empty values, ordering, serialization, cancellation, cleanup, exported APIs, build variants, and relevant performance bounds.
-
Rank evidenced candidates in this order:
- delete dead, obsolete, forwarding, compatibility, or unnecessarily exported code when consumers permit it;
- replace hand-written mechanics with version-supported language, built-in, or standard-library operations;
- shrink producer APIs and define small interfaces at actual consumers;
- consolidate an algorithm only when multiple real copies differ solely by type or repeated traversal;
- generate code only when repetition is mechanically derived from one authoritative source;
- add a dependency only when it removes a meaningful subsystem after adapters, tooling, security, and update costs.
-
Keep explicit code when the alternative adds indirection, reflection, modes, hidden allocation, a one-use helper, or a vocabulary maintainers must learn.
-
Make one coherent reduction at a time. Preview automated rewrites with
go fix -diff ./...; it exits non-zero when it finds fixes, so a non-zero exit with a diff is not a failure. List the available fixers withgo tool fix help. Apply only reviewed transformations, format the changed Go files, and exclude unrelated modernization. -
Run focused tests and the repository's checks. Run
go test -raceon packages whose concurrency changed. For generated code, run the generator and confirmgit diff --exit-codeis clean. For performance-sensitive paths, run the benchmarks before and after with-count=10, and compare them withbenchstatwhen it is installed. -
Compare only relevant before-and-after evidence. Separate authored production, test, and generated code; a valid reduction lowers authored code or duplication without materially increasing complexity, API surface, dependencies, or runtime cost.
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.
- 12d ago Changed 0ba1cc0d76d8
- 1mo ago First seen · 39 lines · 49 tokens per session scan A cf46c854609f
go-code-reduce is a skill published in the GitHub repository yarlson/yarstack (3 stars, last pushed 11d ago), licensed MIT. It adds 49 tokens to every session and 771 once invoked, about $0.0002 per session on Opus 5.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-09-05.
Other skills, from other repositories
ring:verifying-code
Verifying a Go project: runs every quality check (lint, vet, imports, format, docs, unit, integration, E2E) and returns a single MERGEREADY or NEEDSFIX verdict. Report-only: never fixes anything. Use for a quick pre-merge or pre-PR check outside a full dev-cycle. Skip when not a Go project, when you want a single…
writing-go
Idiomatic Go development. Use when writing Go code, designing APIs, reviewing Go implementations, or changing Go tests. Follow the module's target Go version. Prefer stdlib, concrete types, explicit errors, goroutine ownership, fast feedback, and behavior tests. NOT for Python, Rust, TypeScript, shell scripts, or…
review-golang
Run a comprehensive Go code review on git-changed files using the golang-pro agent with Context7 library docs.
agent-go-reviewer
Expert Go code reviewer specializing in idiomatic Go, concurrency patterns, error handling, and performance. Use for all Go code changes. MUST BE USED for Go projects.
neneko-code-taste
Use when implementing or reviewing Go changes that should match tRPC-Agent-Go's code taste: minimal compatible diffs, consumer-oriented APIs, explicit ownership, and contract-level tests. Do not use for generic Go formatting-only requests.
google-go-style
Use when writing, reviewing, or refactoring Go code; when handling errors (fmt.Errorf, %w, sentinel, errors.Is, errors.As); when deciding between panic, error return, and log.Fatal; when writing tests (table-driven, t.Helper, t.Fatal vs t.Error, goroutines); when designing API surface (option struct, variadic options…