parallel-agent-contracts — Claude Code skill: setup and features
parallel-agent-contracts enforces type ownership rules across parallel agents in TypeScript projects, requiring grep checks and tsc verification before any subtask completes.
MIT ★ 3,951 updated 2026-01-26
npx skills add parcadei/Continuous-Claude-v3 --skill parallel-agent-contracts -a claude-codeWhat parallel-agent-contracts does
When multiple agents write code in parallel, they frequently redefine identical interfaces in different files. This skill embeds strict type contracts directly into subagent prompt templates to prevent collisions in TypeScript repositories.
Every spawned subagent receives three constraints. First, it must execute grep -r across src/ to find existing types before declaring new ones. Second, it consults a canonical type map that assigns ownership for core types like Message, ToolCall, or TokenUsage to dedicated files in src/sdk/. Third, the agent runs npx tsc --noEmit 2>&1 | head -20 and must resolve every error before reporting completion.
The skill has user-invocable: false in its frontmatter. It operates in the background as an orchestration rule rather than an interactive slash command. Verification fails immediately if the target project lacks a working TypeScript setup.
What it helps with
- Prevent duplicate interface definitions during parallel agent execution
- Force subagents to verify code with
npx tscbefore finishing a task - Establish explicit file ownership for core SDK types
Example prompts for the agent
- Launch parallel agents to implement new providers using parallel-agent-contracts rules
- Generate a subagent prompt enforcing the canonical type map and tsc verification
How to install parallel-agent-contracts
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill parallel-agent-contracts -a claude-code2Manually: put the files in place
~/.claude/skills/parallel-agent-contracts/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/parallel-agent-contracts/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill parallel-agent-contracts -a codex2Manually: put the files in place
.agents/skills/parallel-agent-contracts/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill parallel-agent-contracts -a cursor2Manually: put the files in place
.cursor/skills/parallel-agent-contracts/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install parcadei/Continuous-Claude-v3 .claude/skills/parallel-agent-contracts2Manually: put the files in place
.github/skills/parallel-agent-contracts/SKILL.md1Skills CLI (Vercel)
npx skills add parcadei/Continuous-Claude-v3 --skill parallel-agent-contracts -a gemini-cli2Platform CLI
gemini skills install https://github.com/parcadei/Continuous-Claude-v3 --path .claude/skills/parallel-agent-contractsManually: put the files in place
.devin/skills/parallel-agent-contracts/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about parallel-agent-contracts
How to install parallel-agent-contracts in Claude Code?
Run npx skills add parcadei/Continuous-Claude-v3 --skill parallel-agent-contracts -a claude-code. Alternatively, copy the file to ~/.claude/skills/parallel-agent-contracts/SKILL.md.
What does parallel-agent-contracts do?
It injects type ownership rules, grep checks, and a mandatory npx tsc --noEmit verification step into prompts used when launching parallel coding agents.
Can this skill be triggered directly by the user?
No, the skill sets user-invocable: false, which means it functions as an internal prompt template during task delegation rather than a direct slash command.
Source text
SKILL.md · MIT
--- name: parallel-agent-contracts description: Parallel Agent Type Contracts user-invocable: false --- # Parallel Agent Type Contracts When launching parallel agents for code implementation, prevent type duplication. ## Required in Every Agent Prompt ### 1. Verification Command (MANDATORY) ```markdown ## Before Marking Complete Run verification: \`\`\`bash npx tsc --noEmit 2>&1 | head -20 \`\`\` If ANY type errors exist, fix them before completing. ``` ### 2. Grep-Before-Create ```markdown ## Before Creating Any Type/Interface First check if it exists: \`\`\`bash grep -r "interface YourTypeName\|type YourTypeName" src/ \`\`\` If found, import it. NEVER duplicate existing types. ``` ### 3. Canonical Type Map Include relevant entries from this map in agent prompts: | Type | Owner File | Import From | |------|-----------|-------------| | `NormalizedTool` | `src/sdk/agent.ts` | `'./agent'` | | `ToolCall` | `src/sdk/agent.ts` | `'./agent'` | | `ToolResult` | `src/sdk/agent.ts` | `'./agent'` | | `ToolDefinition` | `src/sdk/agent.ts` | `'./agent'` | | `Message` | `src/sdk/types.ts` | `'./types'` | | `ContentBlock` | `src/sdk/types.ts` | `'./types'` | | `TokenUsage` | `src/sdk/types.ts` | `'./types'` | | `ProviderAdapter` | `src/sdk/providers/index.ts` | `'./providers'` | | `RiggClient` | `src/sdk/client.ts` | `'./client'` | ## Prompt Template When spawning implementation agents: ```markdown # Task: [Description] ## Type Ownership (DO NOT recreate) - [List relevant types from canonical map] ## Before Creating New Types Run: `grep -r "interface TypeName" src/` - if exists, import it. ## Before Marking Complete Run: `npx tsc --noEmit 2>&1 | head -20` Fix all type errors before completing. ## Your Implementation [Actual task description] ``` ## Why This Works 1. **Type checker is the contract** - tsc catches conflicts automatically 2. **Grep is fast** - 1 second to check if type exists 3. **Explicit ownership** - No ambiguity about where types live 4. **Fail fast** - Agent can't claim "done" with broken types
© parcadei · MIT · parcadei/Continuous-Claude-v3