golang-database Skill (samber): What It Does and How to Install It
Makes Claude write Go database code with parameterized queries, closed rows, context on every call and explicit transactions, using sqlx or pgx and no ORM.
- Installs
- 41.7K
- on skills.sh
- Stars
- 3.7K
- on GitHub
- Files
- 5
- besides SKILL.md
- Updated
- Nov 2026
- last repo commit
golang-database makes Claude write Go database code the way the skill author prefers: sqlx or pgx, never an ORM, with parameterized queries, a context on every call and explicit transaction boundaries. It works in write mode, or in review and debug mode with a sub-agent that scans for missing rows.Close() and absent error checks. SKILL.md says it does not generate database schemas or migration SQL, because schema design needs human review.
Good for
- Go backend developers using database/sql, sqlx or pgx with PostgreSQL, MySQL, MariaDB or SQLite
- Reviewers looking for un-parameterized queries, unclosed rows and missing context
- Claude Code and Codex users on Go services
Install golang-database
Claude Code
- 1
Copy this prompt.
Install the golang-database skill in Claude Code. Run this command: /plugin marketplace add samber/cc /plugin install cc-skills-golang@samber Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
The README says these skills are built as atomic, cross-referencing units, and that installing only a subset gives a partial and potentially inconsistent view of the guidelines. It recommends installing all the general-purpose skills together, which the plugin does. Its manifest lists no hooks or MCP servers, and the repo holds 46 skills. Use the skills CLI line only if you want just this one. Pick one route, not both.
From the project README. Source.
What's in the skill
When it loads
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use when writing, reviewing, or debugging Golang code that interacts with PostgreSQL, MariaDB, MySQL, or SQLite; for database testing; or for questions about database/sql, sqlx, or pgx. Does NOT generate database schemas or migration SQL.
Sections in SKILL.md
- Best Practices Summary
- Library Choice
- Parameterized Queries
- Dynamic IN clauses
- Dynamic column names
- Struct Scanning and NULLable Columns
- Error Handling
- Always close rows
- Common database error patterns
- Context Propagation
- Transactions, Isolation Levels, and Locking
- Connection Pool
- Migrations
- Avoid Hidden SQL Features
- Schema Creation
- Deep Dives
Key facts
- Author
- samber
- Repository
- samber/cc-skills-golang
- License
- MIT
- Skill version
- 1.3.2
- Installs on skills.sh
- 41,732 (Nov 2, 2026)
- GitHub stars
- 3,749 (Nov 2, 2026)
- skills.sh audits
- Gen Agent Trust Hub pass, Socket pass, Snyk pass (Nov 2, 2026)
- Last repo commit
- Nov 1, 2026
What it includes
Generates repository functions, query helpers and transaction wrappers
Launches a background agent to grep for existing query patterns and naming in your codebase before it generates new code.
Write ·
Write modeScans existing code for missing rows.Close(), un-parameterized queries and missing context
Uses a sub-agent to scan for unclosed rows, un-parameterized queries, missing context propagation and absent error checks while it reads the business logic.
Read ·
Review/debug modeFifteen rules, from "no ORMs" to "never create or modify database schemas"
Best Practices SummaryA four-row table comparing database/sql, sqlx, pgx and GORM/ent (marked avoid)
Library ChoicePlaceholders for values, sqlx.In for IN clauses and an allowlist for dynamic column names
Parameterized QueriesHandles sql.ErrNoRows with errors.Is, closes rows and checks rows.Err()
Error HandlingSets SetMaxOpenConns, SetMaxIdleConns, SetConnMaxLifetime and SetConnMaxIdleTime
Connection PoolUse golang-migrate, Flyway or Atlas, with migration SQL written and reviewed by humans
MigrationsStates that the skill does not create or change schemas
Schema CreationFour reference guides: transactions, testing, performance and struct scanning
Deep Dives
From the official docs
Permissions
Low risk
It lets Claude edit your Go files and run go, golangci-lint and git commands in your project, and the code it writes will talk to your database.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It edits Go files and runs go and git commands
The frontmatter allows Edit, Write and Bash for go, golangci-lint and git. Work on a branch and read the diff before you commit.
It stays away from schemas and migrations
SKILL.md says it does not create or change schemas and that migration SQL should be written and reviewed by humans. Do not rely on it for either.
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | No read-only setting is documented in SKILL.md. |
|---|---|
| Talks to | Your AI provider receives the Go code and command output Claude reads |
| Sign-in and keys | SKILL.md names no account or API key. |
| Scopes |
|
Questions
How do I install golang-database?
Use the install box above. The plugin route installs the whole Go skill set (46 skills in the repo), and the skills CLI route installs only this skill. Pick one so you do not get every skill twice. The README says these skills cross-reference each other and installing a subset gives a partial view.
Does golang-database work in the Claude app?
The README documents no Claude app install, so the Claude tab in the install box is our generic zip-upload route, not a documented one. The skill reads and edits Go files and runs go commands on your machine, so Claude Code or Codex is the better fit.
Does golang-database need an API key?
SKILL.md names no API key or account. It does need Go installed on your machine.
Is golang-database safe to run?
It edits your Go files and runs go, golangci-lint and git commands in your project, so work on a branch and read the diff before you commit. The skill bundles no scripts: its other files are reference guides and an evals/evals.json file.
Which databases does golang-database cover?
PostgreSQL, MariaDB, MySQL and SQLite, through database/sql, sqlx or pgx. Its testing guide covers mock connections and integration tests with containers.
Will it write my migrations or schema?
No. SKILL.md says it does not generate database schemas or migration SQL and tells you to use golang-migrate, Flyway or Atlas with human review.
Why does it say not to use an ORM?
The skill takes a position: it prefers sqlx or pgx and lists GORM and ent as "Avoid", giving unpredictable queries and hidden hooks as reasons. If your project already uses an ORM, say so in your prompt.
Information
updated Nov 2, 2026
- Repository
- samber/cc-skills-golang
- Folder
skills/golang-database
Sources
Docs, issue trackers and discussions this page is built from.
Show all 7Hide
- cc-skills-golang · github.com
- cc-skills-golang README · github.com
- plugin.json · github.com
- skills CLI commands · github.com
- README.md#-how-to-use · github.com
- golang-database SKILL.md · github.com
- golang-database on skills.sh · skills.sh