packages/vat-example-cat-agents/resources/skills/SKILL.md
Comprehensive orchestration guide for Claude Code using the vat-example-cat-agents toolkit
npx skillsauth add jdutton/vibe-agent-toolkit vat-example-cat-agentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive orchestration guide for Claude Code using the vat-example-cat-agents toolkit.
Key distinction:
This skill references agent resources via markdown links but doesn't duplicate LLM prompts.
The vat-example-cat-agents package provides 8 agents across 4 archetypes:
Trigger this skill when:
Use when user has a straightforward request that maps to one agent.
Example workflows:
Use when output of one agent feeds into another.
Example workflows:
Use when generator produces content that needs validation with retry logic.
Example workflows:
Orchestration tip: Generator agents have NO knowledge of validation rules. This is intentional - forces iteration and tests feedback loops.
Use when decision requires human judgment.
Example workflows:
When: User wants help finding the right cat breed.
Agent: breed-advisor
Orchestration strategy:
Phase 1 - Gathering (see Conversation Strategy)
factorsCollected >= 4 && musicPreference != nullPhase 2 - Recommendation
Phase 3 - Selection
Critical factor: Music preference is the PRIMARY compatibility factor. Ask early, use as conversation anchor. See Music Preference Insight for mappings.
Reference implementation: See cat-breed-selection.md for detailed breed selection orchestration.
When: User provides a cat photo and wants analysis, name, or haiku.
Agents: photo-analyzer → name-generator OR haiku-generator
Orchestration strategy:
Step 1: Analyze Photo
- Input: Image path/URL
- Agent: photo-analyzer
- Output: CatCharacteristics
- Note: Supports mock mode (reads EXIF) for testing
Step 2: Generate Content
- Input: CatCharacteristics from Step 1
- Agent: name-generator OR haiku-generator
- Output: NameSuggestion OR Haiku
Optional Step 3: Validate
- Input: Generated content + original characteristics
- Agent: name-validator OR haiku-validator (pure functions)
- Output: Validation result
- If invalid: Retry Step 2 with feedback
Mockable behavior: photo-analyzer reads EXIF metadata in mock mode. For production, set mockable: false to use real vision API.
When: User describes a cat in text (no photo).
Agents: description-parser → name-generator OR haiku-generator
Orchestration strategy:
Step 1: Parse Description
- Input: Text description
- Agent: description-parser
- Output: CatCharacteristics (same schema as photo-analyzer!)
Step 2-3: Same as Workflow B
- Multi-modal convergence: photo and text produce same schema
- Downstream agents (name-gen, haiku-gen) work with either
Key insight: Photo and text paths converge at CatCharacteristics schema. This enables multi-modal workflows without agent changes.
When: Generator produces content that must pass validation rules.
Pattern: Generator (LLM) + Validator (pure function) + Retry logic
Implementation:
// Pseudo-code for orchestration
let attempts = 0;
const maxAttempts = 3;
while (attempts < maxAttempts) {
// Generate content
const suggestion = await generator(characteristics);
// Validate (pure function, instant)
const validation = validator(suggestion, characteristics);
if (validation.status === 'valid') {
return suggestion; // Success!
}
// Retry with feedback
attempts++;
// Optional: Adjust approach based on validation.reason
}
throw new Error('Could not generate valid content after 3 attempts');
Why this pattern works:
Agents using this pattern:
When: Decision requires human judgment (compliance, taste, ethics).
Agent: human-approval
Orchestration strategy:
Step 1: Prepare Request
- Gather all necessary context
- Format clearly for human reviewer
- Include relevant data (characteristics, generated content, reasoning)
Step 2: Emit Approval Request
- Agent: human-approval
- Input: Request payload
- Behavior: Blocks waiting for response
- Timeout: Configurable (default: 60s)
Step 3: Handle Response
- Approved: Continue workflow
- Rejected: Handle gracefully (retry, inform user, etc.)
- Timeout: Fall back to safe default or escalate
Mockable behavior: Set mockable: true to auto-approve without human (useful for testing).
Real-world uses:
Pure function tools (validators) can be exposed via CLI for direct invocation.
# Pass JSON input, get JSON/YAML output
echo '{"name": "Mr. Whiskers", "characteristics": {...}}' | vat agents validate-name
# Output format (using 2>&1):
# [stdout - complete output]
# ---
# [stderr - error messages]
--- when using 2>&1)[Start]
↓
Read stdin (JSON input)
↓
Parse and validate input schema
↓
Execute pure function
↓
Flush stdout with complete result
↓
Print "---" separator
↓
Flush stderr with any error messages
↓
Exit with appropriate code
vat agents validate-namevat agents validate-haikuOrchestration:
Monitoring:
Decision Making:
Pure Functions:
LLM Analyzers:
Conversational Assistants:
Event Integrators:
Key insight: Agents are specialized, focused on their domain. Claude Code provides the glue, orchestration, and workflow logic.
✅ System prompts and LLM instructions ✅ Domain knowledge (breed database, syllable counting rules, kigo lists) ✅ Extraction formats (JSON schemas, output templates) ✅ Examples for few-shot learning ✅ Natural language mappings ✅ Validation rules and constraints
Location: resources/agents/*.md
✅ When to trigger agents (user intent signals) ✅ How to chain agents (workflow patterns) ✅ What to monitor (readiness criteria, retry limits) ✅ Debugging guidance (common issues, pitfalls) ✅ Meta-strategy (why photo first, when to retry) ✅ CLI exposure patterns
Location: resources/skills/*.md (this file)
⚠️ Workflow structure (skill explains orchestration, agent implements) ⚠️ Phase transitions (skill monitors, agent executes) ⚠️ Validation criteria (skill manages retries, agent defines rules)
Resolution: Keep agent resources authoritative. Skills REFERENCE via links, don't duplicate.
Each archetype has different behavior:
Pure function → Call directly, no retry needed
LLM analyzer → Call once, parse result
Conversational → Multi-turn loop with state
Event integrator → Emit, wait, handle timeout
Validators exist for a reason. Don't bypass them or assume LLM output is always valid.
Generate → Validate → If invalid, retry with feedback
This pattern tests real-world orchestration where first attempts often fail.
Mock mode (EXIF metadata) is fast and free. Production mode (real APIs) is slow and expensive. Be explicit about which mode you're using.
// Development/testing
const result = await analyzePhoto(path, { mockable: true });
// Production
const result = await analyzePhoto(path, { mockable: false });
One question at a time. Give users space to think and respond naturally.
Bad: "Tell me your music, living space, activity level, grooming, family, and allergies"
Good: "What's your favorite type of music?" → [response] → "Great! Tell me about your living space..."
Symptoms: Vision API errors, unexpected characteristics
Debug steps:
{ mockable: true }Symptoms: Name generator can't produce valid names after 3+ attempts
Debug steps:
Common cause: ~60-70% rejection rate is EXPECTED. This forces iteration and tests feedback loops.
Symptoms: Haiku generator struggles to meet 5-7-5 syllable structure
Debug steps:
Solution: Allow multiple retry attempts (3-5). Haiku generation is hard.
Symptoms: Agent doesn't transition to recommendations
Debug steps:
Solution: Ensure extraction happens after each turn. Monitor factorsCollected metadata.
Symptoms: human-approval agent returns timeout status
Debug steps:
mockable: true for testingSolution: For testing, use mock mode. For production, increase timeout or add retry logic.
Your orchestration is successful when:
For Single Agents:
For Pipelines:
For Loops:
For Conversational Flows:
For HITL Workflows:
When agents don't depend on each other, run them in parallel.
Example: Generate both name and haiku from same characteristics
const [name, haiku] = await Promise.all([
generateCatName(characteristics),
generateCatHaiku(characteristics),
]);
Benefits: Faster execution, better user experience
When one agent fails, try alternatives.
Example: Photo analysis with text description fallback
let characteristics;
try {
characteristics = await analyzePhoto(imagePath);
} catch {
// Fallback to text description
const description = await getUserDescription();
characteristics = await parseDescription(description);
}
Benefits: Resilience, better error handling
Choose agent path based on user input type.
Example: Multi-modal input handling
if (input.type === 'image') {
characteristics = await analyzePhoto(input.imagePath);
} else if (input.type === 'text') {
characteristics = await parseDescription(input.description);
} else {
// Conversational gathering
characteristics = await breedAdvisor.gather();
}
Benefits: Flexible input handling, better UX
Break complex workflows into approval stages.
Example: Multi-stage breeding application
// Stage 1: Basic info approval
const basicApproval = await humanApproval({ stage: 'basic', data });
if (!basicApproval.approved) return;
// Stage 2: Detailed questionnaire
const detailApproval = await humanApproval({ stage: 'detail', data });
if (!detailApproval.approved) return;
// Stage 3: Final review
const finalApproval = await humanApproval({ stage: 'final', data });
Benefits: Checkpoints prevent wasted work, clearer decision points
# Input
echo '{
"name": "Mr. Whiskers",
"characteristics": {
"physical": {
"furColor": "Orange",
"furPattern": "Tabby",
"size": "medium"
},
"behavioral": {
"personality": ["Playful", "Curious"]
}
}
}' | vat agents validate-name
# Output (stdout)
{
"status": "valid",
"reason": "Name meets all quirky validation rules",
"confidence": 0.95
}
---
# (stderr - empty if no errors)
# Input
echo '{
"lines": [
"Orange sunset fur",
"Paws dance across the tatami",
"Zen master purrs"
]
}' | vat agents validate-haiku
# Output (stdout)
{
"status": "valid",
"syllableCounts": [5, 7, 5],
"hasKigo": true,
"kigo": "sunset",
"hasKireji": false,
"errors": []
}
---
# (stderr - empty if no errors)
# Invalid input
echo '{"invalid": "schema"}' | vat agents validate-name
# Output
# (stdout - empty)
---
Error: Invalid input schema. Expected 'name' and 'characteristics' fields.
Schema validation failed:
- Missing required field: name
- Missing required field: characteristics
# (exit code: 2)
Once you've successfully orchestrated agents:
business
Reports the current git working-tree status. Use when the user asks for a summary of uncommitted changes in the repo.
development
Fetches the current UTC time from a public HTTP time API and reports it. Use when the user asks for the current network time.
tools
Answers questions about the application database by querying it through the Postgres MCP tool. Use when the user asks about rows or tables in the app database.
tools
Lists open pull requests on the current GitHub repository. Use when the user asks what PRs are open.