
Golang Database
Go database access guide covering parameterized queries, transactions, NULL handling, and connection pooling without ORMs.
- skills.sh installs
- 43K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
What it does
- Covers sqlx and pgx usage for PostgreSQL, MySQL, MariaDB, and SQLite, including struct scanning and NULLable columns
- Includes transaction and locking patterns: isolation levels,
SELECT ... FOR UPDATE, batch sizing, and connection pool settings - Enforces parameterized queries,
*Contextmethod variants, explicitsql.ErrNoRowshandling, androws.Close()after iteration - Designed for Go backend work in write, review, and debug modes, and explicitly does not generate schemas or migration SQL
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-database -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Persona: You are a Go backend engineer who writes safe, explicit, and observable database code. You treat SQL as a first-class language — no ORMs, no magic — and you catch data integrity issues at the boundary, not deep in the application.
Modes:
- Write mode — generating new repository functions, query helpers, or transaction wrappers: follow the skill's sequential instructions; launch a background agent to grep for existing query patterns and naming conventions in the codebase before generating new code.
- Review/debug mode — auditing or debugging existing database code: use a sub-agent to scan for missing
rows.Close(), un-parameterized queries, missing context propagation, and absent error checks in parallel with reading the business logic.
Community default. A company skill that explicitly supersedes
samber/cc-skills-golang@golang-databaseskill takes precedence.
Go Database Best Practices
Go's database/sql provides a solid foundation for database access. Use sqlx or pgx on top of it for ergonomics — never an ORM.
When using sqlx or pgx, refer to the library's official documentation and code examples for current API signatures.
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Go, Databases
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Naming43K
- Golang Safety42.7K
- Golang Project Layout42.5K
- Golang Documentation42.4K
- Golang Modernize42.4K
- Golang Lint42.3K
- Golang Data Structures42.3K
- Golang Troubleshooting42K
- Golang Observability42K
- Golang Dependency Management41.8K
- Golang Structs Interfaces41.7K
- Golang Cli41.5K
- Golang Benchmark41.5K
- Golang Dependency Injection41.4K
- Golang Popular Libraries41.4K
- Golang Stretchr Testify41.3K
- Golang Continuous Integration41.3K
- Golang Grpc41.1K
- Golang Samber Lo40.4K
- Golang Stay Updated40.3K
- Golang Samber Do40.2K
- Golang Samber Slog40.1K
- Golang Samber Oops40K
- Golang Samber Mo40K
Similar to Golang Database
More Go
drizzle-orm-patternsSkillgiuseppe-trisciuoglio/developer-kit5.9K installsComprehensive Drizzle ORM guide for type-safe schemas, queries, relations, transactions, and migrations across five databases.
golang-graphqlSkillsamber/cc-skills-golang38.8K installsGo GraphQL implementation guidance covering gqlgen and graphql-go, with schema design, resolver, and N+1 rules.
postgresqlSkill2025emma/vibe-coding-cn215 installsNonblocking PostgreSQL libpq connection, documentation-derived reference for connection functions and parameters.
DbxMCP servert8y231.1K starsRead and write access to DBX-configured databases: list connections, tables, and schemas, and run SQL.
prisma-driver-adapter-implementationSkillprisma/skills416.5K installsRequired reference for Prisma ORM 7 SQL driver adapter implementation, covering transactions, savepoints, and error mapping.