Best use case
parallel-validate-prompts is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Validate and fix parallel prompts for required sections
Teams using parallel-validate-prompts should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/parallel-validate-prompts/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How parallel-validate-prompts Compares
| Feature / Agent | parallel-validate-prompts | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Validate and fix parallel prompts for required sections
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# parallel-validate-prompts
**Category**: Parallel Development
## Usage
```bash
/parallel-validate-prompts <parallel-dir> [--fix] [--verbose]
```
## Arguments
| Argument | Required | Description |
|----------|----------|-------------|
| `<parallel-dir>` | Yes | Path to parallel folder (e.g., `parallel/TS-0042-inventory/`) |
| `--fix` | No | Automatically regenerate non-compliant prompts |
| `--verbose` | No | Show detailed validation for each prompt |
## Purpose
Validate that generated prompt files in `prompts/` contain all required sections for successful agent execution. This command:
1. Scans all `prompts/task-*.txt` files
2. Validates presence of mandatory sections
3. Reports compliance status
4. Optionally regenerates non-compliant prompts
Use this to verify prompts generated elsewhere (other tools, manual creation, or older decomposition runs) before running `cpo run`.
## Required Sections
Every prompt file MUST contain these sections (see `parallel-prompt-generator` skill):
| Section | Marker | Purpose |
|---------|--------|---------|
| **Skills** | `=== REQUIRED SKILLS ===` | Skills to invoke at start |
| Context | `=== CONTEXT ===` | Shared project context |
| Objective | `=== OBJECTIVE ===` | Task goal |
| Contracts | `=== CONTRACTS ===` | Contract file references |
| Files to Create | `=== FILES TO CREATE ===` | Scope CREATE |
| Files to Modify | `=== FILES TO MODIFY ===` | Scope MODIFY |
| Do Not Modify | `=== DO NOT MODIFY ===` | Scope BOUNDARY |
| Requirements | `=== IMPLEMENTATION REQUIREMENTS ===` | Implementation details |
| Acceptance | `=== ACCEPTANCE CRITERIA ===` | Checklist items |
| **Execution** | `=== EXECUTION INSTRUCTIONS ===` | How to implement |
| **Rules** | `=== IMPORTANT RULES ===` | Constraints |
| **Output Format** | `=== OUTPUT FORMAT (REQUIRED) ===` | JSON output block |
| **Completion** | `=== COMPLETION SIGNAL ===` | touch .claude-task-complete |
The last four sections (bold) are **critical** - prompts missing these will fail to produce structured output.
---
## Execution Instructions for Claude Code
When this command is run, Claude Code should:
### 1. Parse Arguments
```
PARALLEL_DIR = first positional argument
FIX_MODE = true if --fix specified
VERBOSE = true if --verbose specified
```
### 2. Validate Directory Structure
Check that the parallel directory exists and has prompts:
```bash
ls "$PARALLEL_DIR/prompts/task-*.txt" 2>/dev/null
```
If no prompts found:
```
ERROR: No prompt files found in $PARALLEL_DIR/prompts/
Expected files: prompts/task-001.txt, prompts/task-002.txt, etc.
Run '/parallel-decompose' to generate prompts, or create them manually.
```
### 3. Validate Each Prompt File
For each `prompts/task-*.txt` file, check for required markers:
```python
REQUIRED_SECTIONS = [
("REQUIRED SKILLS", "=== REQUIRED SKILLS ==="),
("CONTEXT", "=== CONTEXT ==="),
("OBJECTIVE", "=== OBJECTIVE ==="),
("CONTRACTS", "=== CONTRACTS ==="),
("FILES TO CREATE", "=== FILES TO CREATE ==="),
("FILES TO MODIFY", "=== FILES TO MODIFY ==="),
("DO NOT MODIFY", "=== DO NOT MODIFY ==="),
("IMPLEMENTATION REQUIREMENTS", "=== IMPLEMENTATION REQUIREMENTS ==="),
("ACCEPTANCE CRITERIA", "=== ACCEPTANCE CRITERIA ==="),
("EXECUTION INSTRUCTIONS", "=== EXECUTION INSTRUCTIONS ==="),
("IMPORTANT RULES", "=== IMPORTANT RULES ==="),
("OUTPUT FORMAT", "=== OUTPUT FORMAT (REQUIRED) ==="),
("COMPLETION SIGNAL", "=== COMPLETION SIGNAL ==="),
]
CRITICAL_SECTIONS = [
"EXECUTION INSTRUCTIONS",
"IMPORTANT RULES",
"OUTPUT FORMAT",
"COMPLETION SIGNAL",
]
```
Also verify the JSON output block exists:
```
grep -q '"task_completed"' "$file"
```
### 4. Report Results
#### Default Output (no --verbose)
```
Prompt Validation Report
========================
Directory: parallel/TS-0042-inventory/
Prompts found: 5
Results:
task-001.txt: PASS
task-002.txt: PASS
task-003.txt: FAIL (missing: OUTPUT FORMAT, COMPLETION SIGNAL)
task-004.txt: PASS
task-005.txt: FAIL (missing: EXECUTION INSTRUCTIONS, IMPORTANT RULES, OUTPUT FORMAT, COMPLETION SIGNAL)
Summary:
Passed: 3/5
Failed: 2/5
Failed prompts are missing critical sections required for structured output.
Run with --fix to regenerate non-compliant prompts.
```
#### Verbose Output (--verbose)
```
Prompt Validation Report
========================
Directory: parallel/TS-0042-inventory/
Prompts found: 5
=== task-001.txt ===
[✓] REQUIRED SKILLS
[✓] CONTEXT
[✓] OBJECTIVE
[✓] CONTRACTS
[✓] FILES TO CREATE
[✓] FILES TO MODIFY
[✓] DO NOT MODIFY
[✓] IMPLEMENTATION REQUIREMENTS
[✓] ACCEPTANCE CRITERIA
[✓] EXECUTION INSTRUCTIONS
[✓] IMPORTANT RULES
[✓] OUTPUT FORMAT (REQUIRED)
[✓] COMPLETION SIGNAL
[✓] JSON output block
Status: PASS
=== task-003.txt ===
[✗] REQUIRED SKILLS
[✓] CONTEXT
[✓] OBJECTIVE
[✓] CONTRACTS
[✓] FILES TO CREATE
[✓] FILES TO MODIFY
[✓] DO NOT MODIFY
[✓] IMPLEMENTATION REQUIREMENTS
[✓] ACCEPTANCE CRITERIA
[✗] EXECUTION INSTRUCTIONS <- CRITICAL
[✗] IMPORTANT RULES <- CRITICAL
[✗] OUTPUT FORMAT (REQUIRED) <- CRITICAL
[✗] COMPLETION SIGNAL <- CRITICAL
[✗] JSON output block
Status: FAIL
...
```
### 5. Fix Mode (--fix)
If `--fix` is specified and there are failing prompts:
1. **Invoke the `parallel-prompt-generator` skill** to get the exact template
2. **Read the corresponding task file** from `tasks/task-NNN-*.md`
3. **Read context.md** for shared context
4. **Regenerate the prompt** using the skill template
5. **Backup the old prompt** to `prompts/task-NNN.txt.backup`
6. **Write the new prompt**
```
Fixing non-compliant prompts...
task-003.txt:
Backup: prompts/task-003.txt.backup
Reading: tasks/task-003-orders.md
Regenerating with full template...
Written: prompts/task-003.txt
Status: FIXED
task-005.txt:
Backup: prompts/task-005.txt.backup
Reading: tasks/task-005-api.md
Regenerating with full template...
Written: prompts/task-005.txt
Status: FIXED
Fixed: 2 prompts
Re-run validation to confirm: /parallel-validate-prompts $PARALLEL_DIR
```
### 6. Exit Codes
- `0`: All prompts valid
- `1`: Some prompts invalid (and --fix not specified)
- `2`: Directory not found or no prompts
---
## Examples
```bash
# Basic validation
/parallel-validate-prompts parallel/TS-0042-inventory/
# Detailed validation
/parallel-validate-prompts parallel/TS-0042-inventory/ --verbose
# Validate and fix non-compliant prompts
/parallel-validate-prompts parallel/TS-0042-inventory/ --fix
# Full verbose validation with fixes
/parallel-validate-prompts parallel/TS-0042-inventory/ --fix --verbose
```
## Common Issues
### Missing Critical Sections
**Cause**: Prompts generated by older tools or without using the `parallel-prompt-generator` skill.
**Solution**: Run with `--fix` to regenerate using the correct template.
### No JSON Output Block
**Cause**: The `=== OUTPUT FORMAT (REQUIRED) ===` section exists but doesn't contain the JSON template.
**Solution**: Regenerate with `--fix` or manually add:
```json
{
"task_completed": boolean,
"validation_passed": boolean,
"files_created": [string],
"files_modified": [string],
"tests_run": integer,
"tests_passed": integer,
"tests_failed": integer,
"summary": string,
"full_log": string,
"error_message": string | null
}
```
### Task File Not Found
**Cause**: Prompt file exists but corresponding task file in `tasks/` is missing.
**Solution**: Regenerate tasks with `/parallel-decompose` or create the missing task file manually.
---
## Related Commands
| Command | Purpose |
|---------|---------|
| `/parallel-decompose` | Generate tasks and prompts from Tech Spec |
| `/parallel-run` | Execute parallel agents (validates first) |
| `/parallel-integrate` | Verify integration after execution |
## Related Skills
| Skill | Purpose |
|-------|---------|
| `parallel-prompt-generator` | Template for generating prompts |
| `parallel-task-format` | Task file format specification |Related Skills
parallel-ready-django
Audit and prepare a Django codebase for parallel multi-agent development. Use when asked to check if a Django project is ready for parallelization, prepare a repo for multi-agent work, audit codebase structure, set up orchestration infrastructure, or identify blockers for parallel development. Analyzes Django apps, models, migrations, and module boundaries.
parallel-fix-django
Fix Django-specific blockers identified in parallelization readiness assessment
parallel-task-format
Compact YAML format for defining parallel task specifications with scope, boundaries, and agent assignments. Use when creating task files for parallel development.
parallel-setup
One-time setup of parallel/ directory for multi-agent development
parallel-run
Orchestrate parallel agent execution with git worktrees
parallel-prompt-generator
Generate agent-ready prompts from existing task specification files. Use when regenerating prompts after editing tasks, updating prompt templates, or preparing tasks for cpo execution.
parallel-integrate
Verify integration after parallel agent execution and generate report
parallel-execution
Execute multiple Claude Code agents in parallel using the cpo CLI tool. Use when running parallel tasks, monitoring execution, or understanding the execution workflow.
parallel-decompose
Decompose PRDs and Tech Specs into parallel-executable tasks with contracts, prompts, and dependency graphs. Use when breaking down a PRD for multi-agent execution.
parallel-agents
Use when parallelizing development, running multiple agents, splitting work across agents, coordinating parallel tasks, or decomposing PRDs for concurrent execution. Breaks work into independent agent workstreams.
zod
Zod schema validation patterns and type inference. Auto-loads when validating schemas, parsing data, validating forms, checking types at runtime, or using z.object/z.string/z.infer in TypeScript.
typescript-import-style
Merge-friendly import formatting (one-per-line, alphabetical). Auto-loads when writing TypeScript/JavaScript imports to minimize merge conflicts in parallel development. Enforces consistent grouping and sorting.