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/softspark/ai-toolkit/golang-rulesnpx skills add softspark/ai-toolkit --skill golang-rulesgit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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/softspark/ai-toolkit/golang-rules)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/golang-rules"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/golang-rules.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.00040 | $0.02797 |
| Opus 5 | $0.00020 | $0.01399 |
| Sonnet 5 | $0.00008 | $0.00559 |
| Haiku 4.5 | $0.00004 | $0.00280 |
Grade A, and why
golang-rules 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 2d 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 — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Rules
These rules come from app/rules/golang/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in Go. Apply them when writing or
reviewing Go code.
Go Coding Style
Naming
- MixedCaps/mixedCaps only. No underscores in Go names (except test functions).
- Exported:
PascalCase. Unexported:camelCase. Acronyms:HTTPClient,userID. - Short variable names in small scopes:
i,r,w,ctx,err. - Descriptive names in larger scopes:
userRepository,requestTimeout. - Package names: short, lowercase, singular (
auth,user, notutils,helpers).
Packages
- One package per directory. Package name = directory name.
- Avoid
util,common,helperspackages. Name by what it provides. - Keep package APIs small. Export only what consumers need.
- Use
internal/directory for packages not meant for external consumption.
Functions
- Accept interfaces, return structs.
- First parameter
ctx context.Contextif the function does I/O or may be cancelled. - Return
(result, error)tuple. Error is always last return value. - Use named return values only for documentation, not for naked returns.
- Keep functions short. If >40 lines, consider splitting.
Error Handling
- Always check errors. Never use
_to discard errors silently. - Wrap errors with context:
fmt.Errorf("fetching user %s: %w", id, err). - Use sentinel errors (
var ErrNotFound = errors.New(...)) for expected conditions. - Use
errors.Is()anderrors.As()for error checking, not type assertions.
Formatting
- Use
gofmt/goimports. No formatting debates in Go. - Use
golangci-lintwith a.golangci.ymlconfig in CI. - Use
go vetas minimum static analysis.
Struct Design
- Use struct embedding for composition, not inheritance.
- Prefer value receivers for small structs, pointer receivers for large or mutable.
- Be consistent: all methods on a type use the same receiver type.
- Use struct literals with field names:
User{Name: "Ada", Age: 30}.
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.
- 2d ago First seen · 263 lines · 40 tokens per session scan A 06a1ec3abb58
golang-rules is a skill published in the GitHub repository softspark/ai-toolkit (169 stars, last pushed today), licensed Apache-2.0. It adds 40 tokens to every session and 2,797 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-09-03.
Other skills, from other repositories
sapcc-review
Gold-standard SAP CC Go code review: 10 parallel domain specialists.
codebase-analyzer
Statistical rule discovery from Go codebase patterns.
go-patterns
Go development patterns: testing, concurrency, errors, review, and conventions.
sapcc-audit
Full-repo SAP CC Go compliance audit against review standards.
golang-development
You MUST activate this skill when working on Go projects.
go-dependency-audit
Go dependency audit specialist for CVE scanning (govulncheck), license risk triage, outdated dependency detection, upgrade impact analysis, and supply chain security. ALWAYS use when auditing go.mod dependencies, running govulncheck, checking license compatibility, planning dependency upgrades, or investigating supply…