golang-database

Implement database transactions, repositories, query building, and soft deletion for PostgreSQL, MySQL, and SQLite.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ep0ll/bons-ci --skill golang-database-ep0ll
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-database
Source: https://github.com/ep0ll/bons-ci/tree/main/.agents/skills/database
Command: npx skills add https://github.com/ep0ll/bons-ci --skill golang-database-ep0ll

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the complexity of managing database interactions, transactions, and patterns in production environments, reducing errors and improving reliability.

Core Features & Use Cases

  • Transaction Management: Provides robust transaction handling for PostgreSQL, MySQL, and SQLite, ensuring data consistency across operations.
  • Repository Pattern: Simplifies data access with generic repositories, reducing boilerplate code for common CRUD operations.
  • Query Building: Offers type-safe, flexible query construction for efficient data retrieval and filtering.
  • Soft Delete & Audit: Implements non-destructive data deletion and audit trails to maintain data integrity and historical tracking.
  • Database Optimization: Includes connection pool tuning, read replica routing, bulk operations, and migrations to optimize performance.

Quick Start

Use the database skill to implement a transaction that updates user records in a safe and atomic manner.

Frequently Asked Questions about golang-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement transaction management in Go to ensure data consistency across multiple database operations?

Transaction management in Go ensures data consistency by wrapping multiple database operations into atomic units. This Skill provides robust transaction handling patterns for PostgreSQL, MySQL, and SQLite to safely execute operations like user record updates without partial failures.

What is the repository pattern in Go and how does it reduce boilerplate for CRUD operations?

The repository pattern in Go abstracts data access logic into generic repositories, reducing repetitive boilerplate code for CRUD operations. It separates data retrieval logic from business logic, simplifying data access and making your backend codebase more maintainable and scalable.

Does this database Skill support connection pool tuning and read replica routing for PostgreSQL?

Yes, this database Skill supports connection pool tuning and read replica routing for PostgreSQL. It includes database optimization features like pool configuration, read replica distribution, and bulk operations to ensure high performance and scalable connectivity in production environments.

How do I implement soft delete and audit trails in a Go backend to maintain historical data?

Implementing soft delete and audit trails in Go involves using non-destructive deletion patterns to retain records while marking them inactive. This Skill provides built-in patterns for soft deletion and audit logging, ensuring data integrity and accurate historical tracking for your backend.

What's the best way to build type-safe database queries in Go without writing raw SQL strings?

The best way to build type-safe queries in Go without raw SQL strings is using a query builder. This Skill offers flexible query construction capabilities, enabling efficient and type-safe data retrieval and filtering while preventing SQL injection vulnerabilities.

Can I use this Skill to handle database migrations and bulk operations across SQLite and MySQL?

Yes, you can use this Skill to handle database migrations and bulk operations across SQLite and MySQL. It provides unified patterns for schema migrations and batch data processing, ensuring reliable and efficient interaction across multiple supported database engines.