go-create-chi-router

Generate Chi router registrations with CRUD and custom routes for Go services.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers often spend time wiring HTTP routes across modules; this skill automates the generation of Chi router registrations following the bricks-based modular architecture.

Core Features & Use Cases

  • Auto-generates router files in internal/modules/<module>/http/chi/router/<resource>_router.go
  • Supports standard CRUD endpoints GET, POST, PUT, DELETE and custom actions
  • Ensures Fx wiring and constructor contract per project conventions

Quick Start

Generate the resource Chi router file at internal/modules/<module>/http/chi/router/<resource>_router.go with a ResourceRouter, a constructor returning *ResourceRouter, and a Setup(server *chi.Server) that registers CRUD and custom routes.

Frequently Asked Questions about go-create-chi-router

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

FAQPage Schema
How do I auto-generate Chi router files for a Go modular backend?

You can auto-generate Chi router files by creating a resource router at internal/modules/<module>/http/chi/router/<resource>_router.go. The generated file includes a ResourceRouter, a constructor returning *ResourceRouter, and a Setup method to register routes.

What HTTP methods and route types does the Chi router generator support for Go services?

The Chi router generator supports standard CRUD endpoints including GET, POST, PUT, and DELETE. It also handles custom actions and nested routes for modular Go backends needing REST route registrations.

Does this Go router generator integrate with Fx dependency injection?

Yes, the generated Chi router files include Fx wiring to ensure route groups are properly registered. This integration follows the project's modular architecture requirements and constructor contract conventions.

Can I add custom route actions beyond standard CRUD operations when generating Chi routers?

Yes, the Chi router generation supports custom actions in addition to standard CRUD endpoints. The Setup method registers both CRUD routes and any custom route actions defined for the resource.

What is the required file structure for generating Chi routers in a modular Go architecture?

Generated Chi router files are placed at internal/modules/<module>/http/chi/router/<resource>_router.go. This structure follows the bricks-based modular architecture pattern used for organizing Go backend services.

Do I need to manually wire HTTP routes across Go modules when using this generator?

No, the generator automates the creation of Chi router registrations, eliminating the need to manually wire HTTP routes. It ensures proper Fx wiring and constructor contracts per project conventions are applied automatically.