new_siteadmin_api

Scaffold Site Admin API endpoints with OpenAPI spec updates, Go handlers, and routing.

2.0k|126|Updated Jun 16, 2020
One-click install
npx skills add https://github.com/authgear/authgear-server --skill new-siteadmin-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new_siteadmin_api
Source: https://github.com/authgear/authgear-server/tree/main/.claude/skills/new_siteadmin_api
Command: npx skills add https://github.com/authgear/authgear-server --skill new-siteadmin-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building a new Site Admin API route involves updating the OpenAPI spec, regenerating Go models, writing handlers, wiring dependencies, and verifying builds, and this Skill ensures no milestone is overlooked.

Core Features & Use Cases

  • OpenAPI & model sync: Documents how to update docs/api/siteadmin-api.yaml with error responses and schemas before running make generate.
  • Handler scaffolding guidance: Describes the required handler structure, parameter parsing helpers, and validation expectations for GET, POST, and DELETE routes.
  • Wiring and validation checklist: Covers dependency injection, router registration, and build verification so new routes integrate cleanly with the siteadmin server.

Quick Start

Request scaffolding for a new Site Admin API endpoint, detailing the OpenAPI updates, handler creation, and wiring steps.

Frequently Asked Questions about new_siteadmin_api

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

FAQPage Schema
How do I scaffold a new Site Admin API endpoint without missing steps?

Scaffolding a Site Admin API endpoint requires updating the OpenAPI spec, regenerating models, writing handlers, wiring dependencies, and verifying builds. This process ensures spec, models, and Go handlers are created together to avoid omissions.

What steps are needed to add a new route to the siteadmin server?

Adding a route to the siteadmin server requires updating `docs/api/siteadmin-api.yaml` with error responses and schemas, running `make generate`, creating the Go handler, registering dependencies via wire injectors, and verifying the go build.

How do I update OpenAPI specs and sync generated models for Go APIs?

Updating OpenAPI specs for Go APIs involves documenting schemas and error responses in `docs/api/siteadmin-api.yaml` before running `make generate`. This syncs the generated models with the spec to maintain consistency across the siteadmin server.

Does scaffolding siteadmin API handlers include dependency injection wiring?

Scaffolding siteadmin API handlers includes dependency injection wiring. The process covers dependency registration, router configuration, and wire injectors to ensure new routes integrate cleanly with the existing siteadmin server architecture.

What is the best way to structure Go handlers for new API routes?

The best way to structure Go handlers for new API routes is using the required handler structure with parameter parsing helpers and validation expectations. This covers GET, POST, and DELETE routes while satisfying project conventions for error handling.

Why does my siteadmin API build fail after adding a new route?

A siteadmin API build may fail after adding a new route if dependency wiring, router registration, or go build verification steps are incomplete. Ensuring all spec updates, generated models, and handler dependencies are created together prevents build failures.