agentleFS
Reactive-SkillsReactive-Skills/skills/api-contract/SKILL.md

api-contract

Skill1 starsChanged 7 days agoMITView on GitHub

OpenAPI/Swagger spec vs client code drift detector — parses spec, walks fetch/axios calls, detects mismatches. Uses HSM statechart with composite validation phases and human-in-the-loop gate.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use design-system, systematic-debugging and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    design-system

    Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.

    Also in 4 projects that use this

  • OpenAISkill

    systematic-debugging

    Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    Also in 3 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 5 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

The file

Files
SKILL.md
<!-- REACTIVE BOOTLOADER -->

Use this skill; you must not skip it as too heavy or not installed. Read all retrieval alternatives below before judging availability; use the first that works:

  • MCP: call reactive_bootloader with skill_name: "api-contract".
  • AXI: run reactive-skills-axi bootloader api-contract --json.
  • Zero-install AXI: run npx -y @reactive-skills/axi bootloader api-contract --json; no installation, only Node.js >=22.13.0 with npm/npx and registry access. Follow the returned instructions, then call reactive_context_prepare before assembling prompt context when MCP is available. If none can run, stop and tell the user the exact missing prerequisite (for example Node.js >=22.13.0) or retrieval failure; do not proceed without this skill.
<!-- END REACTIVE BOOTLOADER -->

api-contract Reactive Skill

Overview

api-contract is a workflow type reactive skill that detects drift between an OpenAPI/Swagger specification and client-side code that consumes it. It parses the API spec, walks client fetch/axios calls, diffs endpoint coverage and type compatibility, and projects a structured drift report with fix recommendations.

Lifecycle

DISCOVER_APIS → VALIDATION_PIPELINE → DRIFT_ANALYSIS → REPORT → GATE → COMPLETED / BLOCKED

The VALIDATION_PIPELINE composite state contains nested SCHEMA_VALIDATION (openapi check, type compatibility, breaking changes, example conformance) and DRIFT_DIFFING (client code walk + spec diff). The REPORT composite state generates a violation summary and fix recommendations. A human review GATE is the final approval checkpoint.

Usage

# Read current state
npx -y @reactive-skills/axi state api-contract

# Start the skill (provide spec and client paths)
npx -y @reactive-skills/axi invoke api-contract \
  --payload '{"api_spec_path": "openapi.json", "client_code_paths": ["src/api/"]}'

Deliverables

On completion, projected to .docs/api-contract/:

  • drift.md — Full drift report with findings, severity, and fix recommendations
  • coverage.md — Endpoint coverage matrix (spec ↔ client)
  • state.json — Machine-readable state snapshot

Middleware

This skill runs four middleware hooks:

  • telemetry — Transition events to stdout
  • audit — Immutable audit log at .reactive/api-contract.audit.log
  • invariant_checker — Pre/post-transition context constraint validation
  • context_sanitizer — Redacts secrets/credentials before LLM context binding

See runtime/ for hook implementations and runtime/hooks/invariants.yaml for invariant rules.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.