drawio-skill
A skill that turns natural-language descriptions into .drawio XML and exports them to PNG / SVG / PDF / JPG via the native draw.io desktop CLI.
External references: Pi coding agent · Pi RPC mode · Pi providers A Claude Code plugin that delegates reviews and coding tasks to the Pi coding agent. Adapted from codex-plugin-cc, runtime swapped from Codex to Pi.
A skill that turns natural-language descriptions into .drawio XML and exports them to PNG / SVG / PDF / JPG via the native draw.io desktop CLI.
FAQ
pi-plugin-cc is a Claude Code plugin with 3 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes pi-cli-runtime, pi-prompting, pi-result-handling. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
> /plugin marketplace add Agents365-ai/pi-plugin-cc> /plugin install pi@agents365-pi
Repo: Agents365-ai/pi-plugin-cc
English · 中文
External references: Pi coding agent · Pi RPC mode · Pi providers
A Claude Code plugin that delegates reviews and coding tasks to the Pi coding agent. Adapted from codex-plugin-cc, runtime swapped from Codex to Pi. Also usable from OpenAI's Codex CLI — see Use from Codex.
The hard dependency is pi, not any particular LLM. Pi can be configured for DeepSeek, OpenAI, Anthropic, Google, Ollama, LM Studio, or any OpenAI-compatible endpoint via ~/.pi/agent/models.json. The plugin defers all model selection to pi unless you override per command.
/pi:parallel-rescue runs multiple independent tasks concurrently via pi-subagents/pi:review --shards <N> splits a large diff's changed files across N review jobs that run in parallel, then merges the findingsstatus, result, cancel, and stop-time review gatecodex login requiredIntegrates with pi-subagents (pi install npm:pi-subagents): /pi:setup detects it and lists the agent profiles, /pi:rescue prompts advertise the subagent tool to Pi, and /pi:parallel-rescue fans multiple tasks out to parallel child agents (scout, researcher, planner, worker, reviewer, …).
Codex's broker layer is gone — Pi is one-conversation-per-process, so the plugin spawns a fresh pi --mode rpc for each task. Background jobs are tracked in workspace-scoped state files. Review prompts inline the JSON schema since Pi has no outputSchema knob.
| Command | What it does |
|---|---|
/pi:setup | Verifies pi is installed + a provider is configured; toggles the stop-time review gate |
/pi:review | Standard code review of local git state |
/pi:adversarial-review | Steerable challenge review — questions the approach itself |
/pi:rescue | Delegate investigation or implementation to a Pi run via the pi:pi-companion-forwarder subagent |
/pi:parallel-rescue | Run multiple independent tasks in parallel via pi-subagents (subagent({ tasks }) fan-out) |
/pi:status [job-id] | List active / recent Pi jobs in this repository |
/pi:result <job-id> | Show the stored final output for a finished job |
/pi:cancel <job-id> | Terminate a running background job |
Every command accepts --model <id> to pin a specific model just for that run. With no --model and no env override (see Pick your model), pi falls back to whatever it has configured by default.
# 1. Install pi (required)
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
# 2. Configure a provider — pick one
export OPENAI_API_KEY=sk-... # OpenAI
export ANTHROPIC_API_KEY=sk-ant-... # Anthropic
export GOOGLE_API_KEY=... # Google
export DEEPSEEK_API_KEY=sk-... # DeepSeek
# or run a local model: see https://github.com/earendil-works/pi (Ollama / LM Studio)
# 3. Verify pi sees a model
pi --list-models | head
Install the plugin in Claude Code:
> /plugin marketplace add Agents365-ai/pi-plugin-cc
> /plugin install pi@agents365-pi
> /reload-plugins
> /pi:setup
/pi:setup returns a readiness report. If pi is missing and npm is on PATH, it offers to install it for you.
> /pi:review
> /pi:review --base main
> /pi:review --model claude-sonnet-4
> /pi:review --out-file review.md
> /pi:adversarial-review focus on the new auth middleware
> /pi:rescue investigate why the Windows CI build is failing
> /pi:rescue --background --model gpt-4o refactor src/payments/
> /pi:parallel-rescue "audit the auth module" "benchmark the db queries" "update the API docs"
> /pi:status
> /pi:status task-mpgyiwb9-e3k641 --wait
> /pi:result task-mpgyiwb9-e3k641
> /pi:cancel task-mpgyiwb9-e3k641
--effort <off|minimal|low|medium|high|xhigh|max> is passed through to Pi via set_thinking_level. Models that do not support thinking silently ignore it (the plugin logs a one-line note to stderr when this happens).
--out-file <path> (on /pi:review, /pi:adversarial-review, /pi:rescue, /pi:result) writes Pi's full output to a file and returns only a short summary — verdict, finding counts, one line per finding. The heavy reasoning already runs on the cheaper model; this also keeps the large result out of the calling agent's context, so a big review doesn't burn Claude Code tokens on the relay. Open the file for the full detail.
--incremental (on /pi:review, /pi:adversarial-review) reviews only the commits since the last review on the current branch, using a per-branch cache of the last-reviewed commit — saving Pi input tokens and time by skipping the code that was already reviewed. Falls back to a full review when there is no valid cache.
The core of this plugin is a harness-agnostic CLI (pi-companion.mjs) — any coding agent that can run shell commands can drive it. For OpenAI's Codex CLI, install the bundled custom prompts:
# 1. Clone the repo (anywhere; ~/pi-plugin-cc is the default the prompts assume)
git clone https://github.com/Agents365-ai/pi-plugin-cc ~/pi-plugin-cc
# 2. Install the Codex custom prompts
mkdir -p ~/.codex/prompts
cp ~/pi-plugin-cc/codex-prompts/*.md ~/.codex/prompts/
# 3. If you cloned somewhere else, point the prompts at it
echo 'export PI_PLUGIN_ROOT="$HOME/path/to/pi-plugin-cc"' >> ~/.zshrc
Then inside Codex: /pi-review, /pi-adversarial-review, /pi-rescue, /pi-parallel-rescue, /pi-status, /pi-result, /pi-cancel, /pi-setup (note - instead of : — Codex prompt names cannot contain colons).
Not available under Codex: the stop-time review gate and session-resume prompts (both rely on Claude Code hooks / subagents). Everything else — including pi-subagents parallel fan-out — works the same.
One reviewer has blind spots; a panel doesn't share them. Passing --models to either review command runs the same diff through several models in parallel and merges their findings — issues reported by 2+ models rank first with a found by: tag:
> /pi:review --models deepseek-v4-flash,claude-sonnet-4-6,gpt-5-mini
> /pi:adversarial-review --models deepseek-v4-pro,o1 focus on concurrency
PI_PLUGIN_FALLBACK_MODELS chain — the panel itself is the redundancy.Set a fallback chain once, and any failed run — provider outage, auth error, exhausted retries — is automatically retried with the next model:
export PI_PLUGIN_FALLBACK_MODELS=deepseek-v4-flash,MiniMax-M3
Applies to reviews and rescue tasks alike. When a fallback produced the result, the output ends with a Model fallback: note (and the JSON payload carries modelAttempts). /pi:setup shows the configured chain.
For hard problems, run the same rescue task with several models in parallel and pick the winner:
> /pi:rescue --race deepseek-v4-pro,claude-sonnet-4-6 fix the flaky retry logic in src/queue.mjs
> /pi:rescue --race deepseek-v4-flash,gemini-2.5-pro why does the Windows CI build fail?
--write, the /pi:rescue default): each racer works in an isolated git worktree created from HEAD — racers can never touch your working tree or each other. Each racer's result is captured as a patch; review them and apply exactly one with git apply <patch>.--model or --resume (each racer starts a fresh session). Racers start from HEAD, so commit or stash first if the task concerns uncommitted work.The plugin keeps three layers of model resolution:
| Priority | Source | Example |
|---|---|---|
| 1 | --model <id> on the slash command | /pi:review --model gpt-4o |
| 2 | Env var (review / adversarial-review only) | export PI_PLUGIN_REVIEW_MODEL=deepseek-v4-flashexport PI_PLUGIN_ADVERSARIAL_REVIEW_MODEL=deepseek-v4-pro |
| 3 | Pi's own configured default | whatever your ~/.pi/agent/models.json has, or /model last picked in pi TUI |
Layer 1 wins over layer 2 wins over layer 3. None of the layers are required — leave them all unset and pi picks for you.
These are opinions, not requirements. Pick what fits your latency / cost / quality budget.
| Provider | Everyday review (/pi:review) | Adversarial review (/pi:adversarial-review) |
|---|---|---|
| DeepSeek | deepseek-v4-flash | deepseek-v4-pro |
| OpenAI | gpt-4o-mini or gpt-5-mini | o1 or gpt-5 |
| Anthropic | claude-haiku-4-5 | claude-sonnet-4-6 or claude-opus-4-7 |
gemini-2.5-flash | gemini-2.5-pro | |
| Local (Ollama) | qwen2.5-coder:7b | qwen2.5-coder:32b or deepseek-r1 |
To make these defaults sticky:
export PI_PLUGIN_REVIEW_MODEL=claude-haiku-4-5
export PI_PLUGIN_ADVERSARIAL_REVIEW_MODEL=claude-sonnet-4-6
The whole point of driving Pi is that you are not locked to Claude or GPT. These models cost a fraction of the frontier Claude/GPT tiers and, while not quite as strong, are more than good enough for everyday review and rescue work. Configure them in ~/.pi/agent/models.json (most are OpenAI-compatible endpoints) and use the exact id your provider exposes — verify with pi --list-models.
| Provider | Suggested model(s) |
|---|---|
| DeepSeek | deepseek-v4-flash (everyday) · deepseek-v4-pro (adversarial) |
| xAI | grok-4.5 |
| Zhipu (GLM) | glm-5.1 · glm-5.2 (heavier) |
| Moonshot (Kimi) | kimi-k3 (or kimi-k2.6) |
| MiniMax | MiniMax-M3 |
| ByteDance (Seed) | doubao-seed-2.1-pro |
| Xiaomi (MiMo) | mimo-v2.5 (everyday) · mimo-v2.5-pro (heavier) |
| Meta | muse-spark-1.1 |
…and any other OpenAI-compatible endpoint you configure. Availability and the exact id depend on your ~/.pi/agent/models.json.
Not every model emits clean JSON for the structured review commands. If
/pi:reviewfails with a parse error on a given model, it is still fine for/pi:rescue(free-form) — or add it to aPI_PLUGIN_FALLBACK_MODELSchain so a flaky member is retried with the next one. (Observed: some MiniMax and local models echo the prompt back instead of returning JSON.)
The minimum is a single env var with your API key. For richer setups, write ~/.pi/agent/models.json:
{
"providers": {
"deepseek": { "apiKey": "sk-..." },
"openai": { "apiKey": "sk-..." },
"anthropic":{ "apiKey": "sk-ant-..." },
"google": { "apiKey": "..." },
"openrouter": {
"api": "openai-completions",
"apiKey": "sk-or-v1-...",
"baseUrl": "https://openrouter.ai/api/v1",
"models": [
{
"id": "deepseek/deepseek-chat",
"name": "DeepSeek via OpenRouter",
"contextWindow": 128000,
"maxTokens": 8192,
"input": ["text"]
}
]
}
}
}
Built-in providers (anthropic, openai, google, deepseek, ollama, lmstudio) only need apiKey (and optional baseUrl); pi ships their model lists. For custom OpenAI-compatible endpoints, set api: "openai-completions" and declare the models you want exposed.
Full reference: pi providers docs.
Opt in with /pi:setup --enable-review-gate. When a Claude session ends, the plugin runs a Pi adversarial review of the previous turn and can block the stop if it finds material issues. If pi is unavailable while the gate is enabled, the hook blocks (it does not silently let the session end). Disable with /pi:setup --disable-review-gate.
| Project | Niche | When to use |
|---|---|---|
| codex-plugin-cc | Same surface, runs Codex | You want OpenAI's Codex agent + ChatGPT auth |
| pi (earendil-works) | The coding agent this plugin drives | You want to use Pi directly without Claude Code |
| pi-subagents | Pi extension adding subagent tool + /run / /chain / /parallel | Powers /pi:parallel-rescue and lets /pi:rescue delegate to specialized child agents |
If this plugin helps you, consider supporting the author:
Agents365-ai
Apache License 2.0. Forked from codex-plugin-cc (Apache-2.0, OpenAI) — see NOTICE.
.claude-plugin/
marketplace.json
.gitignore
AGENTS.md
codex-prompts/
pi-adversarial-review.md
pi-cancel.md
pi-parallel-rescue.md
pi-rescue.md
pi-result.md
pi-review.md
pi-setup.md
pi-status.md
docs/
GOAL.md
pi-plugin-cc-workflow_CN.drawio
pi-plugin-cc-workflow_CN.png
pi-plugin-cc-workflow.drawio
pi-plugin-cc-workflow.png
PROTOCOL_MAP.md
LICENSE
NOTICE
package.json
plugins/
pi/
.claude-plugin/
plugin.json
agents/
pi-companion-forwarder.md
CHANGELOG.md
commands/
adversarial-review.md
cancel.md
parallel-rescue.md
rescue.md
result.md
review.md
setup.md
status.md
hooks/
hooks.json
LICENSE
NOTICE
prompts/
adversarial-review.md
parallel-rescue.md
review.md
stop-review-gate.md
schemas/
review-output.schema.json
scripts/
lib/
args.mjs
fallback.mjs
fs.mjs
git.mjs
job-control.mjs
panel.mjs
pi-rpc.mjs
pi.mjs
process.mjs
prompts.mjs
race.mjs
render.mjs
review-cache.mjs
shard.mjs
state.mjs
tracked-jobs.mjs
workspace.mjs
pi-companion.mjs
session-lifecycle-hook.mjs
stop-review-gate-hook.mjs
skills/
pi-cli-runtime/
SKILL.md
pi-prompting/
SKILL.md
pi-result-handling/
SKILL.md
README_CN.md
README.md
scripts/
bump-version.mjs
tests/
args.test.mjs
fallback.test.mjs
git.test.mjs
outfile.test.mjs
panel.test.mjs
parse-output.test.mjs
pi-status.test.mjs
process.test.mjs
race.test.mjs
review-cache.test.mjs
shard.test.mjs
state.test.mjs© 2026 Flowy · Free and open source
Built for Claude Code · Not affiliated with Anthropic