repository-adapters

Modify database repository adapters using sqlc-generated SQLite queries.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 2, 2026⬇️2downloads

When & Why to Use This Skill

This Claude skill automates the maintenance and synchronization of database repository adapters in Go applications. By integrating with sqlc and SQLite, it streamlines the end-to-end workflow of updating SQL queries, regenerating type-safe code, and modifying repository implementations while strictly adhering to clean architecture conventions.

Use Cases

  • Synchronizing Database Changes: Automatically update Go repository adapters whenever SQL definitions in queries.sql are modified, ensuring the data access layer remains consistent with the schema.
  • Boilerplate Reduction: Eliminate manual coding tasks by automating the mapping between sqlc-generated structures and domain-specific repository interfaces.
  • Workflow Automation: Execute the full development cycle of 'Edit-Generate-Update-Test' for database layers through simple natural language commands, significantly increasing developer productivity.
  • Maintaining Architectural Integrity: Ensure that database implementation details remain isolated within the adapters directory, preventing leaks into the domain layer while following project-specific repo conventions.
namerepository-adapters
descriptionModify database repository adapters using sqlc-generated SQLite queries.
licenseMIT
compatibilityRequires bash, git, Go, and sqlc v1.30.0+.
repomjrwtf
runnergithub-copilot-cli
version1.2
allowed-toolsBash(git:*) Bash(make:*) Bash(go:*) Bash(sqlc:*) Read

Repo conventions

  • Domain interfaces live in internal/domain/**/repository.go.
  • Implementations live in internal/adapters/repository/.
  • Do not edit generated code under internal/adapters/repository/sqlc/**.

Making a change

  1. Update internal/adapters/repository/sqlc/sqlite/queries.sql
  2. Regenerate:
make generate
  1. Update adapters in internal/adapters/repository/*.go.
  2. Verify:
make test