Borrowing it
Nothing to install: this file belongs to vaultys/VaultysClaw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/vaultys/VaultysClaw/main/.github/skills/add-api-route/SKILL.mdgit clone --depth 1 https://github.com/vaultys/VaultysClawWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/vaultys/vaultysclaw/add-api-route)<a href="https://agentmods.dev/skills/vaultys/vaultysclaw/add-api-route"><img src="https://agentmods.dev/badge/skills/vaultys/vaultysclaw/add-api-route/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vaultys/vaultysclaw/add-api-route"><img src="https://agentmods.dev/badge/skills/vaultys/vaultysclaw/add-api-route.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00069 | $0.01108 |
| Opus 5.5 | $0.00028 | $0.00443 |
| Sonnet 5.5 | $0.00014 | $0.00222 |
| Haiku 4.5 | $0.00007 | $0.00111 |
Grade A, and why
add-api-route scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add API Route — Control Plane
When to Use
- Creating a new resource endpoint under
packages/control-plane/app/api/ - Adding handlers to an existing route file
- Ensuring consistent auth, error handling, pagination, and response shapes
Procedure
1. Determine Route Path & Handlers
From the argument (e.g. invitations):
- Collection:
app/api/invitations/route.ts—GET(list) +POST(create) - Item:
app/api/invitations/[id]/route.ts—GET(detail) +PUT/PATCH(update) +DELETE
If sub-resource (e.g. workspaces/members): app/api/workspaces/[id]/members/route.ts.
2. Create the Route File
Use ./assets/route-template.ts as starting point. Key rules:
- Always call
getAuthContext(request)first (passrequestfor API key auth); returnunauthorized()if null - Use
forbidden()for permission failures (e.g.!auth.isGlobalAdmin,!auth.canAccessWorkspace(id)) - Wrap all handlers in
try/catch; log withconsole.error("METHOD /api/<resource> error:", err) - For list endpoints, apply pagination — see template for the pattern
- Parse
[id]from dynamic segments withconst { id } = await params
3. Add DB Query Functions (if needed)
Add helper functions to packages/control-plane/lib/db.ts:
- Use
getDb()singleton and rawbetter-sqlite3prepared statements - Name convention:
getXxx(id),listXxx(filters),createXxx(data),updateXxx(id, data),deleteXxx(id) - Add indexes with
CREATE INDEX IF NOT EXISTS idx_<table>_<col>insidecreateTables()
4. Register Response Types (if new resource)
Add to packages/control-plane/lib/api-types.ts:
- Summary type for list items (e.g.
InvitationSummary) - Full type for detail response if different from summary
5. Register in Route Registry
Add an entry to packages/control-plane/lib/route-registry.ts (ROUTE_REGISTRY):
{ path: "/api/my-resource", methods: ["GET", "POST"], group: "MyGroup", description: "List / create my resources" },
{ path: "/api/my-resource/[id]", methods: ["GET", "PUT", "DELETE"], group: "MyGroup", description: "Get / update / delete a my resource" },
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 105 lines · 69 tokens per session scan A 1f0ac717d5da
add-api-route is a skill published in the GitHub repository vaultys/VaultysClaw (84 stars, last pushed 2d ago), licensed MIT. It adds 69 tokens to every session and 1,108 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
add-api-route compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| add-api-routevaultys/VaultysClaw | Skill | 84 | 2d ago | MIT | A | 69 | Claude Code |
| n8n-docs-assistantn8n-io/n8n | Skill | 210k | yesterday | none | A | 71 | Claude Code, Codex |
| testingTeam-Commonly/commonly | Skill | 1.4k | today | Apache-2.0 | A | 31 | Claude Code, Codex |
| proxy-config-skillzeenie-ai/OpenCompany | Skill | 1.1k | yesterday | MIT | A | 20 | Claude Code |
| http-request-skillzeenie-ai/OpenCompany | Skill | 1.1k | yesterday | MIT | A | 32 | Claude Code |
| geocoding-skillzeenie-ai/OpenCompany | Skill | 1.1k | yesterday | MIT | A | 30 | Claude Code |
| portal-connectgosuda/portal-tunnel | Skill | 301 | yesterday | MIT | A | 224 | Claude Code, Codex |