go-create-repository

Generate Go repository ports and implementations with CRUD, pagination, and transactions.

Updated Jan 4, 2026
One-click install
npx skills add https://github.com/cristiano-pacheco/ai-rules --skill go-create-repository
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-create-repository
Source: https://github.com/cristiano-pacheco/ai-rules/tree/main/skills/go-create-repository
Command: npx skills add https://github.com/cristiano-pacheco/ai-rules --skill go-create-repository

SYSTEM DOCUMENTATION & REQUIREMENTS

Generate Go repository port interfaces and implementations following GO modular architechture conventions (Gorm, PingoDB, OTEL tracing, Fx DI, ports architecture). Use when creating data access layers for entities in internal/modules/<module>/ including CRUD operations (Create, FindAll, FindByID, Update, Delete), custom queries, pagination, or transactions.

Frequently Asked Questions about go-create-repository

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

FAQPage Schema
How do I generate a Go repository with Gorm for modular architecture?

To generate a Go repository with Gorm, you use this Skill to auto-create port interfaces and concrete implementations for data access layers. It scaffolds standard CRUD operations, custom queries, and pagination for entities within internal/modules/.

What is the ports pattern in Go repository generation?

The ports pattern in Go repository generation separates data access interfaces from their concrete implementations. This Skill generates both the port interfaces and the repository implementations to satisfy structural and wiring requirements for Fx DI.

Can I generate Go repository implementations with Fx DI integration?

Yes, you can generate Go repository implementations with Fx DI integration. The Skill produces repository files that automatically satisfy the structural and wiring requirements needed for Fx dependency injection in a modular architecture.

How do I add custom queries and pagination to a Go repository?

To add custom queries and pagination to a Go repository, the Skill generates the necessary repository implementation code alongside standard CRUD operations. This applies to entities located under internal/modules/<module>/.

Does this Go repository generator support transactional workflows?

Yes, this Go repository generator supports transactional workflows. It generates repository ports and implementations that handle standard CRUD operations, custom queries, pagination, and transactional data access logic using Gorm and OTEL tracing.