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.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00034 | $0.00554 |
| Sonnet 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 6d 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.
- 6d 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 (77 stars, last pushed 4d ago), licensed MIT. It adds 69 tokens to every session and 1,108 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
credential-setup-with-computer-use
Guides n8n credential setup through Computer Use browser tools. Use when a user needs OAuth apps, API keys, client IDs, client secrets, or other credential values from an external service console.
n8n-docs-assistant
Answers n8n product, setup, credential, node, hosting, API, and usage questions from current n8n docs. Load n8n-docs via loadtool before calling it (search "n8n docs" if not visible). Use when the user asks how to configure, set up, troubleshoot, or understand n8n behavior, especially credential setup questions opened…
proxy-config-skill
Configure residential proxy providers and make proxied HTTP requests with geo-targeting.
geocoding-skill
Convert addresses to coordinates (geocoding) or coordinates to addresses (reverse geocoding) using Google Maps API.
http-request-skill
Make HTTP requests to external APIs and web services. Supports GET, POST, PUT, DELETE, PATCH methods with headers and JSON body.
vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.