Individual skill

go-cli-sql-storage

Design, implement, test, and ship SQL-backed persistence for Go CLIs using database/sql, explicit pool ownership, bounded startup checks, embedded migrations, transaction boundaries, parameterized queries, adapter error mapping, Scanner and Valuer types, SQLite or server databases, and real-driver integration tests. Use when a Go command stores durable state in SQL, initializes a local database, applies schema changes, or needs safe repository and transaction behavior.

plugins/LVTD-LLC/skills/skills/go-cli-sql-storage/SKILL.md

Read pinned source

Source commit d780783eba4ecc7c8b9429f95c9362df95f07c61

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Network or broad shell
Last checked
Nov 4, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
1,533
Repository last updated
Nov 7, 2026
License
Apache-2.0

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Go CLI SQL Storage

Treat `*sql.DB` as a long-lived pool owned by the composition root. Keep SQL,
driver behavior, migrations, and sensitive connection details inside adapters.

## Core Workflow

1. Choose the database and driver from workload, platform, and distribution needs.
2. Define domain operations and transaction ownership before repository methods.
3. Open and configure one long-lived pool at the composition root.
4. Verify required startup connectivity with a bounded `PingContext`.
5. Apply versioned migrations using an explicit serialization policy.
6. Implement parameterized queries and map driver errors to stable domain errors.
7. Test consumers with fakes and adapters with the real driver and production schema.