Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/willdady/platypus/add-api-endpointnpx skills add willdady/platypus --skill add-api-endpointgit clone --depth 1 https://github.com/willdady/platypusWrote 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/willdady/platypus/add-api-endpoint)<a href="https://agentmods.dev/skills/willdady/platypus/add-api-endpoint"><img src="https://agentmods.dev/badge/skills/willdady/platypus/add-api-endpoint.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 | $0.00035 | $0.00796 |
| Opus 5 | $0.00017 | $0.00398 |
| Sonnet 5 | $0.00007 | $0.00159 |
| Haiku 4.5 | $0.00003 | $0.00080 |
Grade A, and why
add-api-endpoint 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 3d 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 — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Adding New API Endpoints
Authenticated is not scoped. requireAuth proves who the caller is and
nothing about what they may reach. Platypus is multi-tenant — Organization →
Workspace → resource — so an endpoint carrying only requireAuth is reachable
by any logged-in user against any tenant's data. Scope is a separate,
mandatory decision, taken per route.
Steps
-
Create the route module in the backend's routes area — a
Honoinstance exported for mounting. -
Mount it on the app in the backend's server module. The mount path carries the tenancy, so the hierarchy lives in the URL and the middleware reads the ids from it:
app.route("/organizations/:orgId/workspaces/:workspaceId/agents", agent); -
Define the request schemas in the shared schemas package, following the full / create / update variants each domain model already has.
-
Compose each route: authenticate, scope, validate, handle — in that order, as arguments to the route, not as a blanket
.use("*"). Scope is per route because two routes in one file rarely deserve the same access.agent.post( "/", requireAuth, requireOrgAccess(), requireWorkspaceAccess, sValidator("json", agentCreateSchema), async (c) => { const data = c.req.valid("json"); const scope = workspaceScopeOf(c); // ... }, );
Done when every route in the module names its scoping middleware explicitly, and you can say which tenant each one is confined to.
Choosing the scope
Pick the narrowest that admits the callers you intend:
| Middleware | Admits |
|---|---|
requireOrgAccess() |
any member of the Organization in the path |
requireOrgAccess(["admin"]) |
members holding one of the named Organization roles |
requireWorkspaceAccess |
callers permitted in the Workspace in the path |
requireWorkspaceOwner |
the Workspace's Owner |
requireWorkspaceConfigAccess() |
credential- or reach-bearing Workspace config, admin-only |
requireWorkspaceConfigAccess(flag) |
the same, plus the Owner when that Workspace flag is set |
requireSuperAdmin |
platform operators only |
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.
- 3d ago First seen · 89 lines · 35 tokens per session scan A f50c85996cdb
add-api-endpoint is a skill published in the GitHub repository willdady/platypus (71 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 796 once invoked, about $0.0002 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-09-01.
Other skills, from other repositories
p5js
Production pipeline for interactive and generative visual art using p5.js. Creates browser-based sketches, generative art, data visualizations, interactive experiences, 3D scenes, audio-reactive visuals, and motion graphics — exported as HTML, PNG, GIF, MP4, or SVG. Covers: 2D/3D rendering, noise and particle systems…
opencode
Delegate coding tasks to OpenCode CLI agent for feature implementation, refactoring, PR review, and long-running autonomous sessions. Requires the opencode CLI installed and authenticated.
architecture-diagram
Generate dark-themed SVG diagrams of software systems and cloud infrastructure as standalone HTML files with inline SVG graphics. Semantic component colors (cyan=frontend, emerald=backend, violet=database, amber=cloud/AWS, rose=security, orange=message bus), JetBrains Mono font, grid background. Best suited for…
ideation
Generate project ideas through creative constraints. Use when the user says 'I want to build something', 'give me a project idea', 'I'm bored', 'what should I make', 'inspire me', or any variant of 'I have tools but no direction'. Works for code, art, hardware, writing, tools, and anything that can be made.
mcp-servers
Add, remove, configure, and troubleshoot MCP (Model Context Protocol) servers. Use when the user wants to connect external tools, manage MCP server lifecycle, or debug MCP connectivity issues.
slacrawl
Archive and search Slack workspace messages, threads, and channels via the slacrawl CLI. Supports API sync, Slack export ZIP import, local desktop cache import, and full-text search.