Validates and coordinates batch study guide operations (both separate and merge modes). Ensures file availability, template compatibility, and source-only policy before launching agents. **CRITICAL AUTOMATION**: Prevents batch processing errors by validating all prerequisites.
Validate batch study guide operations and coordinate appropriate agent invocation based on mode (separate vs merge).
When batch processing detected → validate prerequisites → suggest appropriate agent → ensure quality gates.
Prompt Triggers:
--merge flag presentFile Triggers:
Examples:
/drugs-3-tab-excel "HIV.txt;Antibiotics.txt;Antivirals.txt"
/drugs-3-tab-excel --merge "HIV-Lec1.txt;HIV-Lec2.txt;HIV-Lec3.txt"
/clinical-assessment-html --merge "Lower-Back.txt;Spine.txt;Neuro.txt" "Back Pain"
When user provides multiple files, determine mode:
Batch Separate (default for multiple files):
--merge flagbatch-separate-processor (launched N times)Batch Merge (explicit flag):
--merge flag presentbatch-merge-orchestrator (launched once)Before allowing batch processing, validate:
BATCH FILE VALIDATION:
☐ All file paths provided
☐ All files exist and are readable
☐ File count matches user intent
☐ No duplicate files in list
☐ Total content size manageable (estimate tokens)
TEMPLATE VALIDATION:
☐ Template type specified (excel, word, html-LO, etc.)
☐ Template compatible with ALL files
☐ Files are homogeneous (all drug lectures, all condition files, etc.)
☐ Special parameters present if required (e.g., chief complaint for clinical)
SOURCE-ONLY VALIDATION:
☐ User acknowledges source-only policy per mode:
- Batch Separate: Source-only per file
- Batch Merge: Source-only across merged content
☐ Exception: Mnemonics WILL be researched via WebSearch
☐ No external knowledge beyond templates and researched mnemonics
For Batch Separate:
BATCH SEPARATE VALIDATION:
☐ Each file will create separate output
☐ Architectural isolation via subagents (zero contamination)
☐ Output count: N files → N outputs
☐ Each file gets complete verification
For Batch Merge:
BATCH MERGE VALIDATION:
☐ Files are related/compatible for merging
☐ User wants ONE unified output
☐ Merge orchestrator will resolve overlaps
☐ Source traceability will be maintained
☐ Conflicts will be documented
☐ Output count: N files → 1 merged output
Based on mode, suggest appropriate agent:
I'll use the batch-separate-processor agent to process your files with architectural isolation.
**What will happen:**
1. batch-separate-processor agent launched per file (N times total)
2. Each invocation processes ONE file in isolated context
3. Zero cross-contamination (architectural guarantee)
4. Output: N separate study guides
**Agent invocations:**
- File 1: batch-separate-processor → Output1
- File 2: batch-separate-processor → Output2
- File 3: batch-separate-processor → Output3
...
- File N: batch-separate-processor → OutputN
Ready to proceed? [Confirm: yes to start batch processing]
I'll use the batch-merge-orchestrator agent to intelligently merge your files.
**What will happen:**
1. batch-merge-orchestrator agent launched ONCE with all N files
2. Agent reads ALL files completely
3. Creates content matrix (which files cover which topics)
4. Identifies overlaps and gaps
5. Resolves conflicts with source traceability
6. Merges into ONE comprehensive study guide
7. Creates merge report with traceability map
**Output:**
- 1 merged study guide: [filename]
- 1 merge report: [filename]_merge_report.md
Ready to proceed? [Confirm: yes to start batch merge]
When ALL validation passes:
When validation has minor issues (e.g., file naming ambiguity):
⚠️ BATCH VALIDATION FAILED
Issue: File(s) not found
Missing: [list files]
Action: Please verify file paths and try again
⚠️ BATCH VALIDATION FAILED
Issue: Files are incompatible for merging
File1: Drug lecture (pharmacology)
File2: Clinical presentation (medicine)
Reason: Different content types require different templates
Action: Use batch separate mode OR separate commands
⚠️ BATCH VALIDATION FAILED
Issue: Template incompatible with file content
Template: Excel Drug Chart (expects drug list)
Files contain: Learning objectives (not drugs)
Action: Use /LO-html or /LO-word instead of /drugs-3-tab-excel
⚠️ AMBIGUOUS INTENT DETECTED
You provided multiple files without --merge flag.
Default behavior: Batch Separate (N files → N outputs)
Did you mean: Batch Merge (N files → 1 output)?
If you want ONE merged output, add --merge flag:
/drugs-3-tab-excel --merge "file1.txt;file2.txt;file3.txt"
If you want separate outputs, proceed as-is:
/drugs-3-tab-excel "file1.txt;file2.txt;file3.txt"
Coordination:
User Command
↓
batch-coordinator (validates)
↓
source-only-enforcer (enforces policy)
↓
batch-separate-processor OR batch-merge-orchestrator (processes)
↓
study-guide-verifier (suggests verification)
↓
study-guide-analyzer (verifies output)
User: /drugs-3-tab-excel "HIV.txt;Antibiotics.txt;Antivirals.txt"
batch-coordinator response:
BATCH SEPARATE MODE DETECTED
Files: 3
Output: 3 separate Excel charts
Validation:
✓ All files exist
✓ Template: Excel Drug Chart (compatible)
✓ Mode: Batch Separate (N → N outputs)
I'll use batch-separate-processor agent (3 invocations):
- Invocation 1: HIV.txt → HIV_Drug_Chart.xlsx
- Invocation 2: Antibiotics.txt → Antibiotics_Chart.xlsx
- Invocation 3: Antivirals.txt → Antivirals_Chart.xlsx
Architectural isolation guarantees zero cross-contamination.
Ready to proceed?
User: /drugs-3-tab-excel --merge "HIV-PIs.txt;HIV-NRTIs.txt;HIV-NNRTIs.txt"
batch-coordinator response:
BATCH MERGE MODE DETECTED
Files: 3 (HIV drug classes)
Output: 1 merged Excel chart
Validation:
✓ All files exist
✓ Files are related (all HIV drugs)
✓ Template: Excel Drug Chart (compatible)
✓ Mode: Batch Merge (N → 1 merged output)
I'll use batch-merge-orchestrator agent:
1. Read all 3 files completely
2. Create content matrix (which drugs in which files)
3. Resolve overlaps (if same drug in multiple files)
4. Merge intelligently with source traceability
5. Output: HIV_Comprehensive_Chart.xlsx + merge_report.md
Ready to proceed?
User: /clinical-assessment-html --merge "Lower-Back.txt;Spine.txt;Neuro.txt" "Back Pain"
batch-coordinator response:
BATCH MERGE MODE DETECTED (Clinical)
Files: 3 (condition files)
Chief Complaint: Back Pain
Output: 1 merged clinical guide
Validation:
✓ All files exist
✓ Template: Clinical Assessment (compatible)
✓ Chief complaint specified
✓ Mode: Batch Merge with filtering
I'll use batch-merge-orchestrator agent:
1. Read all 3 files
2. Extract ONLY back pain related content from each
3. Merge relevant information
4. Create unified clinical guide for back pain
5. Output: Back_Pain_Clinical_Guide.html + merge_report.md
Ready to proceed?
(None yet - skill is self-contained)
Q: User provides multiple files but no clear intent? A: Ask for clarification. Default to batch separate, but suggest --merge if files seem related.
Q: Files are incompatible for merging? A: Suggest batch separate mode instead. Explain why merge isn't appropriate.
Q: Too many files (e.g., 50 files)? A: Warn about performance. Suggest processing in smaller batches.
Q: Files don't exist yet? A: Block processing. User must create source files first.
This skill ensures batch processing never starts without:
By validating upfront, we prevent errors mid-processing and ensure high-quality batch outputs.