JPeetz/agent-skills / skills/api-backend/api-design-first
api-design-first
VerifiedUse this skill when designing an API or defining an API contract before writing code. Generates OpenAPI 3.1 specifications, enforces REST design best practices, validates endpoints, and handles versioning, pagination, error formatting, authentication patterns, rate limiting, and idempotency. Activates when users say "design an API", "create OpenAPI spec", "REST API design", "API contract", "Swagger/OpenAPI doc", "API versioning", "rate limiting", or "API security". Covers REST, GraphQL schema design, and gRPC proto generation with cross-protocol consistency.
| File | Kind | Size |
|---|---|---|
| CHANGELOG.md | markdown | 2.0 KB |
| LICENSE | other | 12 B |
| SKILL.md | skill md | 11.9 KB |
| evals/evals.json | config | 2.3 KB |
| scripts/generate-mock.shexecutable | script | 622 B |
| scripts/validate-spec.shexecutable | script | 816 B |
scripts/validate-spec.sh
View on GitHub#!/usr/bin/env bash
# api-design-first — validate OpenAPI spec with spectral linting
# Usage: ./validate-spec.sh <spec-file>
# Dependencies: npm install -g @stoplight/spectral-cli
set -euo pipefail
SPEC="${1:-openapi.yaml}"
if [ ! -f "$SPEC" ]; then
echo "❌ Spec file not found: $SPEC"
exit 1
fi
echo "🔍 Validating OpenAPI spec: $SPEC"
if command -v spectral &>/dev/null; then
spectral lint "$SPEC"
elif command -v npx &>/dev/null; then
npx @stoplight/spectral-cli lint "$SPEC"
else
echo "⚠️ spectral not installed. Install with: npm install -g @stoplight/spectral-cli"
echo " Performing basic YAML validation only..."
if command -v python3 &>/dev/null; then
python3 -c "import yaml; yaml.safe_load(open('$SPEC'))" && echo "✅ Valid YAML"
fi
fi
echo "✅ Validation complete"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |