Skip to content
Back to skills

Api Route Change

ASecurity

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.

  • 79 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 1, 2026
developmentrustapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 1, 2026

npx -y skills add dosu-ai/decant --skill api-route-change --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Route Change?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Route Change
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dosu-ai-api-route-change/badge)](https://www.skillsdirectory.com/skills/dosu-ai-api-route-change)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-route-change
description: 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.
---

# Change a serve API route

AGENTS.md invariant 7: the serve routes are a documented local API. These four
move together in one change:

1. The handler and its entry in the route table (`src/server/routes.ts`), plus
   the path manifest in `src/route-paths.ts`.
2. `docs/api/openapi.yaml`, the source contract. `/api/openapi.json` is its
   runtime representation, so a missing or stale entry is a user-visible bug.
3. `docs/api/routes.md`, the prose guide (access control, archive semantics,
   SSE events).
4. Contract tests in `test/api-contract.test.ts` and `test/server-routes.test.ts`
   (which pins the route table to the OpenAPI document), plus behavior tests in
   the relevant `test/server*.test.ts` file.

## Checks before changing semantics

- Find every UI caller: grep `src/ui/` for the path (views live in
  `src/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:

```sh
DECANT_DB=/tmp/decant-api.db bun run src/cli.ts --no-sync serve --no-open --port 43111
```

Done means `bun test`, `bunx tsc --noEmit`, and `bunx biome check .` pass.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.