add-api-endpoint

add-api-endpoint is a skill for Claude Code, Codex from willdady/platypus. It costs 35 tokens per session (841 once invoked), scanned A, original, MIT.

A guide for adding authenticated, tenant-scoped API endpoints with Hono.js, a JavaScript and TypeScript web framework.

In plain words
What is it for?
Use it when adding Platypus backend routes, mounting them in the server, defining request schemas, and applying the correct organization and workspace permissions.
Why use it?
It helps prevent logged-in users from accessing another organization or workspace's data by requiring authentication, access checks, validation, and database handling.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when adding Platypus backend routes, mounting them in the server, defining request schemas, and applying the correct organization and workspace permissions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/willdady/platypus/add-api-endpoint
Install

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.

Any agent
npx skills add willdady/platypus --skill add-api-endpoint
Clone the repo
git clone --depth 1 https://github.com/willdady/platypus

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for add-api-endpoint

README.md
[![agentmods](https://agentmods.dev/badge/skills/willdady/platypus/add-api-endpoint/github.svg)](https://agentmods.dev/skills/willdady/platypus/add-api-endpoint)
Your own site
<a href="https://agentmods.dev/skills/willdady/platypus/add-api-endpoint"><img src="https://agentmods.dev/badge/skills/willdady/platypus/add-api-endpoint/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.

agentmods 80×15 button for add-api-endpoint

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 841 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00841
Opus 5.5 $0.00014 $0.00336
Sonnet 5.5 $0.00007 $0.00168
Haiku 4.5 $0.00003 $0.00084

Measured 5d ago against content hash ac64866290c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 5d 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.

.agents/skills/add-api-endpoint/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 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

  1. Create the route module in the backend's routes area — a Hono instance exported for mounting.

  2. 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);
    
  3. Define the request schemas in the shared schemas package, following the full / create / update variants each domain model already has.

  4. 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,
      validate("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(null) 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

Read the full file on GitHub · 91 lines

Changes

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.

  1. 5d ago Changed ac64866290c9
  2. 14d ago Changed · +2 lines a7e89d88eb04
  3. 2mo ago First seen · 89 lines · 35 tokens per session scan A f50c85996cdb

Subscribe to this mod's changes

add-api-endpoint is a skill published in the GitHub repository willdady/platypus (131 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 841 once invoked, about $0.0001 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-09-01.

Related

add-api-endpoint compared with skills from other repositories

add-api-endpoint next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-api-endpointwilldady/platypusSkill131yesterdayMITA35Claude Code, Codex
add-dial-toolnanocoai/nanoclawSkill31kyesterdayMITA118Claude Code
add-signalnanocoai/nanoclawSkill31kyesterdayMITA22Claude Code
add-gchatnanocoai/nanoclawSkill31kyesterdayMITA13Claude Code
add-matrixnanocoai/nanoclawSkill31kyesterdayMITA19Claude Code
add-slacknanocoai/nanoclawSkill31kyesterdayMITB12Claude Code
n8n-docs-assistantn8n-io/n8nSkill210kyesterdaynoneA71Claude Code, Codex