Use when orchestrating multi-agent code analysis with claudemem. Run claudemem once, share output across parallel agents. Enables parallel investigation, consensus analysis, and role-based command mapping.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Use when orchestrating multi-agent code analysis with claudemem. Run claudemem once, share output across parallel agents. Enables parallel investigation, consensus analysis, and role-based command mapping.
Use parallel execution for independent analyses (see orchestration:multi-model-validation)
Consolidate with ultrathink for cross-perspective insights
Handle empty results gracefully
Don't:
Run same claudemem command multiple times
Let each agent run its own claudemem (wasteful)
Skip the consolidation step
Forget to clean up session directory (automatic TTL cleanup via session-start.sh)
Session Lifecycle Management
Automatic TTL Cleanup:
The session-start.sh hook automatically cleans up expired session directories:
Default TTL: 24 hours
Runs at session start
Cleans /tmp/analysis-*, /tmp/review-* directories older than TTL
See plugins/code-analysis/hooks/session-start.sh for implementation
Manual Cleanup:
# Clean up specific sessionrm -rf "$SESSION_DIR"# Clean all old sessions (24+ hours)
find /tmp -maxdepth 1 -name "analysis-*" -o -name "review-*" -mtime +1 -execrm -rf {} \;
Error Handling Templates
For robust orchestration, handle common claudemem errors. See claudemem-search skill for complete error handling templates:
Empty Results
RESULT=$(claudemem --agent map "query" 2>/dev/null)
if [ -z "$RESULT" ] || echo"$RESULT" | grep -q "No results found"; thenecho"No results - try broader keywords or check index status"fi
Version Compatibility
# Check if command is available (v0.4.0+ commands)if claudemem --agent dead-code 2>&1 | grep -q "unknown command"; thenecho"dead-code requires claudemem v0.4.0+"echo"Fallback: Use map command instead"fi
Index Status
# Verify index before running commandsif ! claudemem status 2>&1 | grep -qE "[0-9]+ (chunks|symbols)"; thenecho"Index not found - run: claudemem index"exit 1
fi
Reference: For complete error handling patterns, see templates in code-analysis:claudemem-search skill (Templates 1-5)
Maintained by: MadAppGang
Plugin: code-analysis v2.8.0
Last Updated: December 2025 (v1.1.0 - Search feedback protocol support)