Skip to content
Back to skills

Api Generator

ASecurity

Scaffolds a versioned REST route, its zod schema, and the matching test file.

  • 24 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
ai-agentsapi

Works with

  • cursor
  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add sampleXbro/agentsmesh --skill api-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Generator?

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

Security grade badge for Api Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/samplexbro-api-generator-30c52e0a/badge)](https://www.skillsdirectory.com/skills/samplexbro-api-generator-30c52e0a)

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-generator
description: Scaffolds a versioned REST route, its zod schema, and the matching test file.
---

# API generator

Use this when a task asks for a new endpoint under `/v1`.

## Steps

1. Read [references/route-checklist.md](references/route-checklist.md) and confirm every box applies.
2. Run `scripts/scaffold.ts` with the resource name in kebab-case.
3. Register the router in [src/server/routes.ts](src/server/routes.ts).
4. Write the failing test first, then implement the handler.

## Conventions

- Request and response bodies are validated by zod on both ends.
- Errors return `{ error: { code, message } }`; never leak a stack trace.
- Pagination is cursor based (`?cursor=`, `?limit=`), never offset based.

Files in this skill

  • SKILL.md738 B
  • references/route-checklist.md454 B
  • scripts/scaffold.ts951 B

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…