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.
npx skills add anoopsg/agent_rules --skill add-api-endpointgit clone --depth 1 https://github.com/anoopsg/agent_rulesWrote 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.
[](https://agentmods.dev/skills/anoopsg/agent_rules/add-api-endpoint)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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 asResult. 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/.apiClientProvideris the single place that picks it. - Mock-first. With
MOCK_APIon,MockHttpClientanswers requests fromFixturesthrough 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, turningMOCK_APIoff 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
operationIdbecomes the method name everywhere (ApiClient, adapter, service). - Each
components/schemasentry 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.
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.
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.
- 22d ago First seen · 246 lines · 72 tokens per session scan A b8b770e161a6
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.
add-api-endpoint compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| add-api-endpointanoopsg/agent_rules | Skill | 2 | 23d ago | MIT | A | 72 | Claude Code, Codex |
| laravel-inertia-reactAsyrafHussin/agent-skills | Skill | 111 | today | MIT | A | 59 | Claude Code, Codex |
| laravel-best-practicesAsyrafHussin/agent-skills | Skill | 111 | today | MIT | A | 54 | Claude Code, Codex |
| laravel-queuesAsyrafHussin/agent-skills | Skill | 111 | today | MIT | A | 105 | Claude Code, Codex |
| api-design-patternsAsyrafHussin/agent-skills | Skill | 111 | today | MIT | A | 59 | Claude Code, Codex |
| laravel-mcpAsyrafHussin/agent-skills | Skill | 111 | today | MIT | A | 51 | Claude Code, Codex |
| designing-data-intensive-applicationsciembor/agent-rules-books | Skill | 3.4k | 2mo ago | MIT | A | 34 | Claude Code, Codex |