go
Skill8.2k starsChanged 58 days agoApache-2.0View on GitHub
How Go is written in this repo - errors, logging, spans, context, goroutines, comments. Read before writing or changing Go code.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about GetStream/Agents
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.404 → 0.6.405”GitHub · Nov 30, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.403 → 0.6.404”GitHub · Nov 30, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.402 → 0.6.403”GitHub · Nov 29, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.399 → 0.6.402”GitHub · Nov 27, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.7.1 → 0.6.399”GitHub · Nov 27, 2026
The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 8
Talked about on GitHub (8 times).
On GitHub · 8
- Nov 30, 2026agent-skills.github.getstream.agents: 0.6.404 → 0.6.405 — sudosubin/agents.nix0 reactions
- Nov 30, 2026agent-skills.github.getstream.agents: 0.6.403 → 0.6.404 — sudosubin/agents.nix0 reactions
- Nov 29, 2026agent-skills.github.getstream.agents: 0.6.402 → 0.6.403 — sudosubin/agents.nix0 reactions
- Nov 27, 2026agent-skills.github.getstream.agents: 0.6.399 → 0.6.402 — sudosubin/agents.nix0 reactions
- Nov 27, 2026agent-skills.github.getstream.agents: 0.7.1 → 0.6.399 — sudosubin/agents.nix0 reactions
3 more on GitHub
- Nov 25, 2026fix: retain 7 reviewed references that left discovery (Nov 25) — tekvisions/voice-index0 reactions
- Nov 24, 2026agent-skills.github.getstream.agents: 0.7.0 → 0.7.1 — sudosubin/agents.nix0 reactions
- Nov 17, 2026agent-skills.github.getstream.agents: init at 0.7.0 — sudosubin/agents.nix0 reactions
In this repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/python.mdcCursor rule
- pr-reviewSkill
- typesafe-aiSkill
- vgpuSkill
- accelerate-sales-engineerSkill
- add-connectorSkill
- check_pricesSkill
- cliSkill
- commitSkill
- connectorsSkill
- dashboardSkill
- decision_modelSkill
- deploySkill
- docsSkill
- generative-uiSkill
- good_morningSkill
- go-testingSkill
- integrate_new_modelsSkill
- llm-interfaceSkill
- loop_performance_benchSkill
- migrate-to-accelerateSkill
- new_modelsSkill
- paginationSkill
- parallel-agentsSkill
- performance_benchmarkSkill
- phonecheckSkill
- pricingSkill
- prospect-competitor-researchSkill
- provider_auditSkill
- prSkill
- querySkill
- refresh_model_statsSkill
- router-detectionSkill
- router-interfaceSkill
- router-llmSkill
- router-searchSkill
- router-stsSkill
- router-sttSkill
- router-ttsSkill
- scheduled-tasksSkill
- sdk-dartSkill
- sdk-dotnetSkill
- sdk-goSkill
- sdk-jsSkill
- sdk-kotlinSkill
- sdk-phpSkill
- sdk-rubySkill
- sdk-rustSkill
- sdkSkill
- sdk-swiftSkill
- securitySkill
- sttSkill
- telnyxSkill
- ttsSkill
The file
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
- Very specific: line 14
Check the go directive of the nearest go.mod before you use a newer feature.
- Very specific: line 21
Start no goroutine in init() or in a constructor.
- Distinctive: line 29
Write no new ticket, PR or plan reference in a comment: it belongs in the commit and the PR.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
These rules are the choices this repo makes. General Go style is not repeated here.
Rules
- Check the
godirective of the nearestgo.modbefore you use a newer feature. The 8 modules pin different versions:accelerationis on 1.27,tuion 1.26,sdks/goon 1.25. - Wrap an error with
%w. Start the message with the package name and say what was being done, with no "failed to":oauth2cc: token: %w. Return the error as is when it already says enough. Inacceleration/, callstack.Wrapwhere an error enters the code base (internal/stack/stack.go), then pass it up unchanged. - Handle an error once. Never log an error and also return it.
- Log with
log/slog. Put the data in key-value fields, not in the message:logger.Warn("could not store an MCP event subscription", "subscription", sub.ID, "error", err). - An HTTP handler returns its error and does not log it.
withRequestLog(internal/api/server.go) logs the error with its stack, and a 5xx at error level (see "HTTP API" in AGENTS.md). - Name a span in lowercase dotted words, the area then the step:
appconfig.read,quota.allow,turn.llm. - Pass
ctx context.Contextas the first parameter. Do not store a request's context in a struct. A service may hold a lifetime context made inNew, with its cancel function, aschannels.Servicedoes. - Start no goroutine in
init()or in a constructor. Start it inStart(ctx)orRun(ctx), aschatlog.Log.Startdoes. - Return a nil slice for "none". A JSON response is the exception: it sends
[], notnull. - Query Postgres through bun's builders (
NewSelect,NewInsert ... On("CONFLICT ..."),NewUpdate,NewDelete) on a model, notNewRaworExecContextwith a SQL string. A table without a model gets a small unexported one. An insert lists.Column(...)so database defaults still apply. Keep SQL raw only where the builder cannot write it or would change what it does: advisory locks,SET LOCAL, DDL and catalog reads,INSERT ... SELECT,WITH RECURSIVE, window andGROUPING SETSqueries, a statement whose SQL text a test matches, and jsonb that must refuse\u0000(bun stores it as text). - Defensive code (a retry, a fallback, a second check) gets a comment that names the concrete threat: concurrent writers, a network failure the caller retries, malformed input. If you cannot name one, do not add it (see "Code style" in AGENTS.md).
Comments
- A comment says why, once, in the fewest words. Do not narrate what the code does.
- Write no new ticket, PR or plan reference in a comment: it belongs in the commit and the PR. Leave the ones already there.
- A link to a public, stable source (an RFC, an engine's documented limits) is fine. The comment still states the fact.
Other skills
- Tests: the
go-testingskill (.claude/skills/go-testing/SKILL.md). - Timeouts on outbound calls and streams: the
securityskill (.claude/skills/security/go.md, "Abuse limits"). - N+1 queries and batch sizes: the
loop_performance_benchskill (.claude/skills/loop_performance_bench/SKILL.md).
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
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.

