api-conventions

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

A set of rules for choosing consistent response fields and error handling in the Platypus backend API. It explains when an operation should return an error response and when it should throw a typed error.

In plain words
What is it for?
Use it when adding or changing backend routes, API responses, or related tests.
Why use it?
It prevents success and failure responses from using inconsistent formats. Shared error handling also keeps the same business rule consistent across API routes and agent tools.

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 or changing backend routes, API responses, or related tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/willdady/platypus/api-conventions
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 api-conventions
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 api-conventions

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/willdady/platypus/api-conventions"><img src="https://agentmods.dev/badge/skills/willdady/platypus/api-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 631 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.00060 $0.00631
Opus 5.5 $0.00024 $0.00252
Sonnet 5.5 $0.00012 $0.00126
Haiku 4.5 $0.00006 $0.00063

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

Security

Grade A, and why

api-conventions 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 15d 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/api-conventions/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Response Conventions

The two keys

error carries a failure. message carries a 2xx status line for an operation that has no resource to return.

return c.json({ error: "Workspace not found" }, 404);
return c.json({ message: "Board deleted" });

Never message on a 4xx/5xx — that is the one crossing the codebase does not make.

A delete or action with nothing to return answers 200 { message } — never a bodiless 204, and never { success: true }.

The error seam

Five cross-cutting failures are thrown, not returned. A single onError seam maps each to its status and emits the same { error } body, so a domain rule states its message once instead of once per caller:

Throw Becomes
NotFoundError 404
ValidationError 400
LockedError 403
ConflictError 409
UnsupportedError 501

A Postgres unique violation also maps to 409 — detect it through the shared helper rather than re-reading the driver's error shape. So does a foreign-key violation, as a backstop only: a delete guarded by a restrict reference should throw a ConflictError naming what still uses the row first.

if (!row) throw new NotFoundError("Card not found");
throw new ValidationError("Invalid user assignee");

A resource referenced in the request body that isn't in this Organization, or isn't Shared, is a NotFoundError (404) naming what couldn't be used — not a 422, and no extra detail fields beside error.

Throwing is what lets one rule serve more than one surface: the Kanban rules answer both the HTTP routes and the Agent tool set from a single place. Reach for the seam whenever the failure is one of those five; a 4xx that only one route can produce still answers inline with c.json({ error }, status). Both are current and roughly equally common — the seam is not a migration you should finish.

Test assertions

Assert against the key the response actually uses:

Read the full file on GitHub · 73 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. 15d ago Changed · +7 lines 8a959ec75d69
  2. 17d ago Changed · +2 lines 9c11eb1b3c5a
  3. 21d ago Changed · +1 lines 5427c8e34d9f
  4. 1mo ago First seen · 63 lines · 60 tokens per session scan A f9e129ea7b5e

Subscribe to this mod's changes

api-conventions is a skill published in the GitHub repository willdady/platypus (120 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 631 once invoked, about $0.0002 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

Other skills, from other repositories

webhook-subscriptions

Create and manage webhook subscriptions for event-driven agent activation. Use when the user wants external services (GitHub, GitLab, Stripe, Linear, PagerDuty, Sentry, or any generic source) to trigger agent runs by POSTing events to a URL.

moltis-org/moltis · 57 tokens

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.

langfuse/langfuse · 58 tokens

technical-integrations

Hunt existing integration patterns and design vendor/framework-agnostic API, RFC, SDK, and integration plans for new external vendor integrations.

vincentkoc/dotskills · 31 tokens

app-ai-wiring

A guide for connecting an app to an AI language model or to the tiguclaw assistant. It compares a tiguclaw-specific endpoint with an OpenAI-compatible gateway, a standard interface used by several model services.

tigu77/tiguclaw · 232 tokens

helix-org-cli

Use the Helix CLI to operate helix-org (bots, topics, processors, chat) and raw REST via helix api. Use when listing/managing org bots, chatting with chief-of-staff or other bots, or calling any authenticated Helix API path.

helixml/helix · 59 tokens

go-context

Use when working with context.Context in Go — placement in signatures, propagating cancellation and deadlines, and storing values in context vs parameters. Also use when cancelling long-running operations, setting timeouts, or passing request-scoped data, even if they don't mention context.Context directly. Does not…

cxuu/golang-skills · 73 tokens