Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

delegate

БесплатноБез исполняемых скриптовНе проверен

Delegates a coding task to pi (dev/pi), a minimal terminal coding harness. This skill should be used when the user asks to "use pi", "run pi", "delegate to…

FradSerот FradSer★ 598 звёзд на GitHub

Об этом скилле

CRITICAL: pi CLI Integration

This skill delegates a task to the pi CLI tool (@earendil-works/pi-coding-agent) via the dedicated pi:pi-agent execution layer. Config is read endpoint-first (same format as /pi:review); legacy flat fields remain as a fallback.

CRITICAL: No Bypass — pi MUST Run

Execute every task through pi:pi-agent — never answer the task yourself. NEVER:

  • judge a task "too simple", "not worth pi", "just a question", or "already satisfied" and answer it yourself;
  • perform the task's edits yourself instead of delegating;
  • stop after resolving settings without launching pi:pi-agent;
  • fall back to running pi directly if pi:pi-agent fails to start or hangs — report the failure and stop.

Even a trivial-looking task still launches pi-agent — the delegation contract IS the point. Valid early exits are only: pi not installed (blocked below), and the settings-only flags --edit-config / --list-models (which stop by design). --doctor still runs pi, via pi:pi-agent.

Mechanical enforcement: disallowed-tools: ["Bash(pi:*)"] hard-removes direct pi invocations from this skill's turn, so running pi yourself is impossible — not just discouraged. If you ever catch yourself reaching for pi outside pi:pi-agent, you have violated the contract: stop and launch pi:pi-agent instead.

Before Execution: Check Installation

# Check if pi is installed
command -v pi >/dev/null 2>&1

If not installed, tell the user:

pi is not installed. Install it globally:

  npm install -g @earendil-works/pi-coding-agent

Or via the standalone installer:

  curl -fsSL https://pi.dev/install.sh | sh

Then stop — do not proceed without pi installed.

Persistent Settings

User preferences persist across invocations via JSON files. The resolution chain (highest priority first):

  1. CLI flag (from $ARGUMENTS)
  2. .claude/pi.local.json — project-specific overrides, gitignored
  3. .claude/pi.json — project shared defaults, committed
  4. ~/.claude/pi.local.json — global user-wide defaults
  5. pi's own defaults (pi decides its own default provider and model)

Provider/model/baseUrl/apiKey come from these files (or CLI flags). API keys reach pi via --api-key — nothing is written to models.json except baseUrl. pi itself reads the usual provider env vars (OPENAI_API_KEY, etc.) as its own last-resort defaults.

Settings file format

The settings file uses the same named-endpoint format as /pi:review — endpoint-first. Legacy flat fields (provider, model, baseUrl, apiKey) are still honored as a fallback when no defaultEndpoint is set, so existing configs keep working.

Values can reference environment variables using $VAR or ${VAR} syntax — they are resolved at read time.

{
  "endpoints": {
    "local-proxy": {
      "provider": "openai",
      "baseUrl": "http://10.10.0.195:8317/v1",
      "models": ["gemini-3.6-flash-high", "gemini-3.6-pro"]
    }
  },
  "defaultEndpoint": "local-proxy",
  "defaultModel": "gemini-3.6-flash-high"
}

Each endpoint key has provider (required), optional baseUrl, optional apiKey, and models (array). Only include fields you want to override — partial files merge per-field across the chain.

Note on precedence: endpoint-first resolution means that once a defaultEndpoint exists anywhere in the merged chain, the active endpoint wins and a project's legacy flat fields (provider/model/baseUrl) are ignored for that key. If you need a project to override the global endpoint, set that project's .claude/pi.local.json defaultEndpoint to its own endpoint — the flat fields are only consulted when no defaultEndpoint is set at all.

Reading settings

Read the settings files in priority order (lowest first, so each overrides the previous), resolving endpoint-first with flat-field fallback, CLI --endpoint/--model/--api-key overrides, and the model-ownership check. The full snippet lives in references/settings.md — run it before building the pi-agent prompt so $PROVIDER/$MODEL/$ENDPOINT/$API_KEY/$BASE_URL are resolved. It yields PROVIDER, MODEL, ENDPOINT, API_KEY, BASE_URL, THINKING, TOOLS, EXCLUDE_TOOLS, WITH_PACKAGES.

--edit-config flag

When $ARGUMENTS is exactly --edit-config (with optional scope flag), open the settings file for editing. Three scopes matching the three priority tiers:

Scope Flag Path Description Git
Project personal --edit-config (default) or --edit-config --local .claude/pi.local.json Per-project overrides gitignored
Project shared --edit-config --shared .claude/pi.json Team defaults, committed tracked
Global personal --edit-config --global or --edit-config -g ~/.claude/pi.local.json User-wide across all projects user home

Shared scope (--shared) is committed to git — never put a liter

Полный SKILL.md на GitHub

Установить delegate в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Task
Bash(git:*)
Bash(jq:*)
Bash(ls:*)
Bash(find:*)
Bash(cat:*)
Bash(mkdir:*)
Bash(mv:*)
Bash(echo:*)
Bash(command -v:*)
Bash(grep:*)
Bash(head:*)
Bash(vi:*)
Read
Grep
Glob

Вложенные файлы

references/doctor.mdreferences/settings.md

FAQ

Что делает скилл delegate?

Delegates a coding task to pi (dev/pi), a minimal terminal coding harness. This skill should be used when the user asks to "use pi", "run pi", "delegate to pi", "let pi handle this", "ask pi to", "have pi do", or invokes /pi:delegate. It bridges the current Claude Code context to the pi CLI, passing relevant files, git state, and the task description for execution by the pi-agent.

Как установить скилл delegate?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл delegate запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить delegate с