add-endpoint
Skill11 starsChanged 22 days agoApache-2.0View on GitHub
Add an HTTP endpoint or a new resource (routes, validation, service, SQL, tests) to a Bun + Elysia project created with create-bun-api, following its conventions, then prove it with bun run verify. Use when asked to add a route, endpoint, API resource, CRUD feature, or handler in a project that contains create-bun-api.json.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- nanotaboada/python-samples-fastapi-restfultheir own version, first seen Nov 1, 2026
- nikzlabs/shipittheir own version, first seen Oct 28, 2026
- Ssoulisack/claude-skillstheir own version, first seen Oct 15, 2026
- lepresk/groundworktheir own version, first seen Oct 15, 2026
- Azure/azure-sdk-toolstheir own version, first seen Oct 13, 2026
- Azure-Samples/art-voice-agent-acceleratortheir own version, first seen Oct 8, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- nanotaboada/python-samples-fastapi-restful★ 141same name
- Azure/azure-sdk-tools★ 134same name
- atherio-danp/cde-dotnetcc★ 109same name
- Azure-Samples/art-voice-agent-accelerator★ 74same name
- paulieb89/property-shared★ 16same name
- nikzlabs/shipit★ 9same name
- aiqadam/qadam-flow★ 5same name
- jpoindexter/theft-kit★ 1same name
- lepresk/groundwork★ 0same name
- Ssoulisack/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-modelSkill
- create-bun-apiSkill
- verify-and-debugSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Baseline: run bun run verify. If it already fails, fix that first (verify-and-debug skill) or report it.
- Very specific: line 28
Create returns status(201, value).
- Very specific: line 29
Finish: run bun run format (fixes formatting and import order), then bun run verify.
- Very specific: line 36
Use status(204, undefined) and 204: t.Void().
- Distinctive: line 38
Never log request bodies, headers, or tokens.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add an endpoint
- Baseline: run
bun run verify. If it already fails, fix that first (verify-and-debug skill) or report it. Don't build on a red baseline. - Decide where the code goes:
- New resource: a new folder
src/modules/<name>/.<name>is plural and lowercase, e.g.notes. - New route on an existing resource: that module's
<name>.routes.ts, with logic in<name>.service.ts. - New table or column: follow the add-model skill first.
- New resource: a new folder
- Write the module. A complete, tested example is in
references/notes-module.md; copy its shape.
<name>.schema.ts:tschemas for bodies, params, and responses, plustypeof X.statictypes.<name>.repository.ts: prepared SQL. Scope rows by owner (user_id) for per-user data.<name>.service.ts: business rules. ThrownotFound(),conflict(), and the other helpers fromsrc/lib/errors.ts.<name>.routes.ts:new Elysia({ prefix: "/<name>", tags: ["<name>"] }). Add.use(authPlugin(deps.tokens))when any route setsauth: true. Declarebody,params,query, andresponseon every route.<name>.test.ts: usecreateTestApp()andsignUp()fromtest/helpers.ts.
- Mount it in
src/app.ts: create the service fromdb, then.use(<name>Routes({ ... })). - Prove these behaviors in tests:
- Invalid input returns 400 with
error.codeVALIDATION(the declared schema handles this). - A missing or invalid token returns 401.
- Another user's resource returns 404, not 403.
- Create returns
status(201, value). Delete returnsstatus(204, undefined), with204: t.Void()inresponse.
- Invalid input returns 400 with
- Finish: run
bun run format(fixes formatting and import order), thenbun run verify. You're done only when it passes. New routes appear automatically at/docs.
Gotchas
- Returning
{ status: 401, body }sends HTTP 200. Throw the error helpers instead. status(204)without a body fails the typecheck once aresponsemap is declared. Usestatus(204, undefined)and204: t.Void().- Path params declared as
t.Integer()are converted from the URL string, so/notes/abcreturns 400. - Never log request bodies, headers, or tokens.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

