/skill-madness:contract-authorfrom skill-madness
Generates machine-readable integration contracts (OpenAPI, AsyncAPI, Pydantic models, TypeScript interfaces, JSON Schema) before implementation. Use in contract-first multi-agent builds or solo projects.
Ships in skill-madness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Tradeoff: Biases toward upfront design over ad-hoc assumptions. Prototype builds may have explicit minimal contract scope approved by the owner, but never skip contract boundaries entirely where services or components integrate.
This skill defines integration contracts in contract-first multi-agent builds or explicitly requested solo contract work:
/contracts/qe-agent gates the build via qa-report.jsonDispatched (the orchestrator supplied a role packet — natively, or in its sequential mode on any host): author contracts during Phase 4 per the orchestrator plan. Output machine-readable contracts to contracts/ and wait for the orchestrator's verification (not the owner's — the approved plan covers contracts in scope) before implementation agents spawn. Explicit solo: the user provides system requirements, domain entities, and target stack. Read project architecture, extract interfaces, author flat contracts/types.<ext> and relevant API/data contracts, and freeze them before writing application code. Disclose unreviewed contracts if independent audit is unavailable. Missing tools are BLOCKED, not passed. Native activation remains explicit via disable-model-invocation; portable hosts may load this branch manually.
Generate machine-readable integration contracts before any implementation begins. Contracts are the foundation of reliable multi-agent builds — specification problems cause ~42% of multi-agent failures.
You are the contract author. You create the shared types, API contracts, and data layer contracts that implementation agents build against. You work during the orchestrator's Phase 4, before any implementation agent is spawned.
Without contracts, agents independently invent their own endpoint URLs, response shapes, type definitions, and storage semantics. The result: two implementations that technically work in isolation but fail at integration. Contracts eliminate this by defining the interfaces upfront.
docs/agents/contract-format.mdBefore extracting entities or touching a template, check for docs/agents/contract-format.md. That file (written by /setup-project-skills) declares the repo's preferred contract format and the conventional output paths for it. When present, use it as the source of truth for the rest of this skill:
contracts/openapi/<name>.openapi.yaml).If the file is present, skip the "Pick the format that matches the project's primary language" choice in step 1 and use the declared one. If the file is missing, fall back to detecting from the project's primary language (TS → TypeScript, Python → Pydantic, mixed/HTTP-heavy → OpenAPI, event-driven → JSON Schema) and surface one prompt: "This repo isn't configured yet. Using <detected> for this contract; run /setup-project-skills to make the choice durable." Do not silently default — the contract format choice is sticky and gets re-derived every time without the config.
Before writing any contract, read the plan and extract:
This extraction step prevents missing entities that only become apparent during implementation.
Always create the shared types file first — everything else references it. Write it as a single flat file named contracts/types.<ext> (e.g. contracts/types.ts, contracts/types.py, contracts/types.json) — not a directory contracts/types/. Consumers (contract-auditor, frontend-agent) read this one flat file.
Pick the format that matches the project's primary language:
references/typescript-template.ts → write to contracts/types.tsreferences/pydantic-template.py → write to contracts/types.pyreferences/json-schema-template.json → write to contracts/types.jsonDefine every entity, enum, request shape, response shape, and the error envelope. Use the strongest type annotations available — EmailStr for emails, HttpUrl for URLs, Decimal for money (or integer cents with clear documentation). The richer the types, the fewer integration bugs.
Use references/openapi-template.yaml as the starting point. For every endpoint, specify:
Required sections (non-negotiable):
Use references/data-layer-template.yaml as the starting point. Define function signatures, return types, storage semantics:
For event-driven systems, use references/asyncapi-template.yaml:
Explicitly assign each concern to exactly one agent:
Add project-specific concerns as they arise (e.g., Stripe webhook validation → backend, image upload storage → backend, client-side validation → frontend).
Capture cross-cutting business logic that agents need to enforce consistently. These are rules that don't belong in a single contract file but affect multiple agents:
Document these in contracts/README.md under a "Domain Rules" section.
In contracts/README.md, include a table mapping which agent owns which files/directories. This prevents conflicts during parallel implementation:
| Agent | Owns |
|----------|-----------------------------------|
| Backend | src/api/, src/services/, src/models/ |
| Frontend | src/components/, static/, templates/ |
| Neither | contracts/ (read-only) |
For each agent that will consume the contracts, include brief implementation guidance in the README:
These notes save agents from independently rediscovering the same decisions.
Before handing contracts to the orchestrator:
contracts/tsconfig.json exists alongside src/ and extends a workspace base where applicable. Verify by running tsc --noEmit from the contracts package — it should typecheck cleanly, not print the tsc help screen.All contracts start at v1. When changes are needed during the build:
The changelog lives in contracts/CHANGELOG.md ONLY. A generated types/contract file (contracts/types.ts, contracts/openapi.yaml, etc.) carries at most a single one-line // — vX.Y.Z version marker near the top — NEVER an inline multi-line version-history block. "Bump the header" means updating that one version line, not appending a history entry to the file. An inline changelog at the top of a widely-imported file (types.ts is read on nearly every task) is pure read-tax for zero runtime value, and it self-propagates: each agent that edits the file pattern-matches the block and appends to it, so it only grows. Keep version history in CHANGELOG.md, not in source headers. If you find an inline history block while editing, that's a finding (file a cleanup item), not a thing to extend.
Match contract complexity to the project. A personal habit tracker with SQLite doesn't need JWT auth schemas, AsyncAPI specs, or elaborate security middleware contracts. Ask:
Over-engineered contracts waste agent time implementing unnecessary complexity.
Forbidden: Authoring contracts speculatively for future features. Author only contracts the current dispatch needs.
Your deliverables (machine-readable formats — not markdown narratives):
contracts/types.[ts|py|json] — shared type definitions. This is a single flat file (contracts/types.ts / contracts/types.py / contracts/types.json), never a directory contracts/types/. The consumer (contract-auditor) and frontend-agent read this exact flat-file path.
contracts/tsconfig.json — REQUIRED when language is TypeScript. Must extend the workspace base tsconfig if one exists (e.g. ../../tsconfig.base.json). Without this, tsc --noEmit runs with no project config and silently prints its help text instead of typechecking, which gets discovered late. (Skip this file for Python/Go/other-language projects.)
contracts/openapi.yaml — API contract (OpenAPI 3.1 spec)
contracts/data-layer.yaml — data layer interface (use references/data-layer-template.yaml)
contracts/asyncapi.yaml — event-driven interface (if applicable)
contracts/README.md — human-readable summary including:
contracts/CHANGELOG.md — the single system of record for contract version history. Every version bump's history entry goes here. A code/contract file gets only the one-line // — vX.Y.Z marker plus (optionally) a pointer to this file; it never carries an inline multi-line history block. See "Contract Versioning" above.
The schemas/ directory is for standalone JSON Schema files when the project uses schema-based validation outside the API context (e.g., config file validation, message queue payloads).
When the API uses camelCase (OpenAPI/TypeScript) but the backend uses snake_case (Python), document the transform explicitly in contracts/README.md. The Pydantic template includes alias_generator=to_camel for this — both sides must agree on the wire format.
references/asyncapi-template.yaml (opens in a new tab)references/data-layer-template.yaml (opens in a new tab)references/json-schema-template.json (opens in a new tab)references/openapi-template.yaml (opens in a new tab)references/pydantic-template.py (opens in a new tab)references/typescript-template.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ivy00johns/skill-madness --plugin skill-madness87 skills in this plugin
/accessibility-auditAudit and fix web accessibility against WCAG 2.2 AA, Section 508 and the ADA: axe scan, keyboard, screen-reader and zoom checks, plain-language content and PDFs, source fixes, and an honest conformance report (ACR/VPAT draft). Use for any a11y review, fix or compliance question. Trigger on "accessibility audit", "is this ADA compliant", "Section 508", "WCAG", "VPAT", "a11y"./andonRun work through a live Andon board (the kanban that dispatches cards to Claude Code, Codex and Gemini on your machines): push a plan's cards with the skills each run must load, read the board, answer what needs you, administer a machine, and refresh this skill when Andon changes. Trigger on "/andon", "put this plan on andon", "what needs me on andon", "why isn't my card running".
/Other plugins' skills for the same job