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 agentmods add skills/smallnest/pigo/modern-gonpx skills add smallnest/pigo --skill modern-gogit clone --depth 1 https://github.com/smallnest/pigoWrote 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/smallnest/pigo/modern-go)<a href="https://agentmods.dev/skills/smallnest/pigo/modern-go"><img src="https://agentmods.dev/badge/skills/smallnest/pigo/modern-go.svg" alt="Measured on agentmods" 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.00102 | $0.08707 |
| Opus 5 | $0.00051 | $0.04353 |
| Sonnet 5 | $0.00020 | $0.01741 |
| Haiku 4.5 | $0.00010 | $0.00871 |
Grade A, and why
modern-go scanned grade A with 1 finding 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 6d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
result := fetch(ctx) Copies of this mod
1 near-identical copy found in the catalogue:
- modern-go — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 1,140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
modern-go
Modernize Go source code by applying version-appropriate idioms, APIs, and language features. Works like go fix plus additional transformations curated from the Go team's modernize analysis passes and community best practices.
Usage
Invoke this skill when the user asks to modernize Go code. By default, modernize the entire project; the user may specify a file or directory instead.
When invoked:
- Detect the project's Go version from
go.mod(thegodirective). - Find all
.gofiles in the target scope (excludingvendor/,.git/,testdata/). - For each file, apply all transformations for versions ≤ the project's Go version, starting from the oldest to the newest.
- After all transformations, print a summary of what was changed and what was skipped.
If the user specifies a file or directory, limit the scope to that path.
Transformation Catalog
Each transformation includes a Go version gate—only apply when the project's go.mod version ≥ that version. Never apply a transformation that requires a version higher than the project declares.
Go 1.0+ — time.Since
| Before | After |
|---|---|
time.Now().Sub(start) |
time.Since(start) |
// before
elapsed := time.Now().Sub(start)
// after
elapsed := time.Since(start)
Go 1.8+ — time.Until
| Before | After |
|---|---|
deadline.Sub(time.Now()) |
time.Until(deadline) |
// before
remaining := deadline.Sub(time.Now())
// after
remaining := time.Until(deadline)
Go 1.10+ — strings.Builder (loop concatenation)
| Before | After |
|---|---|
s += item in a loop |
var b strings.Builder; b.WriteString(item) |
// before
s := ""
for _, item := range items {
s += item
}
// after
var b strings.Builder
for _, item := range items {
b.WriteString(item)
}
s := b.String()
Only when += concatenation happens inside a loop.
Go 1.13+ — errors.Is
| Before | After |
|---|---|
err == io.EOF |
errors.Is(err, io.EOF) |
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.
- 6d ago First seen · 1,140 lines · 102 tokens per session scan A 576b8f7e955d
modern-go is a skill published in the GitHub repository smallnest/pigo (424 stars, last pushed 6d ago), licensed MIT. It adds 102 tokens to every session and 8,707 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
use-modern-go
Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.
go-127
What changed in Go 1.27 (released August 2026) and how it changes the way Go is written in pi-go. Use this skill when writing or reviewing Go that could use a 1.27 feature, when bumping the go directive in go.mod, when a build or test behaves differently after a toolchain upgrade, or when code-guidelines-go points…
bubbletea-testing
Use this skill whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go. Triggers include any mention of testing Bubble Tea models, teatest, golden file testing for TUIs, testing tea.Cmd or tea.Msg, snapshot testing terminal output, or writing tests for any Go CLI/TUI that uses the Elm…
design-review
Deep design review of Go codebase — naming, structure, consistency, interfaces, error handling. Scores each dimension and provides actionable fixes.
pi-loop-forensics
Diagnose pi-go agent loops and degenerate turns — "agent loop aborted", runaway thinking with no tool calls, repeated phrases. Discriminates genuine model repetition collapse from a race, a tool-parse failure, or a too-low guard, and A/B replays a seed session across providers.
demo-subagents-tui
This skill demonstrates how to use the agent tool to spawn subagents within the pi-go TUI for parallel task execution. Subagents are autonomous child processes that run concurrently, enabling efficient parallelization of independent tasks.