PA

parallel-agent-contracts

Maintains type consistency and prevents duplication when using multiple agents.

Install

mkdir -p .claude/skills/parallel-agent-contracts && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4204" && unzip -o skill.zip -d .claude/skills/parallel-agent-contracts && rm skill.zip

Installs to .claude/skills/parallel-agent-contracts

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Parallel Agent Type Contracts
29 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Enforce canonical type usage across parallel agents
  • Validate code against TypeScript standards
  • Prevent duplication of interfaces and types
  • Automate verification of type integrity

How it works

It mandates a grep-based check to prevent duplicate type definitions and uses the TypeScript compiler to verify that all type contracts are satisfied before completion.

Inputs & outputs

You give it
Task description and target codebase
You get back
Verified code implementation with canonical type imports

When to use parallel-agent-contracts

  • Check for existing types before creating new ones
  • Verify code implementation against TypeScript standards
  • Ensure parallel agents share a canonical type map

About this skill

Parallel Agent Type Contracts

When launching parallel agents for code implementation, prevent type duplication.

Required in Every Agent Prompt

1. Verification Command (MANDATORY)

## 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

## 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:

TypeOwner FileImport From
NormalizedToolsrc/sdk/agent.ts'./agent'
ToolCallsrc/sdk/agent.ts'./agent'
ToolResultsrc/sdk/agent.ts'./agent'
ToolDefinitionsrc/sdk/agent.ts'./agent'
Messagesrc/sdk/types.ts'./types'
ContentBlocksrc/sdk/types.ts'./types'
TokenUsagesrc/sdk/types.ts'./types'
ProviderAdaptersrc/sdk/providers/index.ts'./providers'
RiggClientsrc/sdk/client.ts'./client'

Prompt Template

When spawning implementation agents:

# 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

When not to use it

  • Projects without TypeScript configuration
  • Single-agent workflows where type collisions are not a risk

Prerequisites

TypeScript environment

Limitations

  • Requires manual inclusion of the canonical type map in agent prompts
  • Limited to the scope of the provided canonical type map

How it compares

Unlike manual verification, this enforces a standardized pre-completion check that prevents agents from introducing conflicting type definitions.

Compared to similar skills

parallel-agent-contracts side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
parallel-agent-contracts (this skill)17moNo flagsIntermediate
typescript-write302moReviewAdvanced
codex-skill125moReviewAdvanced
typescript04moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry