skills/development/api-endpoint-scaffolder/SKILL.md
Scaffolds REST API endpoints with route handler, validation, error handling, and tests. Use when asked to create a new API endpoint or route.
npx skillsauth add abhiunix/community-registry api-endpoint-scaffolderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When asked to create a new API endpoint, follow this process:
Read the project to determine the framework in use:
app.get(), router.post(), package.json depsapp/api/ directorypages/api/ directorypackage.jsonMatch the existing patterns and conventions in the codebase.
Generate these files for each endpoint:
import { z } from "zod";
export const createUserSchema = z.object({
name: z.string().min(1).max(100),
email: z.string().email(),
});
export type CreateUserInput = z.infer<typeof createUserSchema>;
Always use a consistent response envelope:
{
"success": true,
"data": { ... }
}
{
"success": false,
"error": { "message": "...", "code": "VALIDATION_ERROR" }
}
Create a test file covering:
development
Generate a STRIDE-based threat model from codebase and architecture analysis. Identifies assets, trust boundaries, data flows, threats, and mitigations. Language-agnostic.
development
Run a comprehensive security audit against a codebase. Covers OWASP Top 10, secrets exposure, dependency vulnerabilities, misconfigurations, and insecure patterns. Language-agnostic.
development
Security-focused code review for staged changes or specified files. Checks for injection, auth flaws, crypto misuse, data exposure, and insecure patterns. Works with any language.
development
Manage Trello boards, lists, and cards via the Trello REST API.