agentleFS
erikhowarderikhoward/agent-tools/skills/go/SKILL.md

go

Skill0 starsChanged 3 months agoMITView on GitHub

Apply repository-aware Go conventions for APIs, errors, context, concurrency, ownership, tests, and verification. Use when writing, reviewing, or changing Go code.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the repository's Go version, formatter, linter, package layout, and CI commands.

    line 12
  2. Very specific:

    Use standard Go naming. Preserve conventional initialisms such as ID, URL, and HTTP.

    line 16
  3. Very specific:

    Put context.Context first.

    line 17
  4. Distinctive:

    Treat ownership as part of the API.

    line 20
  5. Distinctive:

    Never start a goroutine without an owner, stop condition, and cleanup path.

    line 21
  6. Distinctive:

    Keep exported comments useful and accurate.

    line 23
  7. Distinctive:

    Test observable behavior with repository conventions.

    line 27
  8. Distinctive:

    Run the repository's focused checks first.

    line 31
  9. Very specific:

    Run go build ./... when build coverage adds evidence.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Go

Follow the repository's Go version, formatter, linter, package layout, and CI commands. Do not install tools, change configuration, or format unrelated files unless requested.

Contracts

  • Use standard Go naming. Preserve conventional initialisms such as ID, URL, and HTTP. Keep package names short and avoid package-name stutter.
  • Put context.Context first. Pass it through call chains. Do not store it in structs unless an API contract requires that design.
  • Return errors as values. Add useful operation context with %w when callers need the cause. Use lowercase error text without trailing punctuation. Do not both log and return the same error at one layer.
  • Define small interfaces at the consumer. Start with concrete types. Add abstraction only for an observed boundary or substitution need.
  • Treat ownership as part of the API. Document whether callers can retain or mutate slices, maps, buffers, channels, and returned resources.
  • Never start a goroutine without an owner, stop condition, and cleanup path. Bound queues and fan-out. Avoid holding locks during I/O or callbacks.
  • Preserve nil versus empty collections when it affects serialization or API behavior.
  • Keep exported comments useful and accurate. Do not restate signatures.

Tests

Test observable behavior with repository conventions. Use table tests when several inputs share one contract, not as ceremony. Ensure concurrent tests terminate and do not depend on timing when synchronization is available.

Verification

Run the repository's focused checks first. Common fallbacks are:

gofmt -w <changed-files>
go test ./...
go vet ./...

Run go build ./... when build coverage adds evidence. Report unavailable checks. Do not download latest tooling as part of verification.

Adapted from the Google Go Style Guide (CC BY 4.0).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.