golang-coding-rules

golang-coding-rules is a skill for Claude Code, Codex from eaglesakura/agent-skills. It costs 181 tokens per session (1,064 once invoked), scanned A, original, MIT.

A set of rules for writing and changing Go source files. It covers imports, error checks, meaningful custom types, data structures, and documentation comments.

In plain words
What is it for?
Use it when implementing or reviewing .go files, especially when adding custom data types, constructors, String methods, errors.As checks, or Japanese documentation comments.
Why use it?
It gives Go code a consistent style and makes important values, errors, and public APIs easier to understand. It leaves formatting, linting, and testing to the separate Go analysis skill.

Skill for Claude CodeCodex

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

Good fit Use it when implementing or reviewing .go files, especially when adding custom data types, constructors, String methods, errors.As checks, or Japanese documentation comments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/eaglesakura/agent-skills/golang-coding-rules
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.

Any agent
npx skills add eaglesakura/agent-skills --skill golang-coding-rules
Clone the repo
git clone --depth 1 https://github.com/eaglesakura/agent-skills

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 golang-coding-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/eaglesakura/agent-skills/golang-coding-rules/github.svg)](https://agentmods.dev/skills/eaglesakura/agent-skills/golang-coding-rules)
Your own site
<a href="https://agentmods.dev/skills/eaglesakura/agent-skills/golang-coding-rules"><img src="https://agentmods.dev/badge/skills/eaglesakura/agent-skills/golang-coding-rules/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 golang-coding-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/eaglesakura/agent-skills/golang-coding-rules"><img src="https://agentmods.dev/badge/skills/eaglesakura/agent-skills/golang-coding-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 181 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,064 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.
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.00181 $0.01064
Opus 5 $0.00090 $0.00532
Sonnet 5 $0.00036 $0.00213
Haiku 4.5 $0.00018 $0.00106

Measured 8d ago against content hash 565c45f4a225, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

golang-coding-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 8d 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.

packages/golang/.apm/skills/golang-coding-rules/SKILL.md · 71 lines

What it actually says

Golang / コーディング規約

*.go を書く・直すときは、この SKILL の規約と、文脈に合う参照ドキュメントに従う。 品質コマンド(fmt / lint / test)の回し方は golang-analyze、レイヤー設計は golang.architecture.* が主で、本 SKILL は言語・型・コメントの土台である。

いつ使うか

  • Go の新規実装・修正・レビュー指摘の反映
  • import 別名、error 判定、データオブジェクト(独自型)、ドキュメントコメント

いつ使わないか

  • go fmt / golangci-lint / go test の実行手順だけ → golang-analyze
  • ConnectRPC / Repository / Usecase 等のアーキテクチャ設計 → 該当 golang.architecture.*
  • Dart / Flutter の言語規約(他言語向けの規約 SKILL がある場合はそちら)

作業手順

  1. 変更対象の種類を特定する(一般・データオブジェクト・コメントのみ、など)
  2. 下表から必要な references/ だけロードする(全部を一度に読まない)
  3. 規約に沿って実装する
  4. 区切りがついたら golang-analyze で fmt / lint / test を回す

文脈に応じたドキュメントのロード

参照 使うとき
general.md import 別名、入れ子 error(errors.As)など一般規約
data_object.md DTO / 構造体 / 独自型(type)・生成関数・String()
code_comment.md public への日本語ドキュメントコメント・Example・NOTE:

必要な参照だけ読む。全部を一度にロードしない。

原則(要約)

  • import 別名は package パスの末尾 1 ワード(バージョン suffix がある場合は識別可能な文字列)
  • 入れ子 error の型確認は errors.As(文字列比較や不安定な型アサーションだけに頼らない)
  • ドメイン上の意味ある値はプレーン string/int 直扱いを避け、独自型 + 必要なら NewXxx + String()
  • public な型・関数・フィールド等には 日本語ドキュメントコメント(主語の省略、意図・副作用、必要なら Example / NOTE:

ナレッジベース

DO: まず対象種別を決め、対応する reference だけ読む

  • general / data_object / code_comment を同時に全部読まないと進まない、という進め方を避ける

DO: 型とコメントで意図をコードに残し、曖昧なプレーン型を減らす

  • 取り違えとレビューコストを下げるため

DO NOT: 品質コマンド手順やアーキテクチャ詳細を本 SKILL だけで済ませようとする

  • 実行は golang-analyze、設計は golang.architecture.*

DO NOT: 入れ子 error を文字列マッチだけで判定する

  • ラップ構造の変化に弱く、壊れやすい
Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 71 lines · 181 tokens per session scan A 565c45f4a225

Subscribe to this mod's changes

golang-coding-rules is a skill published in the GitHub repository eaglesakura/agent-skills (2 stars, last pushed 2d ago), licensed MIT. It adds 181 tokens to every session and 1,064 once invoked, about $0.0009 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-31.

Related

Other skills, from other repositories

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-uber-fx

Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports go.uber.org/fx, or when wiring…

samber/cc-skills-golang · 122 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

samber/cc-skills-golang · 74 tokens

ax-go-agent-optimize

Use when writing Go code with github.com/ax-llm/ax/packages/go for agent optimization, verified agent-playbook evolution, evaluators, judges, optimizer artifacts, BootstrapFewShot, and GEPA.

ax-llm/ax · 51 tokens

gmeasure

Benchmark and measure Go code with gmeasure — an Experiment groups named Measurements, recorded via RecordValue/RecordDuration/MeasureDuration or repeated Sample/SampleValue/SampleDuration with SamplingConfig, timed inline with a Stopwatch, summarized through GetStats/Stats (StatMin/Max/Mean/Median/StdDev…

onsi/gomega · 129 tokens