
Go database
Guides Go services through database/sql pools, transactions, migrations and ORM choices
Go database is an open-source agent skill for databases. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 90
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Go database
This skill gives an agent a set of Go-specific database conventions to apply when writing or reviewing data access code. It covers connection pool sizing and lifetimes, parameterized context-aware queries, a transaction helper that rolls back on error or panic, and locking and retry rules for serialization failures and deadlocks. It also points to repository pattern structure, sqlc for raw-SQL projects, and separately run versioned migrations.
The skill is organized as a short core guide with on-demand reference files for query and scan patterns, locking and retries, bulk writes and keyset pagination, and testing against a real database in a container. The agent is told to load a reference only when the summary is not enough. It also carries a checklist of twelve items to verify against finished code.
It expects a Go project with the Go toolchain available, and it is allowed to run go and gofmt commands. sqlc, golang-migrate and Docker are optional and only referenced where relevant.
When your agent uses it
Database patterns for Go services: database/sql, connection management, transactions, migrations, query builders, and ORM usage (sqlc, GORM, ent). Use when: "database access", "SQL query", "connection pool", "transactions", "database migration", "sqlc", "GORM", "ent", "prepared statement", "repository pattern". Not for: in-memory structures (go-data-structures), SQL security (go-security-audit), query profiling (go-performance-review).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- Asks for: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*)(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 6 files (21 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.
What it does
- Connection pool setup
- Explicit limits and lifetimes for database/sql pools, with guidance on sizing them.
- Safe transaction helper
- A wrapper pattern that rolls back on errors and panics and handles isolation levels.
- Query hygiene rules
- Parameterized, context-aware queries with proper row closing and no-rows handling.
- Locking and retry guidance
- Row locking, optimistic versioning and retry rules for serialization and deadlock errors.
- Migration and repository structure
- Advice on versioned, separately run migrations and consumer-side repository interfaces.
- Performance and testing patterns
- Batched bulk writes, keyset pagination, pool statistics and real-database test isolation.
Good for
- Set up a connection pool for a new Go service
- Write a transaction helper that rolls back safely
- Add a database migration for a schema change
- Review Go data access code for N+1 queries and leaked connections
- Implement a repository layer backed by sqlc or GORM
- Add keyset pagination to a large table query
Go database FAQ
What tools does the skill need?
It requires the Go toolchain. sqlc, golang-migrate and Docker are optional.
Which ORMs and tools does Go database cover?
It mentions sqlc, GORM, ent, goose, golang-migrate and atlas, and recommends sqlc for raw-SQL projects.
Does Go database run any scripts?
No, the skill contains no scripts. It instructs the agent using Go and gofmt commands.
Does Go database override project rules?
No. A project skill or agent-config rule that explicitly supersedes it takes precedence.
Does Go database run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Go database?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Go database?
The closest alternatives to Go database are Go backend, Database migrations, Go GraphQL, Database migrations and Go GRPC.
Where this comes from
- Description: from the skill's own SKILL.md.
More from eduardo-sl/go-agent-skills

Guides Go agents in designing HTTP REST APIs, handlers, middleware and shutdown
- Open source
- 90 GitHub stars
- Developer tools

Reviews Go project structure, dependency direction and module boundaries
- Open source
- 90 GitHub stars
- Developer tools

Guides an AI agent to build Go command-line tools with clean flags, streams and exit codes
- Open source
- 90 GitHub stars
- Developer tools

Guides Go code toward constructor injection, explicit wiring and no global state
- Open source
- 90 GitHub stars
- Developer tools

Guides Go code toward idiomatic design patterns like functional options and factories
- Open source
- 90 GitHub stars
- Developer tools

Guides building Go GraphQL servers with gqlgen, covering N+1 batching and query limits
- Open source
- 90 GitHub stars
- Developer tools



