Design and manage API contracts before implementation using OpenAPI and AsyncAPI specifications for contract-first development
View on GitHubmelodic-software/claude-code-plugins
spec-driven-development
plugins/spec-driven-development/skills/contract-first-design/SKILL.md
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/melodic-software/claude-code-plugins/blob/main/plugins/spec-driven-development/skills/contract-first-design/SKILL.md -a claude-code --skill contract-first-designInstallation paths:
.claude/skills/contract-first-design/# Contract-First Design Skill
## When to Use This Skill
Use this skill when:
- **Contract First Design tasks** - Working on design and manage api contracts before implementation using openapi and asyncapi specifications for contract-first development
- **Planning or design** - Need guidance on Contract First Design approaches
- **Best practices** - Want to follow established patterns and standards
## Overview
Apply contract-first development methodology for APIs, ensuring specifications drive implementation.
## Contract-First Methodology
### Core Principles
```yaml
contract_first_principles:
design_before_code:
description: "API specification comes before implementation"
benefits:
- "Early feedback from consumers"
- "Parallel development enabled"
- "Clear contract for testing"
- "Documentation from day one"
specification_as_source_of_truth:
description: "Spec is authoritative, code conforms to it"
enforcement:
- "Generate code from spec"
- "Validate implementation against spec"
- "CI/CD gates on spec compliance"
consumer_centric:
description: "Design for consumer needs, not provider convenience"
practices:
- "Involve consumers in design reviews"
- "Consumer-driven contract testing"
- "Gather real-world usage patterns"
evolution_over_revolution:
description: "Evolve contracts without breaking consumers"
practices:
- "Semantic versioning"
- "Backward compatibility by default"
- "Deprecation before removal"
```
### Development Workflow
```yaml
contract_first_workflow:
phases:
1_design:
activities:
- "Identify API consumers and use cases"
- "Define resources and operations"
- "Draft specification (OpenAPI/AsyncAPI)"
- "Review with stakeholders"
artifacts:
- "Draft API specification"
- "Use case documentation"
gate: "Specification approved by consumers"
2_validate: