API Server
Standards for building HTTP services, REST APIs, and middleware in Golang.
npx skills add majiayu000/claude-skill-registry --skill api-server-hoangnguyen0403-agent-skills-standar --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Golang API Server Standards ## **Priority: P0 (CRITICAL)** ## Router Selection - **Standard Lib (`net/http`)**: Use for simple services or when zero deps is required. Use `http.ServeMux` (Go 1.22+ has decent routing). - **Echo (`labstack/echo`)**: Recommended for production REST APIs. Excellent middleware support, binding, and error handling. - **Gin (`gin-gonic/gin`)**: High performance alternative. ## Guidelines - **Graceful Shutdown**: MUST implement graceful shutdown to handle in-flight requests on termination (SIGINT/SIGTERM). - **DTOs**: Separate Domain structs from API Request/Response structs. Map between them. - **Middleware**: Use middleware for cross-cutting concerns (Logging, Recovery, CORS, Auth, Tracing). - **Health Checks**: Always include `/health` and `/ready` endpoints. - **Content-Type**: Enforce `application/json` for REST APIs. ## Middleware Pattern - Standard: `func(next http.Handler) http.Handler` - Echo implementation: `func(next echo.HandlerFunc) echo.HandlerFunc` ## Anti-Patterns - **Business Logic in Handlers**: Handlers should only parse request -> call service -> format response. - **Global Router**: Don't use global router variables. Pass router inst
- Priority: P0 (CRITICAL)
- Router Selection
- Guidelines
- Middleware Pattern
- Anti-Patterns
- References
What does the API Server skill do?
Standards for building HTTP services, REST APIs, and middleware in Golang.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-server-hoangnguyen0403-agent-skills-standar --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
