agentleFS
MasriyanMasriyan/gemini-security-skills/go-programming/SKILL.md

go-programming

Skill4 starsChanged 5 months agoMITView on GitHub

Go software engineering skill for designing, implementing, debugging, testing, reviewing, and refactoring Go applications, CLIs, APIs, services, concurrency code, modules, and tooling. Use for .go files, go.mod/go.sum, goroutines/channels, interfaces, error handling, performance profiling, race fixes, and idiomatic Go architecture.

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer small interfaces at consumer boundaries, explicit errors, table-driven tests, and simple composition over abstraction.

    line 11
  2. Very specific:

    Run targeted go test first, then wider tests when feasible.

    line 13
  3. Distinctive:

    Add or update tests for success paths, failure paths, edge cases, and races.

    line 20
  4. Distinctive:

    Verify with formatting, tests, vet/static analysis if available, and a concise summary of risks.

    line 21
  5. Very specific:

    Use context.Context as the first parameter for request-scoped work.

    line 25
  6. Distinctive:

    Keep goroutine lifecycle explicit with cancellation, bounded queues, and ownership of channel close.

    line 27
  7. Distinctive:

    Avoid package globals unless they are immutable constants or intentionally shared.

    line 28
  8. Distinctive:

    Use benchmarks and profiles before performance rewrites.

    line 29

≈ “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.

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

Go Programming

Operating Rules

  • Inspect go.mod, package layout, tests, and existing style before changing code.
  • Prefer small interfaces at consumer boundaries, explicit errors, table-driven tests, and simple composition over abstraction.
  • Preserve exported API compatibility unless the user asks for a breaking change.
  • Run targeted go test first, then wider tests when feasible. Use go test -race for concurrency changes when practical.

Workflow

  1. Build context with rg --files, go list ./..., and targeted reads of affected packages.
  2. Identify package boundaries, public types, side effects, and concurrency ownership.
  3. Implement the smallest cohesive change with clear errors and context-aware cancellation.
  4. Add or update tests for success paths, failure paths, edge cases, and races.
  5. Verify with formatting, tests, vet/static analysis if available, and a concise summary of risks.

Go Standards

  • Use context.Context as the first parameter for request-scoped work.
  • Wrap errors with %w when callers can act on the cause; avoid string matching.
  • Keep goroutine lifecycle explicit with cancellation, bounded queues, and ownership of channel close.
  • Avoid package globals unless they are immutable constants or intentionally shared.
  • Use benchmarks and profiles before performance rewrites.

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.

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.