code-guidelines-go

code-guidelines-go is a skill for Claude Code, Codex from dimetron/pi-go. It costs 124 tokens per session (6,233 once invoked), scanned A, original, MIT.

A set of Go coding rules for pi-go, a Go-based AI coding agent. It covers code style, errors, concurrency, project structure, testing, and newer Go versions.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring any Go code in pi-go, including tests, benchmarks, fuzz tests, and concurrency code.
Why use it?
It gives the agent consistent rules for writing and reviewing Go code, reducing style disagreements and common implementation mistakes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build -ldflags "-X main.version=$(VERSION)" -o bin/pi ./cmd/pi/.

Good fit Use it when writing, reviewing, or refactoring any Go code in pi-go, including tests, benchmarks, fuzz tests, and concurrency code.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/dimetron/pi-go
agentmods
npx agentmods add skills/dimetron/pi-go/code-guidelines-go

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 code-guidelines-go

README.md
[![agentmods](https://agentmods.dev/badge/skills/dimetron/pi-go/code-guidelines-go/github.svg)](https://agentmods.dev/skills/dimetron/pi-go/code-guidelines-go)
Your own site
<a href="https://agentmods.dev/skills/dimetron/pi-go/code-guidelines-go"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/code-guidelines-go/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.

agentmods 80×15 button for code-guidelines-go

Your own site · 80×15
<a href="https://agentmods.dev/skills/dimetron/pi-go/code-guidelines-go"><img src="https://agentmods.dev/badge/skills/dimetron/pi-go/code-guidelines-go.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,233 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00124 $0.06233
Opus 5.5 $0.00050 $0.02493
Sonnet 5.5 $0.00025 $0.01247
Haiku 4.5 $0.00012 $0.00623

Measured 1mo ago against content hash 2988e1289657, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-guidelines-go 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 1mo 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.

.pi-go/skills/code-guidelines-go/SKILL.md · 697 lines

How it starts

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

Go 1.24–1.27 Coding Guidelines — pi-go

Project: github.com/dimetron/pi-go — Go-native AI coding agent runtime
Layout: cmd/pi/ · internal/ · .pi-go/ · .vibe/compiled/ · scripts/
Min version: Go 1.24 (tool directive support) | Target: Go 1.27

For what Go 1.27 changed — generic methods, struct-literal field selectors, encoding/json/v2, the stdlib uuid package, removals that break a build, and the GOEXPERIMENT=none trap on this machine — see the go-127 skill.


1. Style & Naming

Packages

  • Short, lowercase, singular, no underscores: config ✓ agentUtils ✗
  • No stutter: package agent → type Runner (not AgentRunner)
  • Never util, common, types, helpers

Identifiers

  • Receivers: 1–2 chars from type name, consistent across all methods, never self/this
  • Acronyms full caps: ID, URL, HTTP, LLM — enforced by staticcheck
  • Short names in small scopes (i, ctx, err), descriptive in large scopes
// ✓ Correct
func (r *Runner) Execute(ctx context.Context) error { ... }
func (r *Runner) Stop()                             { ... }

// ✗ Wrong
func (self *Runner) Execute(ctx context.Context) error { ... }
func (runner *Runner) Stop()                           { ... }

Interfaces

  • Define at the consumer, not producer
  • 1–3 methods; single-method uses -er suffix (Reader, Handler, Closer)
  • Accept interfaces, return concrete structs
// consumer defines what it needs (internal/agent/)
type LLMClient interface {
    Complete(ctx context.Context, prompt string) (string, error)
}

// producer returns concrete struct (internal/llm/)
func NewOpenAIClient(apiKey string) *OpenAIClient { ... }

Godoc

Every exported name starts its comment with the name itself:

// Package agent provides the core AI agent runtime for pi-go.
package agent

// Runner orchestrates tool calls and LLM interactions.
type Runner struct { ... }

// Execute runs the agent loop until completion or context cancellation.
func (r *Runner) Execute(ctx context.Context, task string) error { ... }

Read the full file on GitHub · 697 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. 1mo ago First seen · 697 lines · 124 tokens per session scan A 2988e1289657

Subscribe to this mod's changes

code-guidelines-go is a skill published in the GitHub repository dimetron/pi-go (211 stars, last pushed 2d ago), licensed MIT. It adds 124 tokens to every session and 6,233 once invoked, about $0.0005 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-08-30.