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.
npx skills add kouroshez/coding-os --skill go-patternsgit clone --depth 1 https://github.com/kouroshez/coding-osWrote 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.
[](https://agentmods.dev/skills/kouroshez/coding-os/go-patterns)<a href="https://agentmods.dev/skills/kouroshez/coding-os/go-patterns"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/go-patterns/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.
<a href="https://agentmods.dev/skills/kouroshez/coding-os/go-patterns"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/go-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.00718 |
| Opus 5.5 | $0.00025 | $0.00287 |
| Sonnet 5.5 | $0.00012 | $0.00144 |
| Haiku 4.5 | $0.00006 | $0.00072 |
Grade A, and why
go-patterns 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 8d 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.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
REQUIRED BACKGROUND: You MUST also follow the clean-code skill (.claude/skills/clean-code/SKILL.md). That skill covers universal principles (fail-closed errors, self-documenting code, edge cases, error path tests). This skill adds Go-specific patterns on top.
Pre-Code Checklist
- Read
docs/engineering/go-rules.md— canonical backend policy - If touching HTTP handlers: read
docs/playbooks/go-service.md - Confirm Go version (≥ 1.22 recommended for range-over-func)
- Search the repo with Grep/Glob for existing code before creating a new file
1. Project layout
src/backend/
├── cmd/<app>/main.go # entry point, wire dependencies
├── internal/
│ ├── http/ # handlers, middleware
│ ├── service/ # business logic (no net/http types)
│ ├── repo/ # data access
│ └── model/ # domain types
└── pkg/ # optional: packages intended for external reuse
2. Error handling
- Return errors, don't panic. Panic is for programming errors, not runtime conditions.
- Wrap with
fmt.Errorf("operation: %w", err)to preserve the chain. - Define sentinel errors for the domain:
var ErrNotFound = errors.New("not found"). - Check with
errors.Is/errors.As, never with string matching.
3. Context
- First argument of every function that crosses a service boundary:
ctx context.Context. - Never store context in struct fields.
- Propagate cancellation through service → repo → DB driver.
4. Concurrency
- Goroutines need a clear owner and a way to stop. No fire-and-forget unless the lifetime is the process.
- Use
sync.WaitGroup+context.Contextcancellation, orerrgroup.Group. - Channels ≠ shared memory. Prefer simple mutex + struct when the data is small and fast.
5. Testing
- Table-driven tests. Subtests via
t.Run(tc.name, ...). testing.T.TempDir()for filesystem fixtures.- Race detector in CI:
go test -race ./.... - Coverage target: ≥ 80%.
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 8d ago Changed 632207ae3af8
- 3mo ago First seen · 69 lines · 62 tokens per session scan A c2290788f071
go-patterns is a skill published in the GitHub repository kouroshez/coding-os (7 stars, last pushed 4d ago), licensed Apache-2.0. It adds 62 tokens to every session and 718 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.
go-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| go-patternskouroshez/coding-os | Skill | 7 | 4d ago | Apache-2.0 | A | 62 | Claude Code, Codex |
| api-clienteSlider/2dph | Skill | 3 | 23d ago | MIT | A | 0 | Claude Code, Codex |
| golang-proJeffallan/claude-skills | Skill | 13k | yesterday | MIT | A | 95 | Claude Code |
| golang-graphqlsamber/cc-skills-golang | Skill | 4.1k | 3d ago | MIT | A | 77 | Claude Code |
| platform-constrained-handlerclidey/whodb | Skill | 5.1k | yesterday | Apache-2.0 | A | 26 | Claude Code, Codex |
| golang-grpcsamber/cc-skills-golang | Skill | 4.1k | 3d ago | MIT | A | 72 | Claude Code |
| golang-swaggersamber/cc-skills-golang | Skill | 4.1k | 3d ago | MIT | A | 146 | Claude Code |