Skip to content
Back to skills

Api Endpoint

ASecurity

Scaffolds a complete API endpoint with validation, error handling, and tests

  • 10 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 1, 2026
ai-agentsbashexpressapi

Works with

  • api

Security analysis

A100/100

Scanned June 1, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill api-endpoint --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Endpoint?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Endpoint
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-api-endpoint/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-api-endpoint)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-endpoint
description: Scaffolds a complete API endpoint with validation, error handling, and tests
argument-hint: <METHOD> <path> [description]
user-invocable: true
allowed-tools: Read Glob Edit
effort: medium
---

## Generate API Endpoint

Method + Path: **$1 $2**
Description: **$3**

1. Detect framework:
```bash
cat package.json | grep -E '"express"|"fastify"|"hono"|"koa"|"nestjs"'
ls src/routes/ src/api/ src/handlers/ 2>/dev/null | head -10
```

2. Read 1-2 existing route files to match patterns exactly.

3. Generate the route handler with:
   - Request validation (Zod schema or project's validator)
   - Auth middleware call (if project uses auth)
   - Business logic (stub with TODO if complex)
   - Proper error handling (use project's error classes)
   - Typed request/response

4. Register the route in the router file.

5. Generate tests:
   - Happy path (200/201)
   - Validation error (400)
   - Auth error (401/403)
   - Not found (404) if applicable

6. Update API docs if `docs/api.md` or OpenAPI spec exists.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…