From orchestrate
Manage project contract registry. Subcommands: init (scan for shared types), list (show contracts), add (register new), sync (update producers/consumers). Used by /orchestrate for faster agent assignment.
How this skill is triggered — by the user, by Claude, or both
Slash command
/orchestrate:contractsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage shared type contracts for multi-agent orchestration.
Manage shared type contracts for multi-agent orchestration.
| Command | Purpose |
|---|---|
/contracts init | Scan project, find shared types, create registry |
/contracts list | Display contracts with producers/consumers |
/contracts add <name> | Add new contract to registry |
/contracts sync | Re-scan imports, update producer/consumer mappings |
/contracts initCreates .claude/contracts.json by scanning project.
Scan type directories:
src/types/, src/dto/, src/contracts/, types/
Find shared types (imported by 2+ files):
# For each interface/type, count importers
Grep tool: pattern="import.*{.*TypeName.*}"
If importers >= 2 → shared contract
Trace producers/consumers:
Generate registry:
// .claude/contracts.json
{
"version": "1.0.0",
"updated": "2025-01-13",
"contracts": {
"UserDTO": {
"file": "src/types/user.ts",
"line": "3-15",
"producers": ["src/services/user.ts"],
"consumers": ["src/components/UserCard.tsx"]
}
}
}
Report: "Found X shared contracts in Y files"
/contracts listDisplays current registry in table format.
Contracts Registry (.claude/contracts.json)
Updated: 2025-01-13
┌──────────────────┬────────────────────┬──────────────────┬──────────────────┐
│ Contract │ File │ Producers │ Consumers │
├──────────────────┼────────────────────┼──────────────────┼──────────────────┤
│ UserDTO │ src/types/user.ts │ services/user.ts │ UserCard.tsx │
│ CreateUserReq │ src/types/user.ts │ api/users.ts │ UserForm.tsx │
│ ProductDTO │ src/types/product │ services/product │ ProductList.tsx │
└──────────────────┴────────────────────┴──────────────────┴──────────────────┘
3 contracts registered
No registry found. Run /contracts init to create one.
/contracts add <name>Add a new contract to registry manually.
/contracts add UserDTO
Prompt for file location:
Where is UserDTO defined? (e.g., src/types/user.ts)
Find line numbers:
Grep: pattern="interface UserDTO|type UserDTO"
Scan for imports:
Grep: pattern="import.*UserDTO"
Classify producers/consumers:
return.*UserDTO or Promise<UserDTO> → producerAdd to registry
Report: "Added UserDTO with 2 producers, 3 consumers"
/contracts syncRe-scan imports and update producer/consumer mappings.
/orchestrateRead current registry
For each contract:
Grep: pattern="import.*{.*ContractName.*}"
Update producers/consumers
Report changes:
Sync complete:
- UserDTO: +1 consumer (NewComponent.tsx)
- ProductDTO: -1 producer (deleted OldService.ts)
- 2 contracts unchanged
{
"version": "1.0.0",
"updated": "YYYY-MM-DD",
"contracts": {
"<ContractName>": {
"file": "path/to/definition.ts",
"line": "start-end",
"producers": ["path/to/producer1.ts", "path/to/producer2.ts"],
"consumers": ["path/to/consumer1.tsx", "path/to/consumer2.tsx"]
}
}
}
When /orchestrate runs:
.claude/contracts.jsonnpx claudepluginhub ankurjain1121/dev-workflow-skills --plugin orchestrateManages multi-agent orchestration using contracts, AgentDB briefing, 4 fault tolerance layers (retry, fallback, classification, checkpointing), and context transfer protocols. Use for coordinating parallel agents or spawning sub-agents.
Generates OpenAPI 3.1 specs from use case interaction sequences with traceability to source steps and schema validation. For API contract design from realized use cases.
Designs and manages API contracts before implementation using OpenAPI and AsyncAPI specs for contract-first development workflows and best practices.