# Specseal: Agree the API contract before you build it

> Validated schemas, one error shape, status-code rules, pagination, idempotency keys, scopes and rate limits in one OpenAPI file or typed contract, with contract tests and a breaking-change checklist.

Specseal: Agree the API contract before you build it is a paid AI agent skill on Agensi by MAJI, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [MAJI](https://www.agensi.io/creators/maji)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-10-18
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/specseal-agree-the-api-contract-before-you-build-it
- Tags: api, code-review

## About this skill

Every route returns its own error format, a renamed field crashes the mobile app that cannot update, and a retried POST creates the order twice. The cause is that nobody agreed what the API promises. Specseal writes that contract first, so clients, tests and docs come from one source.

### What it does
- **Use-case first design** derives endpoints from each consumer's actor, action, data in and data out, not from the tables.
- **Validated schemas** check params, query, body and headers at the boundary with the schema library your stack already has (Zod, Pydantic, JSON Schema).
- **One success and one error shape** with stable machine codes, field-level validation details and a request id.
- **Status-code rules**, including "never 200 with an error body".
- **Lists, retries and scopes**: every list paginated with a max page size, an `Idempotency-Key` on retry-sensitive POSTs, scopes and ownership checks on every path id.
- **Rate limits and versioning** written into the contract, with 429 plus `Retry-After` and a deprecation path for breaking changes.

### How it works
1. **Consumers and naming**: one line per use case, then plural kebab-case paths, one field case and nesting of at most one level.
2. **Schemas and rules**: request, response and error schemas per endpoint, with the rules above applied.
3. **Contract as source**: an OpenAPI 3.1 file or a typed schema module that generates OpenAPI, linted in CI.
4. **Contract tests**: valid request, each documented error, missing auth, wrong owner and idempotent replay.
5. **Breaking-change checklist**: the contract is diffed against the deployed version before ship.

### Frameworks & tools
OpenAPI 3.1 or a typed schema module, using Zod, Pydantic or JSON Schema. Variants cover internal apps, public APIs, API reviews and webhook providers.

### Why this beats prompting it yourself
A plain prompt designs endpoints one at a time and lets each one invent its own rules. Specseal applies one rule set across the whole API, traces every endpoint to a use case, and ends with contract tests and a breaking-change diff.

### Use cases
- **New backends** designed before handlers exist.
- **Payload disputes** between frontend and backend.
- **Partner or mobile APIs** whose clients cannot update instantly.
- **Live endpoint changes** checked for breakage.

### Known limitations
Does not design database tables or migrations, and does not cover credit or payment idempotency inside a ledger. For a server-rendered page with no external client, a typed server function may be enough.

## Requires

- OpenAPI 3.1
- Zod
- Pydantic
- JSON Schema

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Specseal: Agree the API contract before you build it skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does it need from me?

Access to the repo or a description of who calls the API. It reads the README, package manifest and config files to find the stack, and asks once for anything still missing.

### Will it design my database too?

No. Table design and migrations are out of scope, as is credit or payment idempotency inside a ledger. It covers the contract that sits in front of them.

### How is this different from asking an agent for an OpenAPI spec?

A plain prompt writes a spec. Specseal starts from consumers and use cases, applies one error shape and the same status, pagination, idempotency, scope and rate-limit rules to every endpoint, then adds contract tests and a breaking-change check before ship.

### What is in the zip?

The zip contains SKILL.md (the instructions your agent follows) and LICENSE.md. Nothing else is installed. It works with the schema library your stack already uses.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
