common-architecture-di…
Draw architecture diagrams as editable draw.io files with a fixed house style, C4 levels, and evidence-tagged shapes. Use when producing a system context,…
Build HTTP services, REST APIs, and middleware in Go. Use when building Go HTTP servers, REST APIs, or custom middleware.
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill golang-api-server --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/golang-api-serverContext preview
The summary Claude sees to decide when to auto-load this skill.
Build HTTP services, REST APIs, and middleware in Go. Use when building Go HTTP servers, REST APIs, or custom middleware.
name: golang-api-server
description: Build HTTP services, REST APIs, and middleware in Go. Use when building Go HTTP servers, REST APIs, or custom middleware.
metadata:
triggers:
files:
- 'cmd/server/*.go'
- 'internal/adapter/handler/**'
keywords:
- http server
- rest api
- gin
- echo
- middleware1. **Choose transport layer** — REST (Echo/Gin/stdlib) or GraphQL (gqlgen). 2. **Thin Handlers & Resolvers** — Handlers and resolvers parse/validate inputs, invoke use-case services, and map to transport models. Zero direct database queries or business rules. 3. **Transport-to-Domain Mapping** — Domain models remain pure; transport models adapt to domain models via dedicated mappers. 4. **Response Nullability & Slice Defaulting** — Default empty slices to `[]` (not `null`) unless the schema explicitly requires null. Avoid unnecessary `nullable` fields in GraphQL response schemas when zero-values suffice. 5. **Add middleware** — Use middleware for cross-cutting concerns (Logging, Recovery, CORS, Auth, Tracing, RequestID). 6. **Enforce pagination limits** — Support `first/after` (GraphQL cursor) or `limit/offset` (REST) with strict max caps to prevent memory exhaustion. 7. **Implement graceful shutdown** — Handle SIGINT/SIGTERM to drain in-flight requests.
See [graceful shutdown example](references/graceful-shutdown.md) and [Echo handler patterns](references/middleware-patterns.md)
The portable SDLC standards layer for AI coding agents. Sync once, then work in your own runtime.
Repo: hoangnguyen0403/agent-skills-standard
Draw architecture diagrams as editable draw.io files with a fixed house style, C4 levels, and evidence-tagged shapes. Use when producing a system context,…
Enforce SOLID principles, guard-clause style, function size limits, and intention-revealing naming across all languages. Use when refactoring for readability,…
Standardize BRD and BRD-lite discovery for business goals, stakeholder impact, current-to-future state, and measurable value outcomes. Use when creating BRD,…
Conduct high-quality, persona-driven code reviews. Use when reviewing PRs, critiquing code quality, or analyzing changes for team feedback.
Maximize context window efficiency, reduce latency, and prevent lost-in-middle issues through strategic masking and compaction. Use when token budgets are…
Standardize dynamic application security testing for backend APIs, frontend web apps, and mobile clients. Covers ZAP, Nuclei, Nikto, sqlmap, ffuf, browser…