forge-api

A playbook for building APIs from a written contract. An API is a way for software to communicate, and the contract describes its requests, responses, authentication, and rules before implementation begins.

In plain words
What is it for?
Use it when designing REST, GraphQL, or gRPC endpoints, including authentication, JWTs, versioning, rate limits, idempotency, validation, and contract tests.
Why use it?
It reduces mismatches between documented API behavior and the code, and requires tests for security and contract compliance.

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/forgeyclap/claude-forge/forge-api
Any agent
npx skills add ForgeyClap/claude-forge --skill forge-api
Clone the repo
git clone --depth 1 https://github.com/ForgeyClap/claude-forge

Made for: Claude Code, Codex.

Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,467 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.00047 $0.01467
Opus 5 $0.00023 $0.00733
Sonnet 5 $0.00009 $0.00293
Haiku 4.5 $0.00005 $0.00147

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

Security

Grade A, and why

forge-api 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 2d 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.

.claude/skills/forge-api/SKILL.md · 45 lines

How it starts

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

Forge playbook — Contract-first API

Do not duplicate ECC skills — defer to: forge-integration (when the API mainly wires external services / webhooks), forge-payments (any money/charge/gateway-webhook endpoint), forge-fullstack (when the API is one tier of a full app). This file is orchestration only.

This is an auth + data-boundary domain. The contract (OpenAPI / JSON Schema / GraphQL SDL / gRPC proto) is the source of truth and comes first; the implementation is validated against it. architect owns the contract, integration-boss / build-boss implement, security-boss reviews auth/authz (a genuine high-risk trigger), test-boss owns the contract tests. Never claim "auth enforced" or "contract-compliant" without a negative test that proves it.

Hard rules (non-negotiable)

  • Contract first, single source of truth. Define the API contract (OpenAPI 3.x, JSON Schema, GraphQL SDL, or a gRPC .proto) BEFORE implementing handlers. Commit it; the implementation is generated from or validated against it. Drift between contract and behavior is a bug, not a detail.
  • Input validation at every boundary. Validate every request — body, path params, query, headers — against the schema. Reject invalid input with a 4xx and a consistent error envelope; enforce type, size, and range limits. Never trust client input; never pass it unvalidated into a query, filesystem, or shell.
  • Auth on every protected route, server-side, deny-by-default. Authentication AND authorization are enforced in the service on each protected route — not only at a gateway, not "assumed from the frontend". New routes default to protected; opening one is a deliberate, reviewed act. Per-route scope/role checks; a request without valid credentials gets 401/403, proven by a negative test.
  • Explicit versioning. The API is versioned (path /v1, header, or media type). No breaking change ships inside an already-published version; breaking changes get a new version + a stated deprecation path.
  • Idempotency on unsafe retryable writes. GET/PUT/DELETE are idempotent by design; retryable POST creates (orders, payments, side-effecting actions) accept a client Idempotency-Key so a retry or double-submit does not duplicate the effect.
  • Rate limits + quotas. Per-client / per-key rate limiting with 429 + Retry-After; abuse and runaway clients are bounded. Consistent error envelope; pagination on list endpoints (no unbounded result sets); secrets in env — never in responses, error bodies, or logs.

Read the full file on GitHub · 45 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. 2d ago First seen · 45 lines · 47 tokens per session scan A f4a36a6ee4cc

Subscribe to this mod's changes

forge-api is a skill published in the GitHub repository ForgeyClap/claude-forge (2 stars, last pushed 29d ago), licensed MIT. It adds 47 tokens to every session and 1,467 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

zh-output-example

Reviews Chinese skill documentation for publication readiness. Invoke when the user asks in Chinese to review a skill.

bytedance/deer-flow · 24 tokens

argent-tv-interact

Control and inspect TV apps via argent — Apple TV (tvOS), Android TV (leanback), and Amazon Fire TV (Vega). Boot the target, read focus, navigate with the D-pad remote, type, screenshot, and on Vega debug the JS runtime (evaluate, console logs, network inspector). Use when a task targets a TV (runtimeKind "tv", or…

software-mansion/argent · 107 tokens

review-offered-task

Review a task that has been offered to you and decide whether to accept or reject it.

desplega-ai/agent-swarm · 22 tokens

company-hiring-intelligence

Reverse-engineer what a company is building by scraping their job postings, careers page, LinkedIn Jobs, and engineering blog using TinyFish web agents. Use whenever a user wants to understand a company's strategic direction from hiring signals, do competitive intelligence, figure out a tech stack from job…

tinyfish-io/tinyfish-cookbook · 169 tokens

文档协作

引导用户通过结构化的文档共同编写工作流程。当用户想撰写文档、提案、技术规范、决策文档或类似结构化内容时使用。该工作流程帮助用户高效传递上下文,通过迭代优化内容,并验证文档对读者有效。当用户提到写文档、创建提案、起草规范或类似文档任务时触发。.

Tencent/WeKnora · 95 tokens

aidd-dev:08:for-sure

Iterative agent loop that tracks attempts and retries until a success condition is met. Use when the user says "for sure", "make sure", "keep trying until", "loop until done", "don't stop until", or needs guaranteed completion of a task with explicit success criteria.

ai-driven-dev/framework · 66 tokens