Improve the quality of 305 Roo Code custom modes stored in custom_modes.d/*/.
Process one mode at a time, sequentially. Do not trim or remove content.
If you process all modes at once, you may:
- Run out of context window
- Apply generic templates that hurt quality
- Miss mode-specific nuances
Processing one mode at a time ensures each gets proper attention.
custom_modes.d/
{slug}/
{slug}.yaml
Each YAML file contains:
customModes:
- slug: mode-slug
name: Mode Name
roleDefinition: >- # Detailed persona
description: >- # 1-2 sentence summary
whenToUse: >- # When to activate
customInstructions: >- # Detailed behavioral guidance
groups:
- read
- edit
- command
- mcpslug: kebab-case,^[a-zA-Z0-9-]+$, NO double dashesname: display name (can contain emoji in name, but NOemojifield)roleDefinition: REQUIRED, detailed personadescription: OPTIONAL but should differ fromroleDefinitionwhenToUse: OPTIONAL, specific activation guidancegroups: REQUIRED, from{read, edit, command, mcp}(browsertolerated)customInstructions: OPTIONAL, detailed workflows- NO
emoji,category,subcategory,version,lastUpdatedfields
If they are identical, split them:
description: Concise 1-2 sentence summary (80-150 chars)roleDefinition: Detailed persona with domain expertise (300-800 chars)
Expand with genuine domain expertise. Include:
- Specific methodologies and tools
- Quality standards and practices
- Concrete responsibilities (not generic fluff)
Replace "Use when you need X expertise" with:
- Specific scenarios where this mode adds value
- What problems it solves
- When NOT to use it
If present but generic, enhance with:
- Step-by-step workflows
- Decision trees
- Quality checkpoints
- Tool-specific guidance
For EACH mode file in custom_modes.d/ (alphabetical order):
- READ the file
- ANALYZE: Check for the 4 issues above
- REWRITE: Fix issues, preserve all valuable content
- VERIFY: Run
python3 scripts/verify_modes.py— must pass - COMMIT (optional):
git add {file} && git commit -m "improve: {slug}" - NEXT: Move to the next mode file
After each mode, run:
python3 scripts/verify_modes.pyMust output: ✅ ALL CHECKS PASSED
After every ~10 modes, run:
python3 scripts/compile_modes.pyTo regenerate .roomodes and custom_modes.yaml.
description: You debug code.
roleDefinition: You debug code.
whenToUse: Use when you need debug expertise.description: Systematically isolates root causes of runtime failures through
tracing, reproduction, and evidence-based analysis.
roleDefinition: >-
You are an expert debugging specialist who eliminates unknowns to find root
causes. You combine static analysis, dynamic tracing, and environmental
inspection. You produce minimal reproduction cases, write regression tests,
and document failure modes. You understand memory corruption, race
conditions, deadlocks, and Heisenbugs.
whenToUse: >-
Activate when investigating crashes, flaky tests, memory leaks, or any
behavior that deviates from expected output. Also use when logs or stack
traces need expert interpretation.# List all mode files to process
find custom_modes.d -name "*.yaml" | sort
# Test one mode individually
cp custom_modes.d/debug/debug.yaml /tmp/test-mode.yaml
# Verify all modes
python3 scripts/verify_modes.py
# Compile to .roomodes
python3 scripts/compile_modes.py
# Test a single mode in Roo Code
python3 scripts/batch_roomodes.py --single debug
cp .roomodes.single-debug .roomodes
# Then reload VS Code window- ONE mode at a time — finish it completely before starting the next
- DO NOT trim — preserve all valuable content, just restructure and enhance
- DO NOT add unsupported fields — no emoji, category, version, lastUpdated
- Verify after EACH mode — never batch-verify, always check immediately
- If unsure, ask — stop and ask the user rather than guessing