brokle-api-routes

Automates creation, modification, and review of Brok API endpoints and routes for dual-architectures.

3|2|Updated Sep 4, 2025
One-click install
npx skills add https://github.com/brokle-ai/brokle --skill brokle-api-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: brokle-api-routes
Source: https://github.com/brokle-ai/brokle/tree/main/.claude/skills/brokle-api-routes
Command: npx skills add https://github.com/brokle-ai/brokle --skill brokle-api-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes API endpoint development for Brokle, ensuring consistency, proper authentication, and clear documentation across both SDK and Dashboard routes. It eliminates guesswork and reduces integration errors.

Core Features & Use Cases

  • Dual Route Architecture: Guides on implementing both API Key-authenticated SDK routes (/v1/*) and JWT-authenticated Dashboard routes (/api/v1/*).
  • Standardized Patterns: Provides templates for handlers, request/response structures, input validation, and error handling.
  • OpenAPI Documentation: Explains how to add Swagger/OpenAPI annotations directly in code for clear, auto-generated API documentation.
  • Use Case: A developer needs to add a new API endpoint for project management. This skill provides the exact URL structure, request/response patterns, and OpenAPI annotations required, ensuring the API is consistent and well-documented.

Quick Start

I need to create a new API endpoint /api/v1/projects/{id}/members to list project members. Provide the handler template, including input validation and OpenAPI documentation annotations.

Frequently Asked Questions about brokle-api-routes

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

FAQPage Schema
How do I design REST API endpoints with proper authentication for different user types?

REST API endpoints require distinct authentication strategies: SDK routes use API-key authentication under /v1/*, while dashboard routes use JWT authentication under /api/v1/*. This Skill provides templates for both patterns, ensuring your endpoints enforce the correct auth method based on route type and include proper validation and error handling.

What's the best way to structure request and response handlers for Go REST APIs?

Standardized handler patterns reduce integration errors and inconsistency. This Skill provides complete templates for Go handlers covering request/response structures, input validation rules, error handling conventions, and middleware integration aligned with Brokle's dual-route architecture.

How do I add OpenAPI documentation to my API routes without maintaining separate Swagger files?

OpenAPI annotations embedded directly in Go code generate Swagger documentation automatically. This Skill explains how to add these annotations to handlers, covering request/response schemas and documentation alignment, so your API spec stays synchronized with implementation.

Can I use the same endpoint pattern for both SDK and dashboard routes?

No. SDK routes follow /v1/* with API-key auth and dashboard routes follow /api/v1/* with JWT auth. This Skill clarifies the structural differences, authentication requirements, and handler patterns for each route type so you implement the correct architecture from the start.

What validation rules should I apply to API endpoint inputs?

Input validation prevents malformed requests and security issues. This Skill provides validation templates and rules specific to Brokle's endpoint requirements, covering request parameter checks, type validation, and error responses that align with your API's authentication and middleware stack.