agentsclimarketplace

Add endpoint

Skill milkyskies/milky-kit/skills/add-endpoint

Add a new API endpoint to the backend, regenerate the OpenAPI spec, regenerate the frontend TypeScript client, and wire up the page. Works for any endpoint.From its SKILL.md

Install
npx -y skills add milkyskies/milky-kit --skill add-endpoint

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

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 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.2 KB, as published. Nobody here has run it

Add Endpoint: $ARGUMENTS

Add $ARGUMENTS end-to-end: handler -> route registration -> OpenAPI -> frontend codegen -> page.

Step 1 — Read existing patterns first

Before writing anything, read these to understand the conventions:

  • Existing DTOs / request/response types
  • Route registration file
  • A similar existing handler
  • Example repository trait and implementation

Step 2 — Add DTOs / request-response types

All request/response types go in the presentation layer.

Derive rules:

  • Response types: Serialize, ToSchema
  • Request body types: Deserialize, ToSchema

Step 3 — Add repository trait

All database access MUST go through repository traits defined in the domain layer.

Step 4 — Implement the repository

Implement using the project's ORM (check .claude/rules/ for database conventions — SeaORM, sqlx, etc.).

Step 5 — Write the handler

Handlers call repository methods — never raw SQL. Keep handlers thin.

Step 6 — Register the route

Add to the route registration file.

Step 7 — Register in OpenAPI

Add paths and schemas to the OpenAPI configuration.

Step 8 — Compile check

cargo check -p api

Step 9 — Regenerate frontend client

Update the OpenAPI spec and regenerate the TypeScript client:

cd <app-dir> && pnpm api:generate

Commit the updated openapi.json.

Step 10 — Create the frontend page (if needed)

Follow the project's frontend conventions (check .claude/rules/ for component patterns, routing, and UI library).

Step 11 — Final check

pnpm routes:generate
pnpm typecheck

Checklist

  • Existing patterns read
  • DTOs added
  • Repository trait defined
  • Repository implemented
  • Handler written (no raw SQL)
  • Route registered
  • OpenAPI updated
  • cargo check -p api passes
  • Frontend client regenerated
  • Page created (if needed)
  • Final typecheck passes

Keep looking

Skills are one crate of 608,475. 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.