PlugWiki

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. 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. 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

  1. Best Practices Summary
  2. Library Choice
  3. Parameterized Queries
  4. Dynamic IN clauses
  5. Dynamic column names
  6. Struct Scanning and NULLable Columns
  7. Error Handling
  8. Always close rows
  9. Common database error patterns
  10. Context Propagation
  11. Transactions, Isolation Levels, and Locking
  12. Connection Pool
  13. Migrations
  14. Avoid Hidden SQL Features
  15. Schema Creation
  16. Deep Dives

Key facts

Author
samber
License
MIT
Skill version
1.3.2
Installs on skills.sh
41,732 (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 mode

  • Scans 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 mode

  • Fifteen rules, from "no ORMs" to "never create or modify database schemas"

    Best Practices Summary

  • A four-row table comparing database/sql, sqlx, pgx and GORM/ent (marked avoid)

    Library Choice

  • Placeholders for values, sqlx.In for IN clauses and an allowlist for dynamic column names

    Parameterized Queries

  • Handles sql.ErrNoRows with errors.Is, closes rows and checks rows.Err()

    Error Handling

  • Sets SetMaxOpenConns, SetMaxIdleConns, SetConnMaxLifetime and SetConnMaxIdleTime

    Connection Pool

  • Use golang-migrate, Flyway or Atlas, with migration SQL written and reviewed by humans

    Migrations

  • States that the skill does not create or change schemas

    Schema Creation

  • Four 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-onlyNo read-only setting is documented in SKILL.md.
Talks toYour AI provider receives the Go code and command output Claude reads
Sign-in and keysSKILL.md names no account or API key.
Scopes
  • Claude edits Go files in your project

  • Claude runs go, golangci-lint and git commands

  • Review mode uses a sub-agent to scan your code

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

Folder
skills/golang-database

samber/cc-skills-golangskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 7
  1. cc-skills-golang · github.com
  2. cc-skills-golang README · github.com
  3. plugin.json · github.com
  4. skills CLI commands · github.com
  5. README.md#-how-to-use · github.com
  6. golang-database SKILL.md · github.com
  7. golang-database on skills.sh · skills.sh

Updated Nov 2, 2026.