add-api-endpoint

add-api-endpoint is a skill for Claude Code, Codex from anoopsg/agent_rules. It costs 72 tokens per session (2,467 once invoked), scanned A, original, MIT.

A workflow for adding a backend API call through the whole application: the API description, client method, data mapping, service, mock response, and repository call. An API is a defined way for software components to exchange requests and data.

In plain words
What is it for?
Use it to add an endpoint, update an API description, map backend errors, or build against a mock server before deployment.
Why use it?
It prevents different layers from drifting apart and lets features use the API without depending directly on network details. Its mock can support development before the real backend is available.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add an endpoint, update an API description, map backend errors, or build against a mock server before deployment.

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

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/anoopsg/agent_rules/add-api-endpoint/github.svg)](https://agentmods.dev/skills/anoopsg/agent_rules/add-api-endpoint)
Your own site
<a href="https://agentmods.dev/skills/anoopsg/agent_rules/add-api-endpoint"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/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/anoopsg/agent_rules/add-api-endpoint"><img src="https://agentmods.dev/badge/skills/anoopsg/agent_rules/add-api-endpoint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,467 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.00072 $0.02467
Opus 5.5 $0.00029 $0.00987
Sonnet 5.5 $0.00014 $0.00493
Haiku 4.5 $0.00007 $0.00247

Measured 22d ago against content hash b8b770e161a6, 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 22d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/api_coverage.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/exclusive/skills/add-api-endpoint/SKILL.md · 246 lines

How it starts

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

Add API Endpoint Skill

This skill defines the process for adding a backend call end to end: from the spec in contracts/openapi.json, through the transport-neutral ApiClient and its REST adapter, to the mock that answers it without a backend, and the feature repository that calls it.

Why It Is Built This Way

  • Features never see the transport. A repository depends only on ApiClient (lib/src/infrastructure/api/api_client.dart), which returns feature models as Result. No Chopper, JSON or HTTP status reaches a feature, so a feature can't break when the wire format changes.
  • The adapter is swappable. Everything wire-shaped — Chopper services, DTOs, interceptors, the converter, the mock — lives in the adapter under lib/src/infrastructure/api/adapters/openapi/. apiClientProvider is the single place that picks it.
  • Mock-first. With MOCK_API on, MockHttpClient answers requests from Fixtures through the same interceptors, converter and DTOs as the real network. Build the endpoint against the agreed schema before the backend exists; when the backend ships, turning MOCK_API off is the only change.

See ADR-0018 and docs/architecture/data-layer.md (if present) for the full rationale — this skill only covers the mechanics.

1. Start From the Contract

contracts/openapi.json is the source of truth for every call. Edit it first (or replace it with the backend's spec), before touching code, so the code follows the contract and not the other way round.

  • Each operation's operationId becomes the method name everywhere (ApiClient, adapter, service).
  • Each components/schemas entry becomes a DTO named after it (MaintenanceInfo → MaintenanceInfoDto).

If the backend hands you a Postman collection or a different spec, see references/conventions.md for what to read in it.

Stop and ask before writing code if the spec changes a convention the adapter implements once for every call: the auth scheme, public paths, token refresh, a response envelope, the error body, or pagination. Each of those has one home (listed in the reference), and changing it affects every endpoint.

Read the full file on GitHub · 246 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 22d ago First seen · 246 lines · 72 tokens per session scan A b8b770e161a6

Subscribe to this mod's changes

add-api-endpoint is a skill published in the GitHub repository anoopsg/agent_rules (2 stars, last pushed 23d ago), licensed MIT. It adds 72 tokens to every session and 2,467 once invoked, about $0.0003 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-11-08.

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-endpointanoopsg/agent_rulesSkill223d agoMITA72Claude Code, Codex
laravel-inertia-reactAsyrafHussin/agent-skillsSkill111todayMITA59Claude Code, Codex
laravel-best-practicesAsyrafHussin/agent-skillsSkill111todayMITA54Claude Code, Codex
laravel-queuesAsyrafHussin/agent-skillsSkill111todayMITA105Claude Code, Codex
api-design-patternsAsyrafHussin/agent-skillsSkill111todayMITA59Claude Code, Codex
laravel-mcpAsyrafHussin/agent-skillsSkill111todayMITA51Claude Code, Codex
designing-data-intensive-applicationsciembor/agent-rules-booksSkill3.4k2mo agoMITA34Claude Code, Codex