api-contract
Generate OpenAPI specs from code, validate API contracts, and check for breaking changes between versions.
Skill by PatriotAgenticLLC
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/patriotagenticllc-api-contract
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api-contract
What's inside
- Skill name
api-contract- Description
- Generate OpenAPI specs from code, validate API contracts, and check for breaking changes between versions.
- License
- MIT
- Instructions
- 225 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (2)
- README.md
- SKILL.md
SKILL.md (first lines)
# API Contract Manager
Generate OpenAPI specifications from code, validate API responses against contracts, and detect breaking changes.
## Supported Frameworks
Auto-detects the API framework in the current project:
| Framework | API Style | Route Discovery |
|-----------|-----------|-----------------|
| FastAPI | REST | Auto-generated OpenAPI at `/docs` and `/openapi.json` |
| Flask | REST | Blueprint / app route decorators |
| Express | REST | Manual router/app route definitions |
## Arguments
Parse `$ARGUMENTS`:
- **`--endpoints`:** List all API endpoints in the current project (default)
- **`--generate`:** Generate or update an OpenAPI spec from code
- **`--validate`:** Validate API responses against the spec
- **`--breaking`:** Check for breaking changes between current code and last tagged version
- **`--diff`:** Show API changes since last commit/tag
## Process
### Mode 1: Endpoint Discovery (`--endpoints`)
Scan the current project for all API endpoints:
**FastAPI:**
```bash
# Find all router files
grep -rn "@router\.\(get\|post\|put\|delete\|patch\)" --include="*.py" <path> | sed 's/.*@router\.//' | sed 's/(.*//' | sort
# Also check app-level routes
grep -rn "@app\.\(get\|post\|put\|delete\|patch\)" --include="*.py" <path> | head -20
# Find router registrations
grep -rn "include_router\|add_api_route" --include="*.py" <path> | head -20
```
**Flask:**
```bash
# Blueprint routes
grep -rn "@.*\.route\|@.*\.add_url_rule" --include="*.py" <path> | head -30
# Also check app-level
grep -rn "@app\.route" --include="*.py" <path> | head -20
```
**Express:**
```bash
# Router definitions
grep -rn "router\.\(get\|post\|put\|delete\|patch\)\|app\.\(get\|post\|put\|delete\|patch\)" --include="*.ts" --include="*.js" <path> | grep -v node_modules | head -30
```
Output:
```
## API Endpoints: <project-name>
| Method | Path | Handler | File |
|--------|------|---------|------|
| GET | /health | health_check | api/routers/health.py:12 |
| GET | /api/orders | list_orders | api/routers/orders.py:28 |
| POST | /api/orders | create_order | api/routers/orders.py:45 |
| GET | /api/orders/{id} | get_order | api/routers/orders.py:62 |
...
Total: X endpoints (Y GET, Z POST, W PUT, V DELETE)
```
### Mode 2: OpenAPI Spec Generation (`--generate`)
**FastAPI projects** (auto-generated):
FastAPI auto-generates OpenAPI at runtime. Extract it:
```bash
# If the app is running locally
curl -s http://localhost:8000/openapi.json 2>/dev/null | python3 -m json.tool > openapi.json
# If not running, check for existing spec
test -f <path>/openapi.json && echo "Spec exists" || echo "No spec file"
```
**Flask/Express projects** (manual generation):
Scan route definitions and generate a spec skeleton:
1. Collect all endpoints from Mode 1
2. For each endpoint, check for:
- Request body schemas (Pydantic models, Zod schemas, JSON validation)
- Response types (return type hints, response models)
- Path parameters
- Query parameters
- Authentication requirements (decorators, middleware)
3. Generate an OpenAPI 3.0 YAML skeleton:
```yaml
openapi: "3.0.3"
info:
title: <project-name> API
version: <from-manifest>
paths:
/health:
get:
summary: Health check
responses:
"200":
description: Service healthy
/api/orders:
get:
summary: List orders
parameters: []
responses:
"200":
description: Order list
```
Write to `openapi.yaml` in the project root.
### Mode 3: Contract Validation (`--validate`)
If an OpenAPI spec exists, validate the live API against it:From PatriotAgenticLLC/better_claude_skillz, MIT.
More from PatriotAgenticLLC/better_claude_skillz
- 0.511score
e2e
PatriotAgenticLLC
Generate and run end-to-end tests with Playwright.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
a11y-check
PatriotAgenticLLC
Run WCAG accessibility audits on frontend projects.
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
code-review-ecc
PatriotAgenticLLC
Comprehensive security and quality review of uncommitted changes
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
deps-audit
PatriotAgenticLLC
Scan one or more projects for dependency vulnerabilities, outdated packages, and cross-project version conflicts.
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
eval
PatriotAgenticLLC
Manage eval-driven development workflow with define, check, report, and list operations
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
build-fix
PatriotAgenticLLC
Incrementally fix TypeScript and build errors one at a time with verification.
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
code-review
PatriotAgenticLLC
Technical code review for quality and bugs that runs pre-commit
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
optimize-context
PatriotAgenticLLC
Scan project, then generate or reconcile .primeignore patterns for smarter /prime loading
SkillCFreshness: C★ 3Claude Code +9 - 0.507score
config-audit
PatriotAgenticLLC
Evaluate the full Claude Code configuration stack for duplication, security, staleness, consistency, coverage gaps, optimization, and innovation opportunities.
SkillCFreshness: C★ 3Claude Code +9 - 0.505score
execution-report
PatriotAgenticLLC
Document what was implemented vs planned
SkillCFreshness: C★ 3Claude Code +9 - 0.505score
evolve
PatriotAgenticLLC
Cluster related instincts into skills, commands, or agents
SkillCFreshness: C★ 3Claude Code +9 - 0.505score
checkpoint
PatriotAgenticLLC
Create or verify a checkpoint in your workflow
SkillCFreshness: C★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 1, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from PatriotAgenticLLC
- 0.511score
e2e
PatriotAgenticLLC
Generate and run end-to-end tests with Playwright.
SkillCFreshness: C★ 3Claude Code +9 - 0.511score
a11y-check
PatriotAgenticLLC
Run WCAG accessibility audits on frontend projects.
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
code-review
PatriotAgenticLLC
Technical code review for quality and bugs that runs pre-commit
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
code-review-ecc
PatriotAgenticLLC
Comprehensive security and quality review of uncommitted changes
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
deps-audit
PatriotAgenticLLC
Scan one or more projects for dependency vulnerabilities, outdated packages, and cross-project version conflicts.
SkillCFreshness: C★ 3Claude Code +9 - 0.508score
optimize-context
PatriotAgenticLLC
Scan project, then generate or reconcile .primeignore patterns for smarter /prime loading
SkillCFreshness: C★ 3Claude Code +9
Cite this page
api-contract skill. Agent Mart. https://agentmart.dev/skills/patriotagenticllc-api-contract (last updated 2026-10-24)