add-api-endpoint

add-api-endpoint is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 64 tokens per session (486 once invoked), scanned A, original, Apache-2.0.

A guide for adding or changing an HTTP API endpoint, the URL-based interface that lets software exchange requests and responses.

In plain words
What is it for?
Use it to add routes such as POST /things, expose list data, or add fields to an existing response, including validation, tests, and registration.
Why use it?
It helps keep the new endpoint consistent with the rest of the codebase and prevents malformed requests, incorrect responses, and missing access checks.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tmj-90/gaffer/add-api-endpoint
Any agent
npx skills add tmj-90/gaffer --skill add-api-endpoint
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

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/tmj-90/gaffer/add-api-endpoint.svg)](https://agentmods.dev/skills/tmj-90/gaffer/add-api-endpoint)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/add-api-endpoint"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-api-endpoint.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 486 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00064 $0.00486
Opus 5 $0.00032 $0.00243
Sonnet 5 $0.00013 $0.00097
Haiku 4.5 $0.00006 $0.00049

Measured 4d ago against content hash 2c8b2610fd41, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

runner/skills/add-api-endpoint/SKILL.md · 38 lines

What it actually says

Add an API endpoint

Add an endpoint that follows the repo's existing routing, validation, and response conventions, with input validated at the boundary and tests proving the contract.

Steps

  1. Read the lore first. Call search_lore (Memory MCP) for the repo's API conventions: routing style, request/response envelope, error format, auth/authz pattern, and pagination rules. Honour any ADRs you find.
  2. Find a sibling endpoint and copy its shape — router registration, handler structure, DTO/schema definitions, and where validation lives.
  3. Validate input at the boundary. Define the request schema with the repo's validation library (e.g. Zod, Pydantic, Bean Validation); reject malformed input with the project's standard error response. Never trust the client.
  4. Implement the handler thin: validate → delegate to the service/domain layer → map to the standard response envelope. Apply the existing auth/authz checks.
  5. Wire it up (register the route) and add tests: validation rejects bad input, the happy path returns the right status/body, and authz is enforced. Use the add-integration-test skill for the route-level test.
  6. Run tests + lint (run-tests, run-lint). Evidence the command output and the changed files, then use the record-evidence skill and submit for review.

Rules

  • Validate every input at the boundary; never trust client data.
  • Match the repo's response envelope, error format, and auth pattern — don't invent one.
  • Don't widen scope (no unrequested fields or endpoints); keep to the AC.
  • Flag any new auth-surface or data-exposure risk in your review reason.
  • Run on a branch (the create-branch skill), never a protected branch.
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. 4d ago First seen · 38 lines · 64 tokens per session scan A 2c8b2610fd41

Subscribe to this mod's changes

add-api-endpoint is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 4d ago), licensed Apache-2.0. It adds 64 tokens to every session and 486 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-31.

Related

Other skills, from other repositories

swapper-deposit

Deposit and bridge funds into a wallet or protocol using Swapper Finance. Handles fiat on-ramp (card payments via Mastercard, Visa, Apple Pay, Google Pay), crypto transfers, and cross-chain bridging via Chainlink CCIP — directly into lending, staking, and liquidity protocols. Supports Ethereum, Base, Arbitrum…

swapperfinance/swapper-toolkit · 158 tokens

dbt-model-generator

Generate dbt model generator operations. Auto-activating skill for Data Pipelines. Triggers on: dbt model generator, dbt model generator Part of the Data Pipelines skill category. Use when working with dbt model generator functionality. Trigger with phrases like "dbt model generator", "dbt generator", "dbt".

nek1987/auto-agent-harness · 73 tokens

definition-of-done-generator

Generate definition of done generator operations. Auto-activating skill for Enterprise Workflows. Triggers on: definition of done generator, definition of done generator Part of the Enterprise Workflows skill category. Use when working with definition of done generator functionality. Trigger with phrases like…

nek1987/auto-agent-harness · 72 tokens

incident-slo-runbook

Create or audit SLOs, SLIs, alert rules, incident response steps, escalation paths, postmortems, operational runbooks, and customer-impact communication. Use when defining production reliability, preparing launch readiness, responding to an outage, writing a runbook, tuning alerts, or closing the loop after an…

majiayu000/spellbook · 70 tokens

mobile-developer

Expert knowledge in mobile app development for iOS, Android, and cross-platform solutions.

tao12345666333/ankaloop · 20 tokens

gh-ci-analyzer

使用 gh CLI 分析 GitHub Actions CI 日志,提供结构化的故障诊断和报告.

tao12345666333/ankaloop · 27 tokens