api-development — Claude Code skill: Go and NestJS API rules
Gives the agent a fixed set of API conventions: Go 1.22+ standard library and NestJS with TypeScript. Handy when a project needs one style for routing, validation and modules.
npx skills add Mindrally/skills --skill api-development -a claude-codeWhat api-development does
The skill frames the agent as an API developer working in two stacks. On the Go side it asks for version 1.22 or newer, routing through http.NewServeMux() and the standard library before any external package. Error handling gets its own section: meaningful messages back to clients, custom error types, logging with enough context. Middleware covers logging, request tracing, authentication and rate limiting.
For NestJS the rules push strict typing — every variable and function declares a type, any is discouraged, strict compiler options stay on. Naming is spelled out: PascalCase for classes and interfaces, camelCase for functions, SCREAMING_SNAKE_CASE for constants, kebab-case for file names. One module per domain, DTOs for all inputs and outputs validated with class-validator and transformed with class-transformer, thin controllers that hand work to services.
A shared module section lists configs, custom decorators, guards, exception filters, interceptors and pipes. The DTO rules assume class-validator and class-transformer are installed and that strict TypeScript options are enabled — without those, the validation guidance has nothing to attach to.
What it helps with
- settle on one routing style for a Go service
- validate request data before it reaches business logic
- split a NestJS app into focused domain modules
- fix naming rules for classes, functions and files
- move auth and rate limiting into middleware
Example prompts for the agent
- Add a new Go endpoint using
http.NewServeMux()and validate the request body - Split this NestJS module by domain and keep DTOs with
class-validatoraway from entities - Write middleware for logging and rate limiting on protected routes
How to install api-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill api-development -a claude-code2Manually: put the files in place
~/.claude/skills/api-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/api-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill api-development -a codex2Manually: put the files in place
.agents/skills/api-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill api-development -a cursor2Manually: put the files in place
.cursor/skills/api-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills api-development2Manually: put the files in place
.github/skills/api-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill api-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path api-developmentManually: put the files in place
.devin/skills/api-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill api-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about api-development
How do I install api-development in Claude Code?
Run npx skills add Mindrally/skills --skill api-development -a claude-code. The skill file lands at ~/.claude/skills/api-development/SKILL.md.
What does api-development do?
It sets the agent's rules for building APIs with the Go standard library and with NestJS on TypeScript, covering error handling, validation, middleware, module layout and naming.
What do I need for the NestJS part?
The DTO rules rely on class-validator and class-transformer, plus strict TypeScript compiler options. The Go side wants version 1.22 or newer.
Source text
SKILL.md · Apache-2.0
--- name: api-development description: Guidelines for building clean, scalable APIs with Go standard library and NestJS TypeScript, covering security, validation, and modular architecture. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # API Development You are an expert in API development with Go and NestJS. ## Go API Development with Standard Library (1.22+) ### Core Principles - Always use the latest stable version of Go (1.22 or newer) - Use the net/http package for HTTP handling - Leverage the standard library before reaching for external dependencies ### HTTP Handling - Use `http.NewServeMux()` for routing (Go 1.22+ enhanced patterns) - Implement proper HTTP method handling - Return appropriate status codes for all responses - Handle request body parsing safely ### Error Handling - Implement comprehensive error handling - Return meaningful error messages to clients - Log errors with sufficient context - Use custom error types for API-specific failures ### Input Validation - Validate all incoming request data - Sanitize inputs to prevent injection attacks - Return clear validation error messages - Reject requests with invalid data early ### Middleware - Implement middleware for cross-cutting concerns - Use middleware for logging and request tracing - Apply authentication middleware to protected routes - Implement rate limiting as middleware ## Clean NestJS APIs with TypeScript ### Code Standards - Use English for all code and documentation - Always declare the type of each variable and function - Avoid using `any` type; prefer explicit types - Enable strict TypeScript compiler options ### Naming Conventions - Use PascalCase for classes and interfaces - Use camelCase for variables, functions, and methods - Use SCREAMING_SNAKE_CASE for constants - Name files using kebab-case ### Modular Architecture - Implement one module per domain - Keep modules focused and cohesive - Export only necessary components - Use barrel files for clean imports ### DTOs and Validation - Use DTOs for all inputs and outputs - Validate with class-validator decorators - Transform data with class-transformer - Keep DTOs separate from domain entities ### Controller Guidelines - Keep controllers thin - Delegate business logic to services - Use proper HTTP decorators - Implement consistent response formats ### Common Module Implement shared reusable code: - Configs - Shared configuration utilities - Decorators - Custom decorators - Guards - Authentication and authorization - Filters - Exception filters - Interceptors - Request/response interceptors - Pipes - Validation and transformation ### Security Best Practices - Implement authentication guards - Use role-based authorization - Validate all inputs at boundaries - Sanitize outputs to prevent XSS
© Mindrally · Apache-2.0 · Mindrally/skills