roofadvisor/dev-kit/contract-first
Claude Code and agent skill by roofadvisor/dev-kit
- community
Checking that the SKILL.md file is still in the repository.
Define or change a cross-repo contract — API endpoint, webhook event, or shared schema — in the contract repo first, then propagate generated types to consumers. Use whenever a payload, event, or endpoint shape is added or changed in a multi-repo project, or when the user says "add an event", "change the payload", "new endpoint between services".
Install
npx vskill@latest install roofadvisor/dev-kit/contract-firstSKILL.md
The same SKILL.md was published earlier as roofadvisor/dev-kit/contract-first.
Contract First
The order is not negotiable: spec → generate → pin → implement. Implementing first and back-filling the spec is how five services end up disagreeing.
Adding or changing a shape
- Write the spec in the contract repo — JSON Schema for events, OpenAPI for endpoints.
Every event carries: event_id (UUIDv7), occurred_at, event_type, version.
- Classify the change:
- Adding an optional field → minor
- Adding a required field, removing a field, retyping a field, renaming an event → major, and every consumer must be listed and checked
- Generate bindings:
`` npx openapi-typescript openapi/<svc>.yaml -o codegen/ts/<svc>.d.ts uvx datamodel-code-generator --input schemas/ --input-file-type jsonschema \ --output-model-type pydantic_v2.BaseModel --output codegen/py/models.py ``
- Version and publish the contract package. Commit generated output as generated.
- Pin in each consumer — its own commit, its own PR, per repo.
- Implement against the generated type. Never re-declare the shape locally.
- Run `contract-drift-checker` in every affected repo before merging.
Signature convention for webhooks
- Header:
X-{ORG}-Signature: sha256={hmac}, plusX-{ORG}-SenderandX-{ORG}-Timestamp - Sign
{timestamp}.{raw_body}; reject over 5 minutes old - Pick one org-level prefix at setup and use it in every repo. Do not name the header after one sender — every service both sends and receives eventually
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
- SKILL.md in the repositoryCheckingskills/contract-first/SKILL.md
Popularity
- 7-day trend score
- 5
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
[](https://verified-skill.com/skills/roofadvisor/dev-kit/contract-first)