Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/muratmirgun/gophersnpx agentmods add skills/muratmirgun/gophers/go-databaseWrote 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/muratmirgun/gophers/go-database)<a href="https://agentmods.dev/skills/muratmirgun/gophers/go-database"><img src="https://agentmods.dev/badge/skills/muratmirgun/gophers/go-database/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/muratmirgun/gophers/go-database"><img src="https://agentmods.dev/badge/skills/muratmirgun/gophers/go-database.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.00098 | $0.02256 |
| Opus 5.5 | $0.00039 | $0.00902 |
| Sonnet 5.5 | $0.00020 | $0.00451 |
| Haiku 4.5 | $0.00010 | $0.00226 |
Grade A, and why
go-database 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 2mo 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 — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Database
Go's database/sql is a thin, driver-pluggable foundation. Most projects layer one of sqlx, sqlc, or pgx on top for ergonomics. ORMs (GORM, ent) trade SQL visibility for one less line of code — a bad trade in production.
Core Rules
- SQL is the source of truth. It is reviewed, version-controlled, and explained in code. Magic ORM queries are the opposite.
- Always parameterize.
$1/?placeholders, never string concatenation. The driver handles escaping; you cannot. - Every I/O call takes
ctx.QueryContext,ExecContext,GetContext. No context = no timeout = a stuck handler. - Distinguish "not found" from "error".
errors.Is(err, sql.ErrNoRows)is a domain signal, not a failure. - Close rows.
defer rows.Close()immediately afterQueryContext. Forgetting it leaks a pool connection. - Configure the pool. Default
MaxOpenConnsis unlimited — a runaway request rate exhausts the DB.
Library Decision
| Library | Best for | Struct scanning | Code-gen |
|---|---|---|---|
database/sql |
Minimal deps, multi-driver portability | Manual Scan |
No |
sqlx |
Sweetens database/sql ergonomics |
StructScan, Get, Select |
No |
sqlc |
Type-safe queries derived from .sql files |
Generated structs and funcs | Yes |
pgx (v5) |
PostgreSQL-only, 30-50% faster, native types | pgx.RowToStructByName |
No |
| GORM / ent | Avoid in new code | Reflection | Yes |
Why not ORMs.
- Generated queries are unpredictable; N+1 problems are invisible at the call site.
- Hooks (
BeforeCreate,AfterUpdate) create implicit state machines. - Schema migrations entangle with application code.
- Learning the ORM API is harder than learning SQL, and the abstraction leaks at every interesting query.
Read references/library-tradeoffs.md when picking between sqlx, sqlc, and pgx for a new project.
Parameterized Queries
// VERY BAD — SQL injection.
q := fmt.Sprintf("SELECT * FROM users WHERE email = '%s'", email)
// Good — placeholder, driver-escaped.
err := db.GetContext(ctx, &u, "SELECT id, email FROM users WHERE email = $1", email)
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.
- 2mo ago First seen · 203 lines · 98 tokens per session scan A e5e2acd03d62
go-database is a skill published in the GitHub repository muratmirgun/gophers (9 stars, last pushed 2mo ago), licensed MIT. It adds 98 tokens to every session and 2,256 once invoked, about $0.0004 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-08-31.
go-database compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| go-databasemuratmirgun/gophers | Skill | 9 | 2mo ago | MIT | A | 98 | Claude Code |
| backend-building-swarmserejaris/kimi-skills | Skill | 11 | 3mo ago | MIT | A | 107 | Claude Code, Codex |
| backend-buildingserejaris/kimi-skills | Skill | 11 | 3mo ago | MIT | A | 71 | Claude Code, Codex |
| backend-setup-stackWESTsyre21/setup-backend-stack | Skill | 4 | 4mo ago | MIT | A | 155 | Claude Code, Codex |
| django-expertvintasoftware/django-ai-plugins | Skill | 171 | 3mo ago | none | A | 55 | Claude Code |
| backend-setup-stackWESTsyre21/setup-backend-stack | Skill | 4 | 4mo ago | MIT | A | 54 | Claude Code, Codex |
| convexbntvllnt/agent-skills | Skill | 17 | 5mo ago | MIT | A | 160 | Claude Code, Codex |