api-conventions

api-conventions is a skill for Claude Code from justnau1020/claude-os. It costs 38 tokens per session (414 once invoked), scanned A, original, Apache-2.0.

API development conventions are rules for building routes, MCP tools, and command-line commands. They cover login checks, access to user-owned data, route organization, and error responses.

In plain words
What is it for?
Use them when creating or modifying API endpoints, MCP tools, or CLI commands. They guide authentication, ownership checks, typed request and response data, route files, and HTTP errors.
Why use it?
They give API changes a consistent structure and help prevent missing authentication, cross-user data access, and unclear errors.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use them when creating or modifying API endpoints, MCP tools, or CLI commands. They guide authentication, ownership checks, typed request and response data, route files, and HTTP errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/justnau1020/claude-os/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 justnau1020/claude-os --skill api-conventions
Clone the repo
git clone --depth 1 https://github.com/justnau1020/claude-os

Made for: Claude Code.

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/justnau1020/claude-os/api-conventions/github.svg)](https://agentmods.dev/skills/justnau1020/claude-os/api-conventions)
Your own site
<a href="https://agentmods.dev/skills/justnau1020/claude-os/api-conventions"><img src="https://agentmods.dev/badge/skills/justnau1020/claude-os/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/justnau1020/claude-os/api-conventions"><img src="https://agentmods.dev/badge/skills/justnau1020/claude-os/api-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 414 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.
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.00038 $0.00414
Opus 5 $0.00019 $0.00207
Sonnet 5 $0.00008 $0.00083
Haiku 4.5 $0.00004 $0.00041

Measured 9d ago against content hash 487483414834, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

skills/conventions/api-conventions/SKILL.md · 50 lines

What it actually says

API Development Conventions

These conventions apply when working on the API layer (routes, MCP tools, CLI commands).

Authentication

  • All endpoints require valid authentication (Bearer token, session cookie, or API key)
  • Use dependency injection for auth (e.g., Depends(get_current_user) in FastAPI)
  • Provide both required and optional auth dependencies where appropriate
  • Rate limit registration and auth endpoints to prevent brute-force
  • Resource ownership is enforced -- users can only access their own resources

Route Organization

  • One route file per resource domain: routes_users.py, routes_orders.py, etc.
  • Each route file defines a router (e.g., APIRouter in FastAPI)
  • Routers are registered in the main app file

Error Responses

  • 422 -- Validation errors (malformed input)
  • 404 -- Resource not found
  • 429 -- Rate limits (pass through from upstream with reset timing)
  • 503 -- Upstream service unavailability
  • Error messages must be specific and actionable, not generic

Resource Ownership

  • Every endpoint that accesses a user's resource must verify ownership
  • Use the dependency injection pattern for ownership checks
  • Never allow cross-user resource access

MCP Server (if applicable)

  • Tools mirror REST API functionality
  • Each tool has a clear description to help LLMs understand when to use it
  • Include example parameter values in descriptions
  • Return strings for LLM consumption

CLI (if applicable)

  • Commands organized by resource domain
  • Consistent flag naming across commands
  • Help text on every command and argument

Middleware

  • Security middleware for headers, CORS, CSP
  • Rate limiting middleware
  • All middleware must be async (if using async framework)
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. 9d ago First seen · 50 lines · 38 tokens per session scan A 487483414834

Subscribe to this mod's changes

api-conventions is a skill published in the GitHub repository justnau1020/claude-os (3 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 414 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-08-31.

Related

Other skills, from other repositories

api-tester

A tool for creating and checking API tests from the real API contract and implementation. An API is the agreed way that software sends requests and receives responses.

laolaoshiren/claude-code-skills-zh · 86 tokens

fastreact

Scaffold and build a full-stack web app: FastAPI backend (Python, uv, SQLModel, Postgres, Alembic, JWT + Google OAuth, boto3/S3) + React frontend (Vite, TypeScript, shadcn/ui + Tailwind, TanStack Router/Query/Table, Zod, Axios), wired with Docker Compose. Use this skill whenever the user wants to spin up, bootstrap…

vanducng/skills · 214 tokens

apidesign

Design stable, hard-to-misuse interfaces - REST/GraphQL endpoints, module boundaries, type contracts, component props, anything where one piece of code talks to another. Use at design time, before implementing the surface. Triggers: 'design this API', 'API contract', 'endpoint design', 'module boundary', 'interface…

vanducng/skills · 89 tokens

dag-factory

Author Airflow DAGs from dag-factory YAML. Use when creating or editing YAML DAG configs, loaders, callbacks, custom operators in YAML, dynamic mapping, datasets, or validating dag-factory files. Covers both map-style tasks (taskid as YAML key) used by in-repo plugins and the PyPI dag-factory v1 list format. Not for…

vanducng/skills · 103 tokens

py2go

Migrate Python projects to idiomatic Go end-to-end. Branches into 6 project-type playbooks (CLI, TUI, HTTP backend, data pipeline, async worker, library) with the right stack defaults (Gin, pgx, sqlc, slog, etc.) and pinned library versions. Default strategy: LLM module-by-module rewrite with golden-file parity tests…

vanducng/skills · 141 tokens

php-form-mailer

Wire any HTML form to a two-email PHP system. Generates a complete PHP handler that sends a structured notification email to the site owner and a branded HTML confirmation to the person who submitted, updates the form action and JS handler with a mailto fallback, then tests the live endpoint with curl. Works on any…

jqaisystems/jqai-ai-skills · 86 tokens