api-contract-init

api-contract-init is a skill for Claude Code, Codex from Bidiche49/claude-conf. It costs 15 tokens per session (705 once invoked), scanned A, original, MIT.

An API documentation generator that creates APICONTRACT.md from routes and controllers in an existing backend. An API is the set of web endpoints that other software can call.

In plain words
What is it for?
Detecting the backend framework, finding its routes, and recording each endpoint's method, path, and request or response types.
Why use it?
It documents endpoints that already exist without inventing routes or data types, making the backend easier to understand and use.

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/bidiche49/claude-conf/api-contract-init
Any agent
npx skills add Bidiche49/claude-conf --skill api-contract-init
Clone the repo
git clone --depth 1 https://github.com/Bidiche49/claude-conf

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-contract-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/bidiche49/claude-conf/api-contract-init.svg)](https://agentmods.dev/skills/bidiche49/claude-conf/api-contract-init)
Your own site
<a href="https://agentmods.dev/skills/bidiche49/claude-conf/api-contract-init"><img src="https://agentmods.dev/badge/skills/bidiche49/claude-conf/api-contract-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 705 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.00015 $0.00705
Opus 5 $0.00008 $0.00352
Sonnet 5 $0.00003 $0.00141
Haiku 4.5 $0.00002 $0.00071

Measured 4d ago against content hash 2a32c6c064b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-contract-init 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.

api-contract/skills/api-contract-init/SKILL.md · 89 lines

How it starts

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

Generate an API_CONTRACT.md by scanning the real codebase. Never fabricate endpoints or types.

1. Detect the backend stack

File Stack
package.json with @nestjs/core NestJS
package.json with express/fastify Express/Fastify
composer.json CakePHP / Laravel
pyproject.toml or requirements.txt with django/fastapi/flask Python
go.mod Go
Cargo.toml with actix/axum/rocket Rust
Gemfile with rails Rails

2. Scan routes and controllers

Stack Where to look
NestJS *.controller.ts — decorators @Get, @Post, @Put, @Delete, @Patch
Express/Fastify routes/**, router/**router.get(), app.post(), etc.
CakePHP/Laravel *Controller.php — public methods, routes/*.php
Django urls.pyurlpatterns, ViewSet classes
FastAPI *.py@app.get, @router.post, etc.
Go *_handler.go, *_router.goHandleFunc, mux.Handle
Rails config/routes.rb — resources, get/post/put/delete
Rust routes/*.rs — handler functions, route macros

3. For each endpoint, extract

  • HTTP method and path
  • Request body / query params (from DTOs, structs, dataclasses, type annotations)
  • Response type (if detectable)
  • Auth requirement (if detectable)
  • If a type cannot be determined, write // TODO: define typeNEVER fabricate

4. Generate the contract

Use this format:

# API Contract — [Project Name]

Source of truth for backend/frontend communication.

## Global Conventions
- Base URL: [detected or TODO]
- Auth: [detected or TODO]
- Response format: [detected or standard JSON]
- Error format: [detected or TODO]

## [Domain — grouped by controller/router]

### [METHOD] [path]

**Request:**
\`\`\`[lang]
[body type / query params]
\`\`\`

**Response:**
\`\`\`[lang]
[response type]
\`\`\`

**Auth:** [required/optional/none]
**Notes:** [if applicable]

---

## Changelog

| Date | Change | Side |
|------|--------|------|
| [today] | Initial generation from code | backend |

Read the full file on GitHub · 89 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. 4d ago First seen · 89 lines · 15 tokens per session scan A 2a32c6c064b7

Subscribe to this mod's changes

api-contract-init is a skill published in the GitHub repository Bidiche49/claude-conf (2 stars, last pushed 4mo ago), licensed MIT. It adds 15 tokens to every session and 705 once invoked, about $0.0001 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

hooks-eval

Evaluate hook security, performance, and SDK compliance. Use for audits.

athola/claude-night-market · 18 tokens

webmcp-setup

Bootstraps webmcp-react into an existing React or Next.js app. Installs dependencies, adds WebMCPProvider, creates a first tool, and configures the MCP client bridge. Use when the user wants to set up WebMCP, add MCP tools to their app, integrate webmcp-react, or make their React app accessible to AI agents.

agentcathq/webmcp-react · 80 tokens

goal

Run a large or unfamiliar goal through the full ballast pipeline — mobilize what you already hold, terrain scan, full skeleton, atomic foundation learning with verification, then build from bedrock to a verified done. Use when the user hands over a big goal, enters a new field, or asks to learn X in order to achieve Y.

svy04/ballast · 69 tokens

report

Read the delivery log and say which rules actually fire, which never have, and what to prune or fix. Use when the user asks whether ballast is doing anything, wants to clean up their rule catalog, or on a periodic review.

svy04/ballast · 49 tokens

engram

Claude Engram persistent memory — quick reference for all MCP tools and automatic hook behaviors. Use when you need to remember how to store, search, or manage memories, or query session history.

20alexl/claude-engram · 41 tokens

eval-harness

Assessment-driven development — Quantify code generation quality with pass@k / pass^k metrics, automatically scored by Grader.

majiayu000/vibeguard · 29 tokens