testing-workflows-with-subagents
БесплатноБез исполняемых скриптовНе проверенUse when creating or editing commands, orchestrator prompts, or workflow documentation before deployment - applies RED-GREEN-REFACTOR to test instruction…
Об этом скилле
Testing Workflows With Subagents
Overview
Testing workflows is TDD applied to orchestrator instructions and command documentation.
You find real execution failures (git logs, error reports), create test scenarios that reproduce them, watch subagents follow ambiguous instructions incorrectly (RED), fix the instructions (GREEN), and verify subagents now follow correctly (REFACTOR).
Core principle: If you didn't watch an agent misinterpret the instructions in a test, you don't know if your fix prevents the right failures.
REQUIRED BACKGROUND: You MUST understand superpowers:test-driven-development before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill applies TDD to workflow documentation.
When to Use
Use when:
- Creating new commands (
.claude/commands/*.md,/spectacular:*) - Editing orchestrator prompts for subagents
- Updating workflow documentation in commands
- You observed real execution failures (wrong branches, skipped steps, misinterpreted instructions)
- Instructions involve multiple steps where order matters
- Agents work under time pressure or cognitive load
Don't test:
- Pure reference documentation (no workflow steps)
- Single-step commands with no ambiguity
- Documentation without actionable instructions
TDD Mapping for Workflow Testing
| TDD Phase | Workflow Testing | What You Do |
|---|---|---|
| RED | Find real failure | Check git logs, error reports for evidence of agents misinterpreting instructions |
| Verify RED | Create failing test scenario | Reproduce the failure with test repo + pressure scenario |
| GREEN | Fix instructions | Rewrite ambiguous steps with explicit ordering, warnings, examples |
| Verify GREEN | Test with subagent | Same scenario with fixed instructions - agent follows correctly |
| REFACTOR | Iterate on clarity | Find remaining ambiguities, improve wording, re-test |
| Stay GREEN | Re-verify | Test again to ensure fix holds |
Same cycle as code TDD, different test format.
RED Phase: Find Real Execution Failures
Goal: Gather evidence of how instructions were misinterpreted in actual execution.
Where to look:
- Git history: Commits on wrong branches, missing branches, incorrect stack structure
- Run logs: Steps skipped, wrong order executed, missing quality checks
- Error reports: Failed tasks, cleanup issues, integration problems
- User reports: "Agents did X when I expected Y"
Document evidence:
## RED Phase Evidence
**Source**: bignight.party git log (Run ID: 082687)
**Failure**: Task 4.3 commit on branch `082687-task-4.2-auth-domain-migration`
**Expected**: Create branch `082687-task-4.3-server-actions`
**Actual**: Committed to Task 4.2's branch instead
**Root cause hypothesis**: Instructions ambiguous about creating branch before committing
Critical: Get actual git commits, branch names, error messages - not hypothetical scenarios.
Create RED Test Scenario
Goal: Reproduce the failure in a controlled test environment.
Test Repository Setup
Create minimal repo that simulates real execution state:
cd /path/to/test-area
mkdir workflow-test && cd workflow-test
git init
git config user.name "Test" && git config user.email "[email protected]"
# Set up state that led to failure
# (e.g., existing task branches for sequential phase testing)
Pressure Scenario Document
Create test file with:
- Role definition: "You are subagent implementing Task X"
- Current state: Branch, uncommitted work, what's done
- Actual instructions: Copy current ambiguous instructions
- Pressure context: Combine 2-3 pressure types from table below
- Options: Give explicit choices (forces decision, no deferring)
Pressure Types for Workflow Testing
| Pressure | Example | Effect on Agent |
|---|---|---|
| Time | "Orchestrator waiting", "4 more tasks to do", "Need to move fast" | Skips reading skills, chooses fast option |
| Cognitive load | "2 hours in, tired", "Third sequential task", "Complex state" | Misreads instructions, makes assumptions |
| Urgency | "Choose NOW", "Execute immediately", "No delays" | Skips verification steps, commits to first interpretation |
| Task volume | "4 more tasks after this", "Part of 10-task phase" | Rushes through steps, skips optional guidance |
| Complexity | "Multiple branches exist", "Shared worktree", "Parallel tasks running" | Confused about current state, wrong branch |
Best test scenarios combine 2-3 pressures to simulate realistic execution conditions.
Example:
# RED Test: Sequential Phase Task Execution
**Role**: Implementation subagent for Task 2.3
**Current state**: On branch `abc123-task-2-2-database`
Uncommitted changes in auth.js (your completed work)
**Instructions from execute.md (CURRENT VERSION)**:
- Use
using-git-spice
Установить testing-workflows-with-subagents в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл testing-workflows-with-subagents?
Use when creating or editing commands, orchestrator prompts, or workflow documentation before deployment - applies RED-GREEN-REFACTOR to test instruction clarity by finding real execution failures, creating test scenarios, and verifying fixes with subagents
Как установить скилл testing-workflows-with-subagents?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл testing-workflows-with-subagents запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic