Implement Go database access with context, pool tuning, transaction boundaries, and repository seams.

MITAuto-check passedDatabases

Install Golang Database

skills CLI
$ npx skills add HoangNguyen0403/agent-skills-standard --skill golang-database -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HoangNguyen0403/agent-skills-standard golang-database --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/golang/golang-database .claude/skills/golang-database && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
golang-database
GitHub stars
572
Token cost
~824 tokens
SKILL.md length
354 words
Files
4 (incl. references)
Skills in repo
211
Repo updated
First seen
Licence
MIT

At a glance

Implement Go database access with context, pool tuning, transaction boundaries, and repository seams.

  • Works in 6 steps: Choose the access layer: database/sql,… → Tune the pool: max open, max idle,… → Hide storage details behind repository… → …
  • Building repositories
  • SKILL.md covers Priority: P0 (CRITICAL), Rules, Recipe and Verify, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Golang Database is an agent skill from HoangNguyen0403/agent-skills-standard. Implement Go database access with context, pool tuning, transaction boundaries, and repository seams. Use when building repositories, tuning sql.DB or pgx, or reviewing DB transaction flow in Go.

Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `evals/evals.json`, `references/connection-tuning.md` and `references/repository-pattern.md`).

It sits in Databases, covering SQL. It works with Go and SQL. The repository describes itself as: A collection of Agent Skills Standard and Best Practice for Programming Languages, Frameworks that help our AI Agent follow best practies on frameworks and programming laguages. The licence is MIT.

When your agent uses it

  • Building repositories
  • Reviewing DB transaction flow in Go

Example prompts

  • “/golang-database”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Choose the access layer: database/sql, pgx, sqlx, sqlc, or ORM only if standardized.
  2. Tune the pool: max open, max idle, connection lifetime, and idle lifetime.
  3. Hide storage details behind repository methods or query services.
  4. Close rows and inspect rows.Err().
  5. Wrap multi-step writes in one transaction using a withTx helper with defer tx.Rollback().
  6. Chunk large slice lookups: partition slices into batches of ≤ 1,000 before running IN queries.

What it can do on your machine

Read from SKILL.md and the folder at commit b529c2d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Golang Database loads about 824 tokens when it runs, and up to ~1.7k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 354 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~824
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HoangNguyen0403/agent-skills-standard at commit b529c2d, republished under its MIT licence (© HoangNguyen0403). 354 words, ~824 tokens.

Download SKILL.mdSave it as .claude/skills/golang-database/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
golang-database
description
Implement Go database access with context, pool tuning, transaction boundaries, and repository seams. Use when building repositories, tuning `sql.DB` or `pgx`, or reviewing DB transaction flow in Go.

Golang Database

Priority: P0 (CRITICAL)

Rules

  • Prefer explicit SQL or generated query layers when performance and shape matter.
  • Configure the pool; defaults are rarely enough for real traffic.
  • Pass context.Context as the first argument to every query path.
  • Strict Parameterization: Always use parameterized placeholders (?, $1); never interpolate user strings into queries.
  • Dynamic IN Batching: Generate safe placeholders (strings.Repeat("?,", len(ids))) or sqlx.In and partition lists into chunks ≤ 1,000 items to avoid driver parameter limits.
  • Explicit Column Aliasing: Always alias duplicate column names in multi-table queries (e.g. m.code AS code); drivers map by name and silently collide on joins.
  • Transaction Boundaries: Manage transactions at the service layer using withTx(ctx, db, fn) with mandatory defer tx.Rollback(). Keep transactions short and focused on writes.
  • Streaming & Keyset Pagination: Stream large result sets using rows.Next() directly into models to prevent unbounded memory allocation.

Recipe

  1. Choose the access layer: database/sql, pgx, sqlx, sqlc, or ORM only if standardized.
  2. Tune the pool: max open, max idle, connection lifetime, and idle lifetime.
  3. Hide storage details behind repository methods or query services.
  4. Close rows and inspect rows.Err().
  5. Wrap multi-step writes in one transaction using a withTx helper with defer tx.Rollback().
  6. Chunk large slice lookups: partition slices into batches of ≤ 1,000 before running IN queries.
Show full SKILL.md (144 more words)Show less

Verify

  • Query methods accept context.Context.
  • Pool settings are explicit.
  • Rows are closed and iteration errors checked (rows.Err()).
  • Large IN (...) queries chunk parameters into batches of ≤ 1,000.
  • Joined queries use explicit column aliases without SELECT *.
  • Transaction scope matches one business action and uses defer tx.Rollback().
  • Retry/idempotency policy is clear for contested writes.

Anti-Patterns

  • No global db var: inject DB connection via constructor.
  • No context-less queries: use QueryContext/ExecContext; bare queries ignore timeouts.
  • No string concatenation in SQL: never build dynamic clauses with fmt.Sprintf or +.
  • No unbounded IN lists: avoid passing un-chunked slices with > 1,000 items into a single query.
  • No SELECT * on Joins: avoid unaliased duplicate column names across joined tables.
  • No leaked rows: always defer rows.Close() and check rows.Err().
  • No transaction split-brain: handler, repo, and service cannot each open their own transaction for one unit of work.

References

© HoangNguyen0403, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/golang/golang-database of HoangNguyen0403/agent-skills-standard.

  • SKILL.md
  • evals/evals.json
  • references/connection-tuning.md
  • references/repository-pattern.md

Open the folder on GitHubat commit b529c2d

Compare with similar skills

Golang Database next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Golang Database compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Golang Database this skillHoangNguyen0403/agent-skills-standard572—~824Automated safety check: PassMIT
Squixeduardofuncao/squix273—~784Automated safety check: PassMIT
Golang Databaseunxed/f42442 repos~2.9kAutomated safety check: PassMIT
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0
Safe SQL Executionsupabase/supabase111k—~4.2kAutomated safety check: PassApache-2.0
Citus Backportcitusdata/citus13k—~3.2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Squix

    eduardofuncao/squix

    Run SQL queries across databases (Postgres, MySQL, SQLite, etc.) via the squix CLI.

    273 GitHub stars~784 tokensUpdated 18 days ago
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    244 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed
  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • Safe SQL Execution

    supabase/supabase

    Official

    A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…

    111k GitHub stars~4.2k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Citus Backport

    citusdata/citus

    Backport one or more merged citusdata/citus main commits/PRs onto the active release branches.

    13k GitHub stars~3.2k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed

More from HoangNguyen0403/agent-skills-standard

All 211 skills in this repo
  • Subagent-Driven Development

    HoangNguyen0403/agent-skills-standard

    Runs a multi-task implementation plan by sending each task to a fresh implementer subagent, reviewing it independently, then reviewing the whole branch.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • draw.io Architecture Diagramming

    HoangNguyen0403/agent-skills-standard

    Draws architecture diagrams as editable draw.io files from a JSON spec, with a fixed house style, one C4 level per diagram and evidence-tagged shapes.

    572 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Android Navigation 3 Guide

    HoangNguyen0403/agent-skills-standard

    Implements and migrates to Jetpack Navigation 3 in Compose: NavDisplay, typed route objects, a state-list back stack, deep links, multiple back stacks and dialog scenes.

    572 GitHub stars~687 tokensUpdated yesterday
    Auto-check passed
  • Angular HttpClient Standards

    HoangNguyen0403/agent-skills-standard

    Sets rules for Angular HTTP code: functional interceptors, typed requests, services that own every call, and httpResource for reactive data loading in Angular 17+.

    572 GitHub stars~652 tokensUpdated yesterday
    Auto-check passed
  • Angular Tooling

    HoangNguyen0403/agent-skills-standard

    Angular CLI usage, code generation, build configuration, and bundle optimization.

    572 GitHub stars~743 tokensUpdated yesterday
    Auto-check passed
  • Common Code Review

    HoangNguyen0403/agent-skills-standard

    Conduct high-quality, persona-driven code reviews. An agent skill from HoangNguyen0403/agent-skills-standard.

    572 GitHub stars~772 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Golang Database

What does Golang Database do?

Implement Go database access with context, pool tuning, transaction boundaries, and repository seams. Golang Database is an agent skill from HoangNguyen0403/agent-skills-standard. Implement Go database access with context, pool tuning, transaction boundaries, and repository seams.

When should I use Golang Database?

Golang Database fits situations like: building repositories; reviewing DB transaction flow in Go.

How do I install Golang Database in Claude Code?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill golang-database -a claude-code`. Or copy the skill folder (skills/golang/golang-database in HoangNguyen0403/agent-skills-standard) into .claude/skills/golang-database in your project. Claude Code loads it when a task matches its description.

How do I install Golang Database in Codex?

Run `npx skills add HoangNguyen0403/agent-skills-standard --skill golang-database -a codex`. Or copy the skill folder (skills/golang/golang-database in HoangNguyen0403/agent-skills-standard) into .agents/skills/golang-database in your project. Codex loads it when a task matches its description.

Can I use Golang Database in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HoangNguyen0403/agent-skills-standard --skill golang-database -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-database, .gemini/skills/golang-database, .github/skills/golang-database and .opencode/skills/golang-database in your project.

What does Golang Database need to run?

SKILL.md names no scripts, command-line tools or credentials: Golang Database is instructions for the agent only.

Does Golang Database access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Golang Database safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Golang Database use?

Golang Database is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Golang Database use?

About 824 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 862 tokens, read only when the agent opens those files.

What are the alternatives to Golang Database?

Skills that share tags, products or a category with Golang Database: Squix (eduardofuncao/squix, 273 stars), Golang Database (unxed/f4, 244 stars), Evolving The Data Model (TriliumNext/Trilium, 38k stars) and Safe SQL Execution (supabase/supabase, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Golang Database?

HoangNguyen0403 (a GitHub user) maintains it in HoangNguyen0403/agent-skills-standard, which has 572 GitHub stars. The repository holds 211 skills in this directory. The repository was last updated on October 9, 2026.

Source: HoangNguyen0403/agent-skills-standard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.