# Pi Delegate

Delegate a coding task to the Pi coding agent CLI (`pi`) as a background implementer...

- Repository: https://github.com/amElnagdy/delegate-skills (2546 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add amElnagdy/delegate-skills --skill pi-delegate -g -a claude-code -y`
Codex: `npx skills add amElnagdy/delegate-skills --skill pi-delegate -g -a codex -y`
Cursor: `npx skills add amElnagdy/delegate-skills --skill pi-delegate -g -a cursor -y`
Gemini CLI: `npx skills add amElnagdy/delegate-skills --skill pi-delegate -g -a gemini-cli -y`

## Description

Delegate a coding task to the Pi coding agent CLI (`pi`) as a background implementer, then review its diff and land it yourself. Use this whenever the user wants to delegate implementation work to Pi - phrasings like "have Pi implement X", "delegate this to pi", "run it through Pi", or "use pi to implement/fix/refactor" - or wants to run a queue of coding tasks through Pi while staying the reviewer. DO NOT USE for tasks small enough to do inline, or when the user wants the code written directly without delegating.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Pi Delegate

You are the **orchestrator**. Delegate a bounded coding task to a separate **implementer** - the Pi
coding agent CLI - then review what it produced and land it yourself. You write the brief and own
the judgment; the implementer makes changes in its own session; you verify and commit.

The loop needs only a shell command and file access, so any comparable orchestrator can drive it.

## When NOT to use this

- The task is small enough to do inline; delegation overhead is not worth it.
- The `pi` CLI is not installed or authenticated.
- You need a sandboxed implementer. Pi has no sandbox and no permission modes; `--read-only`
  restricts the tool surface, but a write-capable run executes without prompts.

## Prerequisites (check once)

1. Install pi with `npm install -g @earendil-works/pi-coding-agent`.
2. Authenticate: `/login` inside pi for a subscription provider, or an API-key environment
   variable / `pi`'s auth file for an API-key provider.
3. Confirm `pi --version` succeeds.
4. Work in, or point `--cd` at, the target git repository.

## Choose the model (optional)

Omit `--model` to use pi's configured default. To pick another, choose from `pi --list-models`
and pass an explicit id or pattern like `<provider>/<model-id>` or `sonnet:high`. The relay
accepts letters, digits, and `. _ : / -` only (the value reaches a shell on Windows), so glob
patterns with `*` are not forwarded.

## The loop

Run these five steps per task. Steps 1, 4, and 5 require judgment; 2 and 3 are mechanical.

### 1. Write the brief

The rest: https://github.com/amElnagdy/delegate-skills/blob/HEAD/skills/pi-delegate/SKILL.md
