write-go-code

write-go-code is a skill for Claude Code from cboone/agent-harness-plugins. It costs 46 tokens per session (525 once invoked), scanned A, original, MIT.

A Go coding guide based on common Go standards, covering how to write, test, refactor, and review Go code.

In plain words
What is it for?
Use it when writing or reviewing Go programs, including code that uses goroutines, channels, or Cobra command-line interfaces.
Why use it?
It helps keep Go code clear and consistent while catching issues in naming, error handling, concurrency, testing, and organization.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the write-go-code plugin — 1 skill shipped together

Good fit Use it when writing or reviewing Go programs, including code that uses goroutines, channels, or Cobra command-line interfaces.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cboone/agent-harness-plugins/write-go-code
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 cboone/agent-harness-plugins --skill write-go-code
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code.

Or install write-go-code, the plugin that ships this one along with the rest of its 1 skill.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/cboone/agent-harness-plugins/write-go-code"><img src="https://agentmods.dev/badge/skills/cboone/agent-harness-plugins/write-go-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 525 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.00046 $0.00525
Opus 5.5 $0.00018 $0.00210
Sonnet 5.5 $0.00009 $0.00105
Haiku 4.5 $0.00005 $0.00052

Measured 9d ago against content hash 136c0c6e81fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

write-go-code 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 9d 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.

plugins/write-go-code/skills/write-go-code/SKILL.md · 53 lines

How it starts

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

Write Go Code

Core Principles

  1. Clarity over cleverness - Code should be obvious to readers
  2. Simplicity - Accomplish goals in the most straightforward way
  3. Consistency - Match surrounding code and project conventions
  4. Minimal indentation - Handle errors early, keep happy path unindented

Workflow

  1. Run automated checks (make lint, make fmt or gofmt, goimports)
  2. Review against essential checklist: references/essential/checklist.md
  3. For specific questions, consult: references/comprehensive/{topic}.md
  4. When creating or editing Cobra root commands, consult: references/comprehensive/cobra.md

Reference Navigation

Quick reviews (default):

  • references/essential/checklist.md - Condensed, actionable rules

Deep dives by topic:

  • references/comprehensive/naming.md - Package names, identifiers, receivers
  • references/comprehensive/errors.md - Error handling, panic/recover
  • references/comprehensive/concurrency.md - Goroutines, channels, context
  • references/comprehensive/testing.md - Test quality and patterns
  • references/comprehensive/code-organization.md - Imports, packages, structure
  • references/comprehensive/data-types.md - new vs make, slices, maps
  • references/comprehensive/functions.md - Multiple returns, defer
  • references/comprehensive/interfaces.md - Embedding, type assertions
  • references/comprehensive/makefile-conventions.md - Required CI targets, fmt vs format
  • references/comprehensive/cobra.md - Cobra root command usage templates

Pull Request Review

When reviewing a pull request, apply ./references/review-checklist.md: the rules of this guide that a reviewer can check in a diff, ranked as Important, Nits and Do not flag. The same checklist is installed into repositories for automated reviewers, so update it whenever a rule here changes.

Sources

Read the full file on GitHub · 53 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. 9d ago Changed · +1 lines · +11 tokens per session 136c0c6e81fb
  2. 25d ago Changed · +4 lines d116396f873a
  3. 26d ago Changed · -3 lines · -51 tokens per session 08cc1b3cd6b9
  4. 1mo ago First seen · 51 lines · 86 tokens per session scan A 2fb4727f1e8e

Subscribe to this mod's changes

write-go-code is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 525 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

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

golang-refactoring

Golang refactoring — safe, at-scale restructuring of existing Go code: a coverage-adaptive safety net, behavior-preserving transforms (gopls Rename/Extract, gofmt -r, gopatch), the Fowler catalog mapped to Go, breaking import cycles, and small stacked PRs. Apply when a function or type has grown too large, a code…

samber/cc-skills-golang · 220 tokens

go-concurrency-safety

L1 supplement - audits Go-specific concurrency hazards in node client code: map iteration non-determinism, goroutine leaks, mutex ordering, panic boundaries, context cancellation.

PlamenTSV/plamen · 40 tokens

go-architecture-review

Good architecture makes the next change easy. Bad architecture makes every change scary.

eduardo-sl/go-agent-skills · 0 tokens

context-lifecycle

Review goroutines, timers, callbacks, actor handoffs, and async cleanup for context lifetime bugs. Use when code starts work that may outlive the caller, especially from RPC handlers, wallet startup, daemon startup, actors, or notification registrations.

lightninglabs/wavelength · 53 tokens

go-design

Structure and restructure Go code the Go way: dependency direction between packages, consumer-defined interfaces, composition instead of inheritance, smell-driven refactoring in small safe steps, and changing untested code with characterization tests and seams. Use when placing code in a RonyKit feature module…

clubpay/ronykit · 129 tokens