add-endpoint · git:20261115.237aa7d · 2026-11-15 · sha256 940229b97f6e50da
add-endpoint git:20261115.237aa7dA
Immutable. This exact content never changes and is served at /api/v1/blob/940229b97f6e50da.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_v33we2zv2baz3kr2/940229b97f6e50dab2086f274bb06131ee63c26d9eaea91c2bf8ca0f43636c79.json
Then /plugin install add-endpoint@markdownregistry-v33we2zv2baz3kr2 in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
--- name: add-endpoint description: Adds a new API endpoint that matches your existing routes, with validation, error handling, tests and docs in one pass. argument-hint: "[method path and what it does]" user-invocable: true disable-model-invocation: true --- Add this endpoint to the project: $ARGUMENTS 1. Find the closest existing endpoint with `grep` or the route table. Read its handler, schema, service call, test and doc entry. Copy that structure exactly: folder, naming, auth middleware, response envelope. 2. State a short plan: method, path, auth, input fields with types, success status, and each error status. Ask one question if the request is ambiguous, otherwise continue. 3. Write the handler thin. Put business logic in the layer the project already uses for it. 4. Validate every input with the project's own validator. Return the same error shape as other routes (400 for bad input, 401 or 403 for auth, 404 for missing, 409 for conflicts). 5. Add tests: one success case, one case per error status, one for bad input. 6. Update the route list, OpenAPI file or README section if one exists. 7. Run the test suite and the linter. Fix what you broke. Report the files changed, the final request and response examples, and anything you guessed. Do not touch unrelated routes or run migrations without asking first.