parklan2046/clawproject/api-contract

Claude Code and agent skill by parklan2046/clawproject

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate or validate OpenAPI and AsyncAPI specs from code or requirements with consistent naming, errors, and pagination

Install

npx vskill@latest install parklan2046/clawproject/api-contract

SKILL.md

The same SKILL.md was published earlier as weisser-dev/awesome-opencode/api-contract.

What I do

  • Generate OpenAPI 3.x or AsyncAPI specs from code or requirements
  • Validate existing API specs for completeness and consistency
  • Enforce consistent naming conventions across endpoints
  • Standardize error response formats and HTTP status codes
  • Define pagination, filtering, and sorting patterns

When to use me

Use this skill when you need to:

  • Design a new REST or async API from requirements
  • Generate an OpenAPI spec from existing route handlers
  • Validate an existing spec for consistency and completeness
  • Standardize error responses across an API
  • Add pagination to collection endpoints

Process

  1. Discover: Analyze existing API code or requirements
  • Scan route definitions, controllers, and handler files
  • Identify existing OpenAPI/Swagger specs if present
  • Note current naming conventions and response patterns
  1. Design resource model: Map domain entities to API resources
  • Use plural nouns for collection endpoints (/users, /orders)
  • Use nested routes for relationships (/users/{id}/orders)
  • Avoid verbs in URLs; use HTTP methods for actions
  1. Define endpoints: Specify each operation
  • HTTP method and path
  • Request parameters (path, query, header, body)
  • Request body schema with required fields
  • Response schemas for each status code
  • Authentication requirements
  1. Standardize patterns: Apply consistent conventions
  1. Generate spec: Produce the OpenAPI/AsyncAPI document
  1. Validate: Check spec for completeness and correctness

Naming Conventions

ElementConventionExample
Pathskebab-case, plural nouns/api/v1/user-accounts
Query paramscamelCase?pageSize=20&sortBy=createdAt
Request/response fieldscamelCase{ "firstName": "Jane" }
Schema namesPascalCaseUserAccount, OrderItem
Enum valuesUPPER_SNAKE_CASE"ORDER_PENDING"

Standard Error Format

json
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human-readable description",
"details": [
{
"field": "email",
"message": "Must be a valid email address",
"code": "INVALID_FORMAT"
}
],
"requestId": "req_abc123"
}
}
HTTP Status Code Usage
CodeUsage
200Successful GET, PUT, PATCH
201Successful POST that creates a resource
204Successful DELETE with no response body
400Validation error or malformed request
401Missing or invalid authentication
403Authenticated but insufficient permissions
404Resource not found
409Conflict (duplicate, state violation)
422Semantically invalid request
429Rate limit exceeded
500Unexpected server error

Pagination Pattern

yaml
# Query parameters
parameters:
- name: page
in: query
schema:
type: integer
minimum: 1
default: 1
- name: pageSize
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 20
# Response envelope
PagedResponse:
type: object
properties:
data:
type: array
items: { $ref: '#/components/schemas/Item' }
pagination:
type: object
properties:
page: { type: integer }
pageSize: { type: integer }
totalItems: { type: integer }
totalPages: { type: integer }

Validation Checklist

  • [ ] All endpoints have descriptions
  • [ ] All request parameters have types and constraints
  • [ ] All responses include schema definitions
  • [ ] Error responses follow the standard format
  • [ ] Collection endpoints support pagination
  • [ ] Authentication requirements specified per endpoint
  • [ ] Examples provided for request and response bodies
  • [ ] No breaking changes from previous spec version (if updating)

Rules

  • Always version the API in the URL path (/api/v1/...)
  • Use JSON as the default content type
  • Include requestId in all error responses for traceability
  • Define rate limiting headers (X-RateLimit-Limit, X-RateLimit-Remaining)
  • Document all enum values explicitly in the schema
  • Prefer $ref for reusable schemas over inline definitions

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/parklan2046/clawproject/api-contract/badge)](https://verified-skill.com/skills/parklan2046/clawproject/api-contract)

Something wrong with this skill or its page? Tell us.