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 skills add eaglesakura/agent-skills --skill golang-analyzegit clone --depth 1 https://github.com/eaglesakura/agent-skillsWrote 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/eaglesakura/agent-skills/golang-analyze)<a href="https://agentmods.dev/skills/eaglesakura/agent-skills/golang-analyze"><img src="https://agentmods.dev/badge/skills/eaglesakura/agent-skills/golang-analyze/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.
<a href="https://agentmods.dev/skills/eaglesakura/agent-skills/golang-analyze"><img src="https://agentmods.dev/badge/skills/eaglesakura/agent-skills/golang-analyze.svg" alt="Reviewed on agentmods" width="80" 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.00216 | $0.01541 |
| Opus 5 | $0.00108 | $0.00771 |
| Sonnet 5 | $0.00043 | $0.00308 |
| Haiku 4.5 | $0.00022 | $0.00154 |
Grade A, and why
golang-analyze 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 11d 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 — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Golang / コード品質(fmt・lint・test)
Go 実装のあと(または途中の節目)に、フォーマット → 静的解析 → ユニットテストで品質を確認する。
コマンド例は go / golangci-lint 本体で示す(mise 等のラッパーはリポジトリ規約に任せる)。
いつ使うか
- AI / 人手のコーディング完了後、または区切りのよい途中経過での品質チェック
go fmt/golangci-lint/go testの実行方針を揃えるときgo.workがあるリポジトリで workspace 全体/個別 package を回すとき- ビルドタグ付きテスト(
-tags=...)の付け方を決めるとき
いつ使わないか
*.goの書き方・コメント・データオブジェクト規約だけ →golang-coding-rules- ConnectRPC / Repository / Usecase 等の設計そのもの → 該当
golang.architecture.* - CI ワークフロー YAML の書き方(GitHub Actions 等の専用 SKILL がある場合はそちら)
- Dart / Flutter の analyze・format(該当言語向けの品質 SKILL がある場合はそちら)
作業手順
- 作業ディレクトリを決める — 原則
go.workがあるリポジトリルート(なければ対象 module ルート) - Formatter を実行する
- Analyzer(golangci-lint) を実行する。指摘のうち 非破壊なら自動適用してよい
- Unit Test を実行する。Fail したら エラー内容のみ提示し、勝手に修正しない
- 破壊的になりそうな lint 修正案は、ユーザーに提示するだけにとどめる
Formatter
コーディング完了後(または区切り)に必ず実行する。結果はべき等で、副作用はない。
# go.work のディレクトリで実施する
go fmt ./...
Analyzer
コーディング完了後(または区切り)に必ず実行する。結果はべき等で、副作用はない。 提示された問題点のうち、非破壊的であれば自動的に実施してよい。
golangci-lint run ./...
ガードレール条項
- ロジックの変更等、破壊的変更が生じる場合はユーザーに作業内容を提示するのみで、作業の実施は行わない
Unit Test
コーディング完了後(または区切り)に必ず実行する。結果はべき等であり、基本的に副作用はない。 外部 API 等に依存する場合は、環境・状況依存で失敗しうる。
- Fail した場合、エラー内容のみをユーザーに提示する(修正は行わない)
- リポジトリが
//go:buildタグを使う場合は、go testに-tags={tags...}を付与する。{tags...}はプレースホルダであり、実行時にプロジェクト方針どおりのカンマ区切りタグ(例:dev,test)へ置き換える
# ビルドタグが必要な場合は {tags...} をカンマ区切りに置き換える(例: dev,test)
# workspace 全体(go.work があるリポジトリルート)
go test -tags={tags...} ./...
# 個別: パッケージ(ディレクトリ)単位
go test -tags={tags...} ./path/to/module
# 個別: 特定のテスト関数のみ(-run は正規表現)
go test -tags={tags...} ./path/to/module -run '^TestExample$'
ビルドタグが不要なプロジェクトでは -tags=... を付けない。
ナレッジベース
DO: fmt → lint → test の順で区切りごとに回す
- フォーマットと静的解析を先に通してからテスト結果を読むと、ノイズが減る
DO: go.work ルートを起点にし、必要なら package / -run で絞る
- 全体
./...が重い・無関係な失敗が多いときは対象を狭める
DO: ビルドタグ方針があるなら -tags を忘れない
- タグ無しだとテスト/コードがそもそもコンパイル対象外になることがある
What ships with it
1 file 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.
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.
- 11d ago First seen · 107 lines · 216 tokens per session scan A fbed6fc58f61
golang-analyze is a skill published in the GitHub repository eaglesakura/agent-skills (2 stars, last pushed 5d ago), licensed MIT. It adds 216 tokens to every session and 1,541 once invoked, about $0.0011 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.
Other skills, from other repositories
golang-testing
Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.
timeouts-and-async
Make Ginkgo specs interruptible and test asynchronous behavior — SpecContext/context.Context cancellable nodes, NodeTimeout/SpecTimeout/GracePeriod, the --timeout flag, Abort and SIGINT behavior, Gomega Eventually/Consistently (the func(g Gomega) form, .WithContext), and the defer GinkgoRecover() rule for goroutines.…
setup
Wire Ginkgo into a Go package — install the ginkgo CLI and Ginkgo+Gomega, ginkgo bootstrap to generate the suitetest.go (TestXxx/RegisterFailHandler(Fail)/RunSpecs), the package xxxtest convention, dot-import alternatives (aliased import, dsl/ subpackages, --nodot), ginkgo generate, and testing.T interop via…
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…
overview
The Ginkgo mental model for writing Go tests — the one idea that explains everything (Ginkgo builds a spec tree at construction time, then runs it) and its consequences for how you write specs, plus spec independence and the node taxonomy. Use this first when you start working with Ginkgo in a project, or to decide…
golang-stretchr-testify
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification…