api-route-change
Skill74 starsChanged 9 days agoApache-2.0View on GitHub
Add, remove, or change a route served by `decant serve`, including parameters, limits, status codes, response shapes, and SSE events. Use when editing the route table in src/server/routes.ts, the path manifest in src/route-paths.ts, or anything the UI fetches through src/ui/api.ts.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-sourceSkill
- contribution-triageSkill
- decant-releaseSkill
- schema-migrationSkill
- update-model-pricingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Keep core modules print-free: the handler shapes HTTP, while queries and stats stay in their modules.
- Distinctive: line 30
No outbound network calls.
- Distinctive: line 34
Use a scratch archive and a loopback port:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Change a serve API route
AGENTS.md invariant 7: the serve routes are a documented local API. These four move together in one change:
- The handler and its entry in the route table (
src/server/routes.ts), plus the path manifest insrc/route-paths.ts. docs/api/openapi.yaml, the source contract./api/openapi.jsonis its runtime representation, so a missing or stale entry is a user-visible bug.docs/api/routes.md, the prose guide (access control, archive semantics, SSE events).- Contract tests in
test/api-contract.test.tsandtest/server-routes.test.ts(which pins the route table to the OpenAPI document), plus behavior tests in the relevanttest/server*.test.tsfile.
Checks before changing semantics
- Find every UI caller: grep
src/ui/for the path (views live insrc/ui/views/). A new default limit or a narrower response can silently truncate what a page renders. - Keep core modules print-free: the handler shapes HTTP, while queries and stats stay in their modules.
- Non-loopback serving needs explicit trusted peers. Host and Origin checks are defense in depth, not authentication; do not weaken either.
- No outbound network calls. The only runtime networking is the local server.
Manual smoke
Use a scratch archive and a loopback port:
DECANT_DB=/tmp/decant-api.db bun run src/cli.ts --no-sync serve --no-open --port 43111Done means bun test, bunx tsc --noEmit, and bunx biome check . pass.
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.

