controller-handlers

Standardize HTTP controller handlers and API routes in Go projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/griffnb/claude-plugins --skill controller-handlers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: controller-handlers
Source: https://github.com/griffnb/claude-plugins/tree/main/plugins/backend/skills/controller-handlers
Command: npx skills add https://github.com/griffnb/claude-plugins --skill controller-handlers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes and standardizes the creation of API controllers and routes, reducing boilerplate and ensuring consistent permissions, parameter handling, and error responses across endpoints.

Core Features & Use Cases

  • Standardized controller handler signatures and error handling for admin and public endpoints.
  • Guidance on extracting URL params, POST/PUT bodies, and query parameters, plus session usage.
  • Wrapper patterns to enforce security and consistent response formats across APIs.
  • Related skills for RBAC and model usage to compose complete endpoints.

Quick Start

Create a new controller endpoint using the standard handler pattern and wrap it with the appropriate admin or public response wrapper.

Frequently Asked Questions about controller-handlers

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

FAQPage Schema
How do I reduce boilerplate when creating HTTP handlers in Go?

To reduce boilerplate for HTTP handlers in Go, use standardized controller patterns that centralize parameter extraction, body parsing, and error handling. This ensures consistent response formats across all API endpoints without repeating setup code.

What is the best way to standardize API route error handling in a Go backend?

Standardizing API route error handling in a Go backend involves using wrapper patterns for admin and public contexts. Wrappers enforce consistent response formats and secure request data access, satisfying requirements for clear handler signatures across chi-based routers.

How do I extract URL parameters and request bodies in Go chi routers?

Extracting URL parameters and request bodies in Go chi routers requires standardized controller handler signatures. These patterns provide guidance on parsing POST/PUT bodies, query parameters, and session usage, ensuring secure and consistent request data access.

Can I use this controller pattern for both admin and public API endpoints?

Yes, you can use this controller pattern for both admin and public API endpoints. It provides standardized handler signatures and specific response wrappers tailored for each context, ensuring appropriate permissions and consistent error responses across different endpoint types.

How do I enforce security and consistent response formats across Go APIs?

To enforce security and consistent response formats across Go APIs, apply wrapper patterns around your controller handlers. These wrappers standardize request data access and error handling, ensuring clear handler signatures and secure responses within chi-based routers.