---
name: Delegate
slug: delegate
category: AI Engineering
description: Delegate hands a self-contained task to another AI agent peer on a chosen backend and tracks it through ask/ack. Use it when you want to offload work to a specific agent and follow the result to completion.
github: "https://github.com/prassanna-ravishankar/repowire/tree/main/skills/delegate"
language: Go
stars: 260
forks: 34
install: "npx degit https://github.com/prassanna-ravishankar/repowire/tree/main/skills/delegate ~/.claude/skills/delegate"
installs_to: ~/.claude/skills/delegate
source_path: skills/delegate/SKILL.md
collection_size: 17
category_size: 2631
collection_url: "https://dirskills.com/collections/prassanna-ravishankar/repowire"
added: 2026-09-02T05:20:16.533Z
last_synced: 2026-09-02T05:20:16.533Z
canonical_url: "https://dirskills.com/skills/delegate"
---

# Delegate

Delegate hands a self-contained task to another AI agent peer on a chosen backend and tracks it through ask/ack. Use it when you want to offload work to a specific agent and follow the result to completion.

**Install:**

```bash
npx degit https://github.com/prassanna-ravishankar/repowire/tree/main/skills/delegate ~/.claude/skills/delegate
```

## README

# Delegate a task to a peer

Hand a self-contained task to a peer on a chosen backend and track it via the
ask/ack lifecycle.

## Resolve the delegate backend

1. **Explicit argument** — if the user named a backend, use it.
2. **Configured default** — else:
   ```bash
   repowire config get skills.default_delegate_backend
   ```
3. **Safe fallback** — else ask the user which backend to delegate to. Don't
   hardcode one. (Unlike review/plan, delegation MAY target your own backend —
   delegating to another claude-code peer is legitimate.)

## Choose / create the executor

1. **Prefer an existing peer** on the chosen backend (idle if possible):
   - MCP: `list_peers()` → pick an online peer with the right backend.
   - CLI: `repowire peer list`.
2. **Spawn only if none exists AND the user is clearly delegating** (don't spawn
   silently). Confirm before spawning:
   - MCP: `spawn_peer(path, backend=<chosen>, circle=<skills.default_circle or current>)`
   - CLI: `repowire peer new ...`
   Default circle: `repowire config get skills.default_circle` (else your current circle).

## Hand off + track

1. Send a complete, self-contained brief (the peer doesn't share your context):
   - MCP: `ask(peer_name, "<full task brief + acceptance criteria>")`
   - Tracked delegation is MCP-only (`repowire peer ask` is a synchronous test
     utility, not the ask/ack lifecycle). To close from the CLI: `repowire peer ack <cid>`.
2. `ask` returns a `correlation_id`; the peer reports back via `ack(corr_id, ...)`.
3. Track to completion; chain follow-ups with `ask(reply_to=corr_id, ...)`.

Use `notify_peer` (fire-and-forget) only for nudges, not for tracked delegation —
delegation needs the ack lifecycle.
