writing-go

writing-go is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 72 tokens per session (635 once invoked), scanned A, original, MIT.

A set of development guidelines for writing, changing, and reviewing Go code. Go is a programming language, and a module is a Go project with its own dependency and version settings.

In plain words
What is it for?
Building Go APIs and command-line tools, reviewing Go implementations, and changing Go tests while following the project's target Go version.
Why use it?
It gives Go projects consistent rules for code structure, errors, context handling, comments, tests, and version-specific features.

Skill for Claude CodeCodex

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

Good fit Building Go APIs and command-line tools, reviewing Go implementations, and changing Go tests while following the project's target Go version.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexei-led/cc-thingz/writing-go
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 alexei-led/cc-thingz --skill writing-go
Clone the repo
git clone --depth 1 https://github.com/alexei-led/cc-thingz

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 writing-go

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-go/github.svg)](https://agentmods.dev/skills/alexei-led/cc-thingz/writing-go)
Your own site
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-go"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-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 writing-go

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/writing-go"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/writing-go.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 635 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.00072 $0.00635
Opus 5.5 $0.00029 $0.00254
Sonnet 5.5 $0.00014 $0.00127
Haiku 4.5 $0.00007 $0.00064

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

Security

Grade A, and why

writing-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.

src/skills/writing-go/SKILL.md · 44 lines

How it starts

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

Go Development

Check go.mod (go and toolchain lines) and CI before using version-gated APIs. Project conventions win over these defaults.

Defaults

  • Stdlib first: net/http, testing, flag, log/slog. Add a module only for a concrete requirement.
  • Concrete types in domain code. Consumers own small private interfaces; producers return concrete types.
  • Keep HTTP, CLI, database, and vendor SDK types out of domain packages. Map errors to status, exit code, or retry at the edge.
  • New binaries: cmd/<name> plus internal/. Use pkg/ only for code meant for external import.
  • Avoid package stutter: user.Store, not user.UserStore.
  • Doc comments on exported names start with the identifier and end with a period.
  • Every goroutine has an owner, a cancellation path, and a completion path. Use errgroup for errors or shared cancellation when the module already has it.

Version-Gated

  • 1.24+: t.Context(), t.Chdir(), and b.Loop() in tests.
  • 1.25+: sync.WaitGroup.Go when no error propagation is needed.
  • 1.26+: stdlib crypto/hpke; new(expr) only when clearer than a local variable or composite literal; self-referential generic constraints belong in generic libraries, not business logic.
  • 1.26+: testing/cryptotest.SetGlobalRandom swaps process-wide randomness, so never use it in parallel tests.
  • encoding/json/v2 is experimental and exists only under GOEXPERIMENT=jsonv2; use it only when the project already builds that way.

CLIs

  • Use the existing framework. Otherwise flag for single-command tools, Cobra for large command trees with completions, urfave/cli for small multi-command tools. Skip Viper unless already used.
  • Keep main thin: it calls run(ctx, args, stdin, stdout, stderr) error and maps the result to an exit code. Tests call run. Avoid log.Fatal; it skips deferred cleanup.
  • Config precedence: flag, env, config file, default.

References

  • testing.md: read when adding or reshaping tests, or when the test loop is slow.
  • linting.md: read when changing lint commands or golangci-lint config.

Read the full file on GitHub · 44 lines

Files

What ships with it

3 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. 1mo ago Changed · -22 lines · +1 tokens per session fb78dfcbe3be
  2. 1mo ago Changed · +1 lines 276d74b50b16
  3. 2mo ago First seen · 65 lines · 71 tokens per session scan A d6d608ac93cb

Subscribe to this mod's changes

writing-go is a skill published in the GitHub repository alexei-led/cc-thingz (38 stars, last pushed 5d ago), licensed MIT. It adds 72 tokens to every session and 635 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

ring:verifying-code

Verifying a Go project: runs every quality check (lint, vet, imports, format, docs, unit, integration, E2E) and returns a single MERGEREADY or NEEDSFIX verdict. Report-only: never fixes anything. Use for a quick pre-merge or pre-PR check outside a full dev-cycle. Skip when not a Go project, when you want a single…

LerianStudio/ring · 101 tokens

review-golang

Run a comprehensive Go code review on git-changed files using the golang-pro agent with Context7 library docs.

ivklgn/ai-kit · 26 tokens

agent-go-reviewer

Expert Go code reviewer specializing in idiomatic Go, concurrency patterns, error handling, and performance. Use for all Go code changes. MUST BE USED for Go projects.

KunanonJ/ai-skills-hub · 38 tokens

go-code-reduce

Find and, when authorized, apply maintainable Go code reductions. Use when a user asks to reduce Go lines, boilerplate, duplication, or obsolete idioms without changing behavior; not for general implementation or style review.

yarlson/yarstack · 49 tokens

google-go-style

Use when writing, reviewing, or refactoring Go code; when handling errors (fmt.Errorf, %w, sentinel, errors.Is, errors.As); when deciding between panic, error return, and log.Fatal; when writing tests (table-driven, t.Helper, t.Fatal vs t.Error, goroutines); when designing API surface (option struct, variadic options…

cicdteam/google-go-style · 110 tokens

pr-to-go-linter

Generate a new pkg/linters analyzer from a merged or open PR pattern.

github/gh-aw · 22 tokens