plugins/code-analysis/skills/claudemem-orchestration/SKILL.md
Multi-agent code analysis orchestration using claudemem. Share claudemem output across parallel agents. Enables parallel investigation, consensus analysis, and role-based command mapping.
npx skillsauth add involvex/involvex-claude-marketplace claudemem-orchestrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Version: 1.0.0 Purpose: Coordinate multiple agents using shared claudemem output
When multiple agents need to investigate the same codebase:
This pattern avoids redundant claudemem calls and enables consensus-based prioritization.
For parallel execution patterns, see: orchestration:multi-model-validation skill
This skill focuses on claudemem-specific orchestration. For general parallel execution:
orchestration:multi-model-validation Pattern 1orchestration:multi-model-validation Pattern 0orchestration:multi-model-validation Pattern 7Purpose: Run expensive claudemem commands ONCE, share results across agents.
# Create unique session directory (per orchestration:multi-model-validation Pattern 0)
SESSION_ID="analysis-$(date +%Y%m%d-%H%M%S)-$(head -c 4 /dev/urandom | xxd -p)"
SESSION_DIR="/tmp/${SESSION_ID}"
mkdir -p "$SESSION_DIR"
# Run claudemem ONCE, write to shared files
claudemem --nologo map "feature area" --raw > "$SESSION_DIR/structure-map.md"
claudemem --nologo test-gaps --raw > "$SESSION_DIR/test-gaps.md" 2>&1 || echo "No gaps found" > "$SESSION_DIR/test-gaps.md"
claudemem --nologo dead-code --raw > "$SESSION_DIR/dead-code.md" 2>&1 || echo "No dead code" > "$SESSION_DIR/dead-code.md"
# Export session info
echo "$SESSION_ID" > "$SESSION_DIR/session-id.txt"
Why shared output matters:
After running claudemem, distribute to role-specific agents:
# Parallel Execution (ONLY Task calls - per 4-Message Pattern)
Task: architect-detective
Prompt: "Analyze architecture from $SESSION_DIR/structure-map.md.
Focus on layer boundaries and design patterns.
Write findings to $SESSION_DIR/architect-analysis.md"
---
Task: tester-detective
Prompt: "Analyze test gaps from $SESSION_DIR/test-gaps.md.
Prioritize coverage recommendations.
Write findings to $SESSION_DIR/tester-analysis.md"
---
Task: developer-detective
Prompt: "Analyze dead code from $SESSION_DIR/dead-code.md.
Identify cleanup opportunities.
Write findings to $SESSION_DIR/developer-analysis.md"
All 3 execute simultaneously (3x speedup!)
Task: ultrathink-detective
Prompt: "Consolidate analyses from:
- $SESSION_DIR/architect-analysis.md
- $SESSION_DIR/tester-analysis.md
- $SESSION_DIR/developer-analysis.md
Create unified report with prioritized action items.
Write to $SESSION_DIR/consolidated-analysis.md"
| Agent Role | Primary Commands | Secondary Commands | Focus |
|------------|------------------|-------------------|-------|
| Architect | map, dead-code | context | Structure, cleanup |
| Developer | callers, callees, impact | symbol | Modification scope |
| Tester | test-gaps | callers | Coverage priorities |
| Debugger | context, impact | symbol, callers | Error tracing |
| Ultrathink | ALL | ALL | Comprehensive |
For complex bugs or features requiring ordered investigation:
Phase 1: Architecture Understanding
claudemem --nologo map "problem area" --raw
Identify high-PageRank symbols (> 0.05)
Phase 2: Symbol Deep Dive
For each high-PageRank symbol:
claudemem --nologo context <symbol> --raw
Document dependencies and callers
Phase 3: Impact Assessment (v0.4.0+)
claudemem --nologo impact <primary-symbol> --raw
Document full blast radius
Phase 4: Gap Analysis (v0.4.0+)
claudemem --nologo test-gaps --min-pagerank 0.01 --raw
Identify coverage holes in affected code
Phase 5: Action Planning
Prioritize by: PageRank * impact_depth * test_coverage
When an agent needs deep code analysis, it should reference the claudemem skill:
---
skills: code-analysis:claudemem-search, code-analysis:claudemem-orchestration
---
The agent then follows this pattern:
claudemem statusclaudemem indexDo:
orchestration:multi-model-validation)Don't:
session-start.sh)Automatic TTL Cleanup:
The session-start.sh hook automatically cleans up expired session directories:
/tmp/analysis-*, /tmp/review-* directories older than TTLplugins/code-analysis/hooks/session-start.sh for implementationManual Cleanup:
# Clean up specific session
rm -rf "$SESSION_DIR"
# Clean all old sessions (24+ hours)
find /tmp -maxdepth 1 -name "analysis-*" -o -name "review-*" -mtime +1 -exec rm -rf {} \;
For robust orchestration, handle common claudemem errors. See claudemem-search skill for complete error handling templates:
RESULT=$(claudemem --nologo map "query" --raw 2>/dev/null)
if [ -z "$RESULT" ] || echo "$RESULT" | grep -q "No results found"; then
echo "No results - try broader keywords or check index status"
fi
# Check if command is available (v0.4.0+ commands)
if claudemem --nologo dead-code --raw 2>&1 | grep -q "unknown command"; then
echo "dead-code requires claudemem v0.4.0+"
echo "Fallback: Use map command instead"
fi
# Verify index before running commands
if ! claudemem status 2>&1 | grep -qE "[0-9]+ (chunks|symbols)"; then
echo "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.6.0 Last Updated: December 2025
development
Technical SEO audit methodology including crawlability, indexability, and Core Web Vitals analysis. Use when auditing pages or sites for technical SEO issues.
content-media
SERP analysis techniques for intent classification, feature identification, and competitive intelligence. Use when analyzing search results for content strategy.
data-ai
Schema.org markup implementation patterns for rich results. Use when adding structured data to content for enhanced SERP appearances.
development
Correlate content attributes with performance metrics across GA4, GSC, and SE Ranking. Identify what drives performance and build optimization hypotheses.