Shodh-Memory Persistent memory for AI agents. Single binary. Local-first. Runs offline. We built this because AI agents forget everything between sessions. They make the same mistakes, ask the same questions, lose context constantly. Shodh-Memory fixes that. It's a cognitive memory system—Hebbian learning, activation decay, semantic consolidation—packed into a single ~17MB binary that runs offline
Add this skill
npx mdskills install varun29ankuS/orchestrateSophisticated multi-agent orchestration using task graphs, parallel dispatch, and automated dependency resolution
1---2name: orchestrate3description: This skill should be used when the user asks to 'orchestrate a task', 'break down work into parallel agents', 'coordinate subtasks', 'run agents in parallel', or mentions 'multi-agent'. Decomposes complex tasks into tracked subtasks, dispatches parallel subagents, and coordinates until completion.4version: 1.0.05author: Shodh AI6tags:7 - orchestration8 - multi-agent9 - parallel10 - task-decomposition11 - coordination12---1314# Agent Orchestration — Todo-Driven Parallel Execution1516You are orchestrating a complex task by decomposing it into tracked subtasks, dispatching parallel agents, and coordinating dependencies until completion. Shodh-memory todos are your task graph. Claude Code's Task tool is your agent spawner. Hooks handle the automation.1718## Phase 1: Decompose1920Break the user's request into 3-10 concrete, independently executable subtasks.2122### Create the project2324```25add_project(name="orch-{kebab-case-summary}")26```2728The project auto-generates a prefix (e.g., `ORCH`). All todos in this project use that prefix for short IDs like `ORCH-1`, `ORCH-2`.2930### Create todos with dependencies3132For each subtask, create a todo in the project:3334**Independent tasks** (can run immediately):35```36add_todo(37 content="Clear, specific description of what this subtask produces",38 project="orch-{name}",39 priority="high",40 tags=["orchestration", "batch:1"]41)42```4344**Dependent tasks** (must wait for others):45```46add_todo(47 content="Description of dependent work",48 project="orch-{name}",49 status="blocked",50 blocked_on="ORCH-1,ORCH-3",51 tags=["orchestration", "batch:2"]52)53```5455The `blocked_on` field is comma-separated short IDs. The `batch:N` tag groups tasks by execution wave.5657### Dependency rules58- A task blocked on `"ORCH-1,ORCH-3"` cannot start until BOTH are done59- Keep dependency chains shallow (max 3-4 levels deep)60- Maximize parallelism — identify tasks that are truly independent61- Never create circular dependencies6263### Present the plan6465Show the user the task graph before executing:6667```68Project: orch-refactor-auth (ORCH)6970Batch 1 (parallel):71 ORCH-1: [todo] Extract JWT utilities into auth/tokens.ts72 ORCH-2: [todo] Create password hashing module7374Batch 2 (after batch 1):75 ORCH-3: [blocked on ORCH-1] Update login endpoint76 ORCH-4: [blocked on ORCH-1] Update token refresh endpoint77 ORCH-5: [blocked on ORCH-2] Update registration endpoint7879Batch 3 (after batch 2):80 ORCH-6: [blocked on ORCH-3,ORCH-4,ORCH-5] Integration tests81```8283Wait for user approval before dispatching.8485## Phase 2: Dispatch8687### Find unblocked work8889```90list_todos(project="orch-{name}", status=["todo"])91```9293### For each unblocked todo:94951. Mark it in-progress:96```97update_todo(todo_id="ORCH-N", status="in_progress")98```991002. Spawn a Task agent with the todo tag in the prompt:101102**CRITICAL:** Every Task prompt MUST start with `[ORCH-TODO:ORCH-N]` where N is the todo's sequence number. The PostToolUse hook extracts this tag to automatically complete the todo and unblock dependents.103104```105Task(106 description="ORCH-N: brief summary",107 prompt="[ORCH-TODO:ORCH-N] Full detailed instructions for the agent...",108 subagent_type="general-purpose"109)110```1111123. Spawn independent tasks in parallel — make multiple Task calls in a single response.113114### Choose the right agent type115116| Agent Type | Best For |117|---|---|118| `Explore` | Research, codebase exploration, finding patterns |119| `Plan` | Architecture design, trade-off analysis |120| `Bash` | Running commands, builds, deployments |121| `general-purpose` | Code changes, implementation, multi-step work |122123### Include sufficient context in each prompt124125Each agent runs in isolation. Include in every Task prompt:126- What files to look at or modify127- What the expected output/deliverable is128- Any constraints or patterns to follow129- Context from previously completed tasks (copy relevant resolution comments)130131## Phase 3: Monitor & Continue132133After agents return, the PostToolUse hook automatically:134- Adds the agent's result as a Resolution comment on the matching todo135- Completes the todo136- Unblocks dependent todos (removes from `blocked_on`, changes status to `todo`)137138### Check project state139140```141list_todos(project="orch-{name}")142```143144Review the status:145- `done` — completed by agents146- `todo` — newly unblocked, ready for next batch147- `blocked` — still waiting on dependencies148- `in_progress` — agents still running149- `cancelled` — failed permanently150151### Dispatch next batch152153If there are `todo` status items, repeat Phase 2 for the next batch. Continue until all todos are `done` or `cancelled`.154155### Summarize results156157When all todos are complete:1581. List all resolution comments to gather agent outputs1592. Synthesize a summary for the user1603. Note any cancelled tasks and why161162## Handling Failures163164When a Task agent returns an error or incomplete result:1651661. Add a Progress comment documenting the failure:167```168add_todo_comment(169 todo_id="ORCH-N",170 content="Agent failed: {error description}",171 comment_type="progress"172)173```1741752. Retry (max 2 attempts) with additional context:176```177Task(178 prompt="[ORCH-TODO:ORCH-N] RETRY: Previous attempt failed because {reason}. {updated instructions}...",179 subagent_type="general-purpose"180)181```1821833. If retry fails, cancel the todo:184```185update_todo(todo_id="ORCH-N", status="cancelled", notes="Failed after 2 retries: {reason}")186```1871884. Check if cancelled todo blocks other work — inform the user and ask how to proceed.189190## Cross-Session Continuity191192If a session ends mid-orchestration, the todo state persists. On the next session:1931941. Check for in-progress orchestration projects:195```196list_projects()197list_todos(project="orch-{name}")198```1992002. Resume from where you left off — dispatch any `todo` status items.201202## Example203204User: `/orchestrate Add comprehensive error handling to the API layer`205206**Planning:**207```208Project: orch-api-error-handling (ORCH)209210ORCH-1: [todo] Audit current error handling patterns across all handlers211ORCH-2: [todo] Design error response format and error codes enum212ORCH-3: [blocked on ORCH-1,ORCH-2] Implement centralized error middleware213ORCH-4: [blocked on ORCH-3] Update all handler functions to use new error types214ORCH-5: [blocked on ORCH-4] Add error handling integration tests215```216217**Batch 1 dispatch (parallel):**218```219Task("[ORCH-TODO:ORCH-1] Explore the codebase and audit...", subagent_type="Explore")220Task("[ORCH-TODO:ORCH-2] Design an error response format...", subagent_type="Plan")221```222223**After batch 1 completes:**224- Hook auto-completes ORCH-1 and ORCH-2225- Hook unblocks ORCH-3 (both blockers resolved)226- Claude dispatches ORCH-3227228**Continue until ORCH-5 is done.**229
Full transparency — inspect the skill content before installing.