new-go-endpoint

Automate Go API endpoint creation with OpenAPI, SQLC queries, and Redis caching.

2|Updated May 2, 2025
One-click install
npx skills add https://github.com/adryanev/.dotfiles --skill new-go-endpoint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-go-endpoint
Source: https://github.com/adryanev/.dotfiles/tree/main/.claude/commands/new-go-endpoint
Command: npx skills add https://github.com/adryanev/.dotfiles --skill new-go-endpoint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the API-first workflow for adding new Go API endpoints to the Lexicon backend.

Core Features & Use Cases

  • Automates endpoint creation using an API-first approach from requirements to code, OpenAPI update, SQLC queries, and Redis caching.
  • Automatically updates OpenAPI spec, generates SQLC queries, creates handlers with Redis caching patterns.
  • Use Case: When introducing a new endpoint to the Lexicon backend, provide path, method, parameters, and responses to generate the full scaffold and runtime code.

Quick Start

Provide endpoint path, HTTP method, purpose, request/response schemas, and caching needs to generate the endpoint scaffolding.

Frequently Asked Questions about new-go-endpoint

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

FAQPage Schema
How do I automate generating a new Go API endpoint from an OpenAPI spec?

To automate generating a new Go API endpoint, provide the endpoint path, HTTP method, request and response schemas, and caching requirements. This triggers an API-first workflow that updates the OpenAPI spec, generates SQLC queries, scaffolds handlers, and applies Redis caching patterns.

What is the API-first workflow for adding Go backend endpoints?

The API-first workflow for adding Go backend endpoints starts by defining the API surface in an OpenAPI specification before writing code. It then automatically generates SQLC database queries, scaffolds Go handler logic, and implements Redis caching layers based on the provided schemas.

How do I generate SQLC queries and Redis caching for a new Go API resource?

You generate SQLC queries and Redis caching by providing the new resource's endpoint path, HTTP method, and request and response schemas. The automation workflow parses these inputs to scaffold the database query layer and apply the appropriate Redis caching patterns.

Can I use this API-first endpoint generation workflow without existing SQLC or Redis configurations?

This API-first endpoint generation workflow expects an existing Go backend environment configured with SQLC for SQL generation and Redis for caching. It scaffolds new handlers and queries by applying established patterns to your provided OpenAPI definitions and endpoint parameters.

What inputs do I need to provide to scaffold a complete Go API endpoint with code generation?

To scaffold a complete Go API endpoint, you need to provide the endpoint path, HTTP method, purpose, request and response schemas, and specific caching needs. These inputs drive the automated code generation across the OpenAPI, SQLC, and Redis layers.

Does this workflow update the OpenAPI spec automatically when adding new endpoints?

Yes, the workflow updates the OpenAPI spec automatically when adding new endpoints. It takes your provided path, method, and schemas, applies them to the API surface, and then proceeds to generate the corresponding SQLC queries and Go handler scaffolding.