go-dev
Skill1 starsChanged 8 months agoApache-2.0View on GitHub
Writes, reviews and lints Go code, with idiomatic error handling, table-driven tests, golangci-lint v2 configuration, and a one-command run of format, lint, vet, tidy, govulncheck and race tests. Use when working on a .go file or go.mod, reviewing a Go PR or function, asking "is this idiomatic Go", setting up or fixing golangci-lint, writing Go tests, or chasing a Go lint, vet or race failure. Not for other languages.
- Installs packages
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
No secrets or personal data in logs or error messages.
- Very specific: line 23
Know the module: Read go.mod (module path, go directive), the lint config (.golangci.yml) and .github/workflows for the pinned …
- Very specific: line 57
Verify a version-gated language or library feature against the release notes (go.dev/doc/go1.N) and the module's go directive before using …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go development and review
Scope: anything in .go files or go.mod. This skill adds the how-to and the review method on top of a short baseline of Go
conventions. If the project already has its own written Go conventions, they win over the baseline below.
Baseline conventions
- Handle every error; never discard one with
_unless a comment says why that is safe. - Wrap with
%wand add context (fmt.Errorf("get user %d: %w", id, err)); compare witherrors.Is/errors.As, never by message. context.Contextis the first parameter of anything that does I/O, and is never stored in a struct.- One structured logger per module (
log/slog, zerolog or zap, whichever the module already uses). Nofmt.Printlnfor logging. - Table-driven tests for every new function, with named cases.
- No secrets or personal data in logs or error messages.
Workflow
- Know the module. Read
go.mod(module path,godirective), the lint config (.golangci.yml) and.github/workflowsfor the pinned golangci-lint version. A repo with no lint config is the first finding. - Run the mechanical gates before judging anything.
node ${CLAUDE_SKILL_DIR}/scripts/go-check.mjs <module-dir>(add--fastto skip govulncheck and the test run). It prints one PASS, FAIL, MISS or WARN line per gate: format,golangci-lint run,go vet,go mod tidy -diff,govulncheck,go test -race. It uses the repo's own lint config, else the baseline inassets/golangci.yml, and says which. A MISS line means a tool is not installed: report it and install the pinned version; do not skip the gate. Exit 2 means the directory has nogo.mod. - Review the judgment items in
references/review-checklist.md. Never restate lint output; the tool line is the finding. - Write the findings in the format of
references/review-output.md(file:line, why, fix with an effort estimate, source). - Writing new code or tests? Pick the reference from the table, write it, then run the gates again.
Which reference
| Task | Read |
| Error shapes, HTTP client or server, concurrency, shutdown, logging, modern stdlib, performance | references/idioms.md |
Writing or fixing Go tests, fakes, fuzz, benchmarks, the -race run | references/testing-go.md |
| Review judgment: naming, interfaces, errors, modules, comments, commits | references/review-checklist.md |
| Writing up review findings | references/review-output.md |
Creating, migrating or debugging .golangci.yml; install; CI pin; version drift | references/golangci-lint-v2.md |
| Redis, HTTP, SQL or other pooled clients; locks, dedup, at-least-once delivery | references/shared-state-and-clients.md |
Related skills: testing covers TypeScript and JavaScript tests, ci-cd-pipelines covers wiring the gates into CI, security-review
covers a deeper security pass than gosec and govulncheck give.
Rules that bite
- golangci-lint is v2. A config with
enable-all,disable-all,linters-settings,skip-dirs,issues.exclude-rules,gosimpleortypecheckis a v1 file: rungolangci-lint migrate, then diff it. Install the pinned binary (the official page discouragesgo install); pin the same version locally and in CI. - Fix the code, never the gate: no
//nolintwithout a linter name and a reason, no exclusions outside_test.goforgosecornoctx, no lowered thresholds. go-checkis only as good as the installed tools. Say which gates did not run (MISS, skipped race) in the review, so "green" is not claimed on a partial run.- Verify a version-gated language or library feature against the release notes (go.dev/doc/go1.N) and the module's
godirective before using or recommending it. - A problem found outside the change under review is still a finding: put it in the plan or an issue that names the layer which fixes it.
Evidence
Cite file:line for every claim about the code. Quote the failing go-check line for every claim that a gate fails. Do not call a change
safe to merge without a green go-check (or a stated list of the gates that could not run).
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- doccker/cc-use-exp★ 1ksame name
- tenequm/skills★ 40same name
- betterlmy/agent-skills★ 2same name
- bmcszk/agent-skills★ 2same name
- yuexueyu/anna-agent-skills★ 2same name
- dstotijn/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- accessibility-wcagSkill
- api-designSkill
- bugbounty-reportSkill
- ci-cd-pipelinesSkill
- codebase-analysisSkill
- database-designSkill
- design-docSkill
- docker-kubernetesSkill
- git-workflowSkill
- i18n-localizationSkill
- llm-integrationSkill
- nextjs-16Skill
- oauth-authSkill
- performance-optimizationSkill
- python-best-practicesSkill
- scraping-automationSkill
- security-reviewSkill
- seo-metaSkill
- tailwind-cssSkill
- testingSkill
- ts-devSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

