
Golang Database Patterns
This walks you through the three main layers of Go's SQL tooling: the standard library's database/sql, sqlx for struct scanning and named queries, and pgx when you need PostgreSQL-specific performance. It covers repository patterns for testing, migration workflows with golang-migrate, and connection pooling setup. Basically the practical stuff you'd want when moving past tutorial code into production database work. The 200+ installs suggest people are reaching for this when they're tired of cobbling together database patterns from scratch or want a reference for the pgx vs sqlx decision.
- skills.sh installs
- 414
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill golang-database-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
Go Database Patterns
Overview
Go's database ecosystem provides multiple layers of abstraction for SQL database integration. From the standard library's database/sql to enhanced libraries like sqlx and PostgreSQL-optimized pgx, developers can choose the right tool for their performance and ergonomics needs.
Key Features:
- 🔌 database/sql: Standard interface for any SQL database
- 🚀 sqlx: Convenience methods with struct scanning and named queries
- 🐘 pgx: PostgreSQL-native driver with maximum performance
- 📦 Repository Pattern: Interface-based data access for testability
- 🔄 Migrations: Schema versioning with golang-migrate
- ⚡ Connection Pooling: Production-ready connection management
- 🔒 Transaction Safety: Context-aware transaction handling
When to Use This Skill
Sponsors
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Backend & APIs, Go, Databases
- First seen
- Jun 3, 2026
More from bobmatnyc/claude-mpm-skills
All 158- Openrouter413
- Digitalocean Managed Databases404
- Verification Before Completion401
- Test Driven Development400
- Better Auth Authentication398
- Kysely398
- Kubernetes397
- Json Data Handling394
- Systematic Debugging391
- Vue390
- Api Documentation389
- Screenshot389
- Software Patterns382
- Nextjs V16380
- Vercel Deployments Builds378
- Security Scanning377
- Test Quality Inspector376
- Svelte5 Runes Static373
- Stacked Prs371
- Better Auth Core368
- Homebrew Formula Maintenance366
- Better Auth Integrations363
- Reporting Pipelines363
- Better Auth Plugins362