Golang Database
Go database/sql, sqlx, pgx best practices — parameterization, transactions, pooling, NULLs.
Test report
- Verdict
- Tested · Works
- Score
- Tested
- Jul 13, 2026
- Environment
- Claude Code 2.x (agent harness)
- Upstream re-checked
- Aug 10, 2026 · 9935014
Fed it a Go handler with string-formatted SQL and no rows.Close(); it named the exact violated rule (#5 'rows MUST be closed') and rewrote the function with sqlx.GetContext and explicit sql.ErrNoRows handling instead of just flagging 'looks unsafe.'
Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works
- Installs cleanly 5/5
- Triggers reliably 5/5
- Output vs. baseline 7/10
- Docs & honesty 5/5
What Golang Database does
A best-practices checklist and persona for writing or reviewing Go code that talks to Postgres, MySQL, MariaDB, or SQLite. Triggers when the user is writing, reviewing, or debugging database/sql, sqlx, or pgx code, and explicitly refuses to generate schemas or migration SQL, deferring those to human review. Ships four deep-dive reference docs (transactions, performance, testing, scanning) all present in the repo.
How to install Golang Database
git clone https://github.com/samber/cc-skills-golang
cd cc-skills-golang
mkdir -p ~/.claude/skills
cp -r skills/golang-database ~/.claude/skills/golang-database
Skills live in ~/.claude/skills/ (global) or .claude/skills/
(per-project). Restart Claude Code after installing.
Commands — how to trigger Golang Database
-
/golang-databaseGo database/sql, sqlx, pgx best practices — parameterization, transactions, pooling, NULLs.
It also activates on plain-language prompts like these:
-
Review this Go function that queries Postgres for SQL injection risks -
How should I handle sql.ErrNoRows in Go when using sqlx -
Debug this pgx connection pool exhaustion issue in my Go service
Frequently asked questions
- Is the Golang Database skill free?
- Yes. The skill itself is free from samber/cc-skills-golang. SkillProof publishes the install command and an independent test verdict at no cost.
- Does Golang Database work with Claude Code?
- We tested it with Claude Code 2.x (agent harness) on Jul 13, 2026. Verdict: Tested · Works. Fed it a Go handler with string-formatted SQL and no rows.Close(); it named the exact violated rule (#5 'rows MUST be closed') and rewrote the function with sqlx.GetContext and explicit sql.ErrNoRows handling instead of just flagging 'looks unsafe.'
- What is the Golang Database SkillProof Score?
- 8.8/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 7/10, docs & honesty 5/5.
- How do I install Golang Database?
- Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
- Can I use Golang Database with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
- The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.