Agent skill

Claudemem Orchestration

by MadAppGang in MadAppGang/claude-code

A skill your agent uses when orchestrating multi-agent code analysis with claudemem.

MITAuto-check: notesAgent Workflows

Install Claudemem Orchestration

skills CLI
$ npx skills add MadAppGang/claude-code --skill claudemem-orchestration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MadAppGang/claude-code claudemem-orchestration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/code-analysis/skills/claudemem-orchestration .claude/skills/claudemem-orchestration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
claudemem-orchestration
GitHub stars
285
Token cost
~2.6k tokens
SKILL.md length
527 words
Files
1
Skills in repo
69
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when orchestrating multi-agent code analysis with claudemem.

  • Works in 4 steps: Run claudemem ONCE to get structural… → Write output to shared file in session… → Launch agents in parallel - all read the… → …
  • Orchestrating multi-agent code analysis with claudemem
  • SKILL.md covers Overview, Claudemem-Specific Patterns, Role-Based Command Mapping and Sequential Investigation Flow, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Claudemem Orchestration is an agent skill from MadAppGang/claude-code. 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.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Authorization and RBAC, Multi-agent orchestration and Subagents. The repository describes itself as: claude code plugins marketplace. The licence is MIT.

When your agent uses it

  • Orchestrating multi-agent code analysis with claudemem
  • Tasks that involve Authorization and RBAC
  • Tasks that involve Multi-agent orchestration

Example prompts

  • “/claudemem-orchestration”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Task, Read, Write, AskUserQuestion

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Run claudemem ONCE to get structural overview
  2. Write output to shared file in session directory
  3. Launch agents in parallel - all read the same file
  4. Consolidate results with consensus analysis

What it can do on your machine

Read from SKILL.md and the folder at commit 6097ad4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Task
    • Read
    • Write
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Claudemem Orchestration loads about 2.6k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 527 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Task, Read, Write, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MadAppGang/claude-code at commit 6097ad4, republished under its MIT licence (© MadAppGang). 527 words, ~2,562 tokens.

Download SKILL.mdSave it as .claude/skills/claudemem-orchestration/SKILL.md (or your agent's skills folder).
name
claudemem-orchestration
description
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.
allowed-tools
Bash, Task, Read, Write, AskUserQuestion
updated
2026-01-20
keywords
claudemem, orchestration, multi-agent, parallel-execution, consensus
skills
orchestration:multi-model-validation

Claudemem Multi-Agent Orchestration

Version: 1.1.0 Purpose: Coordinate multiple agents using shared claudemem output

Overview

When multiple agents need to investigate the same codebase:

  1. Run claudemem ONCE to get structural overview
  2. Write output to shared file in session directory
  3. Launch agents in parallel - all read the same file
  4. Consolidate results with consensus analysis

This pattern avoids redundant claudemem calls and enables consensus-based prioritization.

For parallel execution patterns, see: orchestration:multi-model-validation skill

Claudemem-Specific Patterns

This skill focuses on claudemem-specific orchestration. For general parallel execution:

  • 4-Message Pattern - See orchestration:multi-model-validation Pattern 1
  • Session Setup - See orchestration:multi-model-validation Pattern 0
  • Statistics Collection - See orchestration:multi-model-validation Pattern 7
Pattern 1: Shared Claudemem Output

Purpose: Run expensive claudemem commands ONCE, share results across agents.

bash
# 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 --agent map "feature area" > "$SESSION_DIR/structure-map.md"
claudemem --agent test-gaps > "$SESSION_DIR/test-gaps.md" 2>&1 || echo "No gaps found" > "$SESSION_DIR/test-gaps.md"
claudemem --agent dead-code > "$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:

  • Claudemem indexing is expensive (full AST parse)
  • Same index serves all queries in session
  • Parallel agents reading same file = no redundant computation
Pattern 2: Role-Based Agent Distribution

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!)
Pattern 3: Consolidation with Ultrathink
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"
Pattern 4: Consolidated Feedback Reporting (v0.8.0+)

When multiple agents perform searches, consolidate feedback for efficiency.

Why Consolidate?

  • Avoid duplicate feedback submissions
  • Single point of failure handling
  • Cleaner session cleanup

Shared Feedback Collection:

Each agent writes feedback to a shared file in the session directory:

bash
# Agent writes feedback entry (atomic with flock)
report_agent_feedback() {
  local query="$1"
  local helpful="$2"
  local unhelpful="$3"

  # Use file locking to prevent race conditions
  (
    flock -x 200
    printf '%s|%s|%s\n' "$query" "$helpful" "$unhelpful" >> "$SESSION_DIR/feedback.log"
  ) 200>"$SESSION_DIR/feedback.lock"
}

# Usage in agent
report_agent_feedback "$SEARCH_QUERY" "$HELPFUL_IDS" "$UNHELPFUL_IDS"

Orchestrator Consolidation:

After all agents complete, the orchestrator submits all feedback:

bash
consolidate_feedback() {
  local session_dir="$1"
  local feedback_log="$session_dir/feedback.log"

  # Skip if no feedback collected
  [ -f "$feedback_log" ] || return 0

  # Check if feedback command available (v0.8.0+)
  if ! claudemem feedback --help 2>&1 | grep -qi "feedback"; then
    echo "Note: Search feedback requires claudemem v0.8.0+"
    return 0
  fi

  local success=0
  local failed=0

  while IFS='|' read -r query helpful unhelpful; do
    # Skip empty lines
    [ -n "$query" ] || continue

    if timeout 5 claudemem feedback \
      --query "$query" \
      --helpful "$helpful" \
      --unhelpful "$unhelpful" 2>/dev/null; then
      ((success++))
    else
      ((failed++))
    fi
  done < "$feedback_log"

  echo "Feedback: $success submitted, $failed failed"

  # Cleanup
  rm -f "$feedback_log" "$session_dir/feedback.lock"
}

# Call after consolidation
consolidate_feedback "$SESSION_DIR"

Multi-Agent Workflow Integration:

Phase 1: Session Setup
  └── Create SESSION_DIR with feedback.log

Phase 2: Parallel Agent Execution
  └── Agent 1: Search → Track → Write feedback entry
  └── Agent 2: Search → Track → Write feedback entry
  └── Agent 3: Search → Track → Write feedback entry

Phase 3: Results Consolidation
  └── Consolidate agent outputs

Phase 4: Feedback Consolidation (NEW)
  └── Read all feedback entries from log
  └── Submit each to claudemem
  └── Report success/failure counts

Phase 5: Cleanup
  └── Remove SESSION_DIR (includes feedback files)

Best Practices Update:

Do:

  • Use file locking for concurrent writes (flock -x)
  • Consolidate feedback AFTER agent completion
  • Report success/failure counts
  • Clean up feedback files after submission

Don't:

  • Submit feedback from each agent individually
  • Skip the version check
  • Block on feedback submission failures
  • Track feedback for non-search commands (map, symbol, callers, etc.)

Role-Based Command Mapping

Agent RolePrimary CommandsSecondary CommandsFocus
Architectmap, dead-codecontextStructure, cleanup
Developercallers, callees, impactsymbolModification scope
Testertest-gapscallersCoverage priorities
Debuggercontext, impactsymbol, callersError tracing
UltrathinkALLALLComprehensive

Sequential Investigation Flow

For complex bugs or features requiring ordered investigation:

Phase 1: Architecture Understanding
  claudemem --agent map "problem area"  Identify high-PageRank symbols (> 0.05)

Phase 2: Symbol Deep Dive
  For each high-PageRank symbol:
    claudemem --agent context <symbol>    Document dependencies and callers

Phase 3: Impact Assessment (v0.4.0+)
  claudemem --agent impact <primary-symbol>  Document full blast radius

Phase 4: Gap Analysis (v0.4.0+)
  claudemem --agent test-gaps --min-pagerank 0.01  Identify coverage holes in affected code

Phase 5: Action Planning
  Prioritize by: PageRank * impact_depth * test_coverage
Show full SKILL.md (207 more words)Show less

Agent System Prompt Integration

When an agent needs deep code analysis, it should reference the claudemem skill:

yaml
---
skills: code-analysis:claudemem-search, code-analysis:claudemem-orchestration
---

The agent then follows this pattern:

  1. Check claudemem status: claudemem status
  2. Index if needed: claudemem index
  3. Run appropriate command based on role
  4. Write results to session file for sharing
  5. Return brief summary to orchestrator

Best Practices

Do:

  • Run claudemem ONCE per investigation type
  • Write all output to session directory
  • 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:

bash
# 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 {} \;

Error Handling Templates

For robust orchestration, handle common claudemem errors. See claudemem-search skill for complete error handling templates:

Empty Results
bash
RESULT=$(claudemem --agent map "query" 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
Version Compatibility
bash
# Check if command is available (v0.4.0+ commands)
if claudemem --agent dead-code 2>&1 | grep -q "unknown command"; then
  echo "dead-code requires claudemem v0.4.0+"
  echo "Fallback: Use map command instead"
fi
Index Status
bash
# 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.8.0 Last Updated: December 2025 (v1.1.0 - Search feedback protocol support)

© MadAppGang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/code-analysis/skills/claudemem-orchestration of MadAppGang/claude-code.

Open the folder on GitHubat commit 6097ad4

Compare with similar skills

Claudemem Orchestration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Claudemem Orchestration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Claudemem Orchestration this skillMadAppGang/claude-code285—~2.6kAutomated safety check: NotesMIT
Paseo Advisor Second Opiniongetpaseo/paseo20k1 repos~756Automated safety check: PassCustom licence
O2 Review Loopopenobserve/openobserve22k—~3.7kAutomated safety check: PassAGPL-3.0
Harness Agent Team Designerrevfactory/harness9.1k—~4.5kAutomated safety check: PassApache-2.0
ClawTeam Multi-Agent Swarmwin4r/ClawTeam-OpenClaw1.5k1 repos~2.9kAutomated safety check: PassMIT
Sub-Agent Delegationcodewhale-hq/Codewhale41k—~790Automated safety check: PassMIT

Similar skills

  • Launches one separate agent through Paseo to give a second opinion on the current task, with a self-contained briefing and no permission to edit files.

    20k GitHub starsUsed in 1 repo~756 tokens
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Harness Agent Team Designer

    revfactory/harness

    Designs a project-specific agent harness: defines specialist agents, writes the skills they follow, picks an execution mode and model for each, and keeps the setup maintained.

    9.1k GitHub stars~4.5k tokensUpdated 13 days ago
    Agent WorkflowsAuto-check passed
  • ClawTeam Multi-Agent Swarm

    win4r/ClawTeam-OpenClaw

    Launches a swarm of specialist Hermes agents in git-worktree-isolated tmux windows with a kanban board and file-based inboxes, using built-in templates like hedge-fund and code-review.

    1.5k GitHub starsUsed in 1 repo~2.9k tokens
    Agent WorkflowsAuto-check passed
  • Sub-Agent Delegation

    codewhale-hq/Codewhale

    Guides when and how to split multi-step coding, research or verification work into focused sub-agent runs while the parent keeps integration and final checks.

    41k GitHub stars~790 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.

    74k GitHub starsUsed in 1 repo~975 tokens
    Agent WorkflowsAuto-check passed

More from MadAppGang/claude-code

All 69 skills in this repo
  • Content Brief

    MadAppGang/claude-code

    Content brief template and creation methodology for SEO-optimized content.

    285 GitHub starsUsed in 1 repo~959 tokens
    Auto-check passed
  • Context Detection

    MadAppGang/claude-code

    A skill your agent uses when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g…

    285 GitHub stars~5.4k tokensUpdated 7 mo ago
    Auto-check passed
  • Content Optimizer

    MadAppGang/claude-code

    On-page SEO optimization techniques including keyword density, meta tags, heading structure, and readability.

    285 GitHub starsUsed in 1 repo~694 tokens
    Auto-check passed
  • Keyword Cluster Builder

    MadAppGang/claude-code

    Techniques for expanding seed keywords and clustering by topic and intent.

    285 GitHub starsUsed in 1 repo~674 tokens
    Auto-check passed
  • Serp Analysis

    MadAppGang/claude-code

    SERP analysis techniques for intent classification, feature identification, and competitive intelligence.

    285 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Agent Coordination Discipline

    MadAppGang/claude-code

    A skill your agent uses when deciding whether to launch an agent, selecting which agent to use, or coordinating multiple agents.

    285 GitHub stars~3.8k tokensUpdated 7 mo ago
    Auto-check passed

Categories

Questions about Claudemem Orchestration

What does Claudemem Orchestration do?

A skill your agent uses when orchestrating multi-agent code analysis with claudemem. Claudemem Orchestration is an agent skill from MadAppGang/claude-code. Use when orchestrating multi-agent code analysis with claudemem.

When should I use Claudemem Orchestration?

Claudemem Orchestration fits situations like: orchestrating multi-agent code analysis with claudemem; tasks that involve Authorization and RBAC; tasks that involve Multi-agent orchestration.

How do I install Claudemem Orchestration in Claude Code?

Run `npx skills add MadAppGang/claude-code --skill claudemem-orchestration -a claude-code`. Or copy the skill folder (plugins/code-analysis/skills/claudemem-orchestration in MadAppGang/claude-code) into .claude/skills/claudemem-orchestration in your project. Claude Code loads it when a task matches its description.

How do I install Claudemem Orchestration in Codex?

Run `npx skills add MadAppGang/claude-code --skill claudemem-orchestration -a codex`. Or copy the skill folder (plugins/code-analysis/skills/claudemem-orchestration in MadAppGang/claude-code) into .agents/skills/claudemem-orchestration in your project. Codex loads it when a task matches its description.

Can I use Claudemem Orchestration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MadAppGang/claude-code --skill claudemem-orchestration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/claudemem-orchestration, .gemini/skills/claudemem-orchestration, .github/skills/claudemem-orchestration and .opencode/skills/claudemem-orchestration in your project.

What does Claudemem Orchestration need to run?

SKILL.md names no scripts, command-line tools or credentials: Claudemem Orchestration is instructions for the agent only. Its frontmatter pre-approves these tools: Bash, Task, Read, Write, AskUserQuestion.

Does Claudemem Orchestration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Claudemem Orchestration safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Claudemem Orchestration use?

Claudemem Orchestration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Claudemem Orchestration use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Claudemem Orchestration?

Skills that share tags, products or a category with Claudemem Orchestration: Paseo Advisor Second Opinion (getpaseo/paseo, 20k stars), O2 Review Loop (openobserve/openobserve, 22k stars), Harness Agent Team Designer (revfactory/harness, 9.1k stars) and ClawTeam Multi-Agent Swarm (win4r/ClawTeam-OpenClaw, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Claudemem Orchestration?

MadAppGang (a GitHub organization) maintains it in MadAppGang/claude-code, which has 285 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on March 15, 2026.

Source: MadAppGang/claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.