agentsclimarketplace

Api endpoint

Skill syniol/llm-software-project/.agent/skills/api-endpoint

Instructions for creating REST API endpoints following conventions, validation, and documentation standards.From its SKILL.md

Install
npx -y skills add syniol/llm-software-project --skill api-endpoint

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.0 KB, 494 tokens by cl100k_base, as published. Nobody here has run it

API Endpoint Creation Skill

When creating a new API endpoint, follow this procedure exactly:

1. REST Conventions

ActionHTTP VerbRoute PatternSuccess Code
List resourcesGET/api/v1/resources200
Get singleGET/api/v1/resources/:id200
Create resourcePOST/api/v1/resources201
Update resourcePATCH/api/v1/resources/:id200
Replace resourcePUT/api/v1/resources/:id200
Delete resourceDELETE/api/v1/resources/:id204

2. Request/Response Validation

  • Define Zod schemas for both request body and response body.
  • Validate at the middleware layer, before the handler executes.
const CreateUserSchema = z.object({
  email: z.string().email(),
  name: z.string().min(1).max(100),
  role: z.enum(['admin', 'member', 'viewer']),
});

3. Standardised Error Response

All errors must return this shape:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Email format is invalid.",
    "details": [{ "field": "email", "issue": "Invalid email format" }]
  }
}

4. Middleware Chain

Every endpoint must pass through this middleware chain in order:

  1. authenticate — Verify JWT, attach req.user.
  2. authorize — Check RBAC permissions for the route.
  3. validate — Run Zod schema validation on req.body / req.query.
  4. handler — Execute business logic.
  5. errorHandler — Catch and format any thrown errors.

5. OpenAPI Documentation

  • Annotate every endpoint with JSDoc or decorators that generate OpenAPI 3.0 specs.
  • Include request body schema, response schema, error codes, and authentication requirements.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.