repository-generator

Generate standard SQL and GORM repository layers with sharding guidance.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/taku-o/go-webdb-template --skill repository-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repository-generator
Source: https://github.com/taku-o/go-webdb-template/tree/main/.claude/skills/repository-generator
Command: npx skills add https://github.com/taku-o/go-webdb-template --skill repository-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill defines standard patterns for adding new Repository layers (Standard SQL and GORM), including GroupManager and TableSelector usage, and CRUD templates with sharding-ready guidance.

Core Features & Use Cases

  • Standard SQL pattern: Create {Entity} repositories with proper table selection and shard routing.
  • GORM pattern: Provide GORM-based repositories using dbresolver.
  • Sharding-aware design: Guidance for cross-table and cross-shard operations.

Quick Start

Create a new entity named Article and generate article_repository.go (standard SQL) and article_repository_gorm.go (GORM) under server/internal/repository/.