go-modern

go-modern is a skill for Claude Code, Codex from fall-out-bug/sdp. It costs 22 tokens per session (633 once invoked), scanned A, original, MIT.

A Go coding guide that checks the repository’s Go version and recommends newer standard-library patterns supported by it.

In plain words
What is it for?
Use it when writing or reviewing Go code, especially when modernizing sorting, searching, copying, string handling, minimum or maximum values, and generic values.
Why use it?
It helps avoid using language features the project cannot run and replaces small custom code with clearer built-in options without changing behavior.

Skill for Claude CodeCodex

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 skills/fall-out-bug/sdp/go-modern
Any agent
npx skills add fall-out-bug/sdp --skill go-modern
Clone the repo
git clone --depth 1 https://github.com/fall-out-bug/sdp

Made for: Claude Code, Codex.

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-modern

README.md
[![agentmods](https://agentmods.dev/badge/skills/fall-out-bug/sdp/go-modern.svg)](https://agentmods.dev/skills/fall-out-bug/sdp/go-modern)
Your own site
<a href="https://agentmods.dev/skills/fall-out-bug/sdp/go-modern"><img src="https://agentmods.dev/badge/skills/fall-out-bug/sdp/go-modern.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 633 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.00022 $0.00633
Opus 5 $0.00011 $0.00316
Sonnet 5 $0.00004 $0.00127
Haiku 4.5 $0.00002 $0.00063

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

Security

Grade A, and why

go-modern 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.

prompts/skills/go-modern/SKILL.md · 72 lines

How it starts

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

@go-modern

Use this skill when editing or reviewing Go in sdp.

The repo targets modern Go. Prefer standard-library idioms that are already available in the checked-in Go version.

Core Rule

Before changing Go code:

  1. Detect the module Go version from go.mod or sdp-plugin/go.mod.
  2. Use only language and stdlib features supported by that version.
  3. Prefer standard-library modernizations that reduce custom code without changing behavior.

Prefer These Patterns

  • slices.SortFunc over sort.Slice
  • slices.Contains over manual membership loops
  • maps.Copy or maps.Clone over manual copy loops
  • strings.Cut over strings.SplitN(..., 2) or strings.Index plus slicing
  • strings.CutPrefix and strings.CutSuffix over HasPrefix or HasSuffix plus trim
  • min(...) and max(...) over trivial compare-and-assign blocks
  • any over interface{} for parameters, locals, and variadics when behavior does not change

First-Wave Safe Changes

Use these freely in polish PRs when tests stay green:

  • mechanical helper swaps (Cut, CutPrefix, SortFunc, Contains, Copy, Clone)
  • removing tiny custom helpers now replaced by stdlib
  • local interface{} to any updates
  • comments or docs that replace outdated Go guidance such as golint

Avoid In The First Pass

Do not batch risky modernizations into a style PR:

  • context plumbing solely to replace exec.Command with exec.CommandContext
  • wide JSON tag changes such as omitempty to omitzero
  • concurrency rewrites (wg.Go, atomics, cancellation semantics) unless the feature already needs them
  • broad repo-wide interface{} churn across public structs or serialized payloads

Review Checklist

When reviewing Go changes, ask:

  1. Is there a standard-library helper that makes this code shorter and clearer?
  2. Is the rewrite behavior-preserving and easy to verify?
  3. Is the new idiom supported by the module's Go version?
  4. Does the change remove custom parsing, sorting, or copying logic instead of adding abstraction?

Read the full file on GitHub · 72 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 · 72 lines · 22 tokens per session scan A 79ac2ef11961

Subscribe to this mod's changes

go-modern is a skill published in the GitHub repository fall-out-bug/sdp (19 stars, last pushed 2mo ago), licensed MIT. It adds 22 tokens to every session and 633 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-30.