pi-upgrade
PI Upgrade Advisor
Upgrade pi framework dependencies, migrate legacy package names, and surface the new patterns available in the latest release.
Prerequisites
- GitHub CLI (
gh) must be installed and authenticated. - A
package.jsoncontaining either@earendil-works/pi-coding-agentor@earendil-works/pi-tui(legacy@mariozechner/*names also work).
What the script does
The bundled helper (scripts/check-pi-version) handles the mechanical work:
- Detects the current pi package version from
package.json, lockfiles, ornode_modules - Fetches release delta from
earendil-works/piviagh - Bumps version ranges across workspace
package.jsonfiles - Migrates
@mariozechner/pi-*entries to@earendil-works/pi-* - Runs the detected package manager install
- Returns structured JSON with the current version, latest version, release notes, bumped files, and install status
Dry-run is the default recommendation. The helper applies changes when run
without --dry-run, so ask the user which mode to use before invoking it.
Resolve scripts/check-pi-version relative to this SKILL.md file's directory;
do not assume the target project contains .agents/skills/pi-upgrade.
# Preview only (recommended/default)
bash "<skill-dir>/scripts/check-pi-version" --dry-run [path/to/package.json]
# Bump + install + report (only after the user chooses direct apply)
bash "<skill-dir>/scripts/check-pi-version" [path/to/package.json]
What YOU do after the helper runs
- Analyze the installed docs — Read the installed
pi-coding-agentREADME,docs/*.md, and type definitions for new features, APIs, patterns, and deprecations. - Map findings to the user's codebase — Look at the repo's existing pi extensions, skills, or config and point to specific files that could benefit.
- Generate actionable recommendations — Explain what changed, what broke, what was renamed, and what the user should do next.
Workflow
Step 1: Choose invocation mode
Before running the helper, ask the user whether to preview or directly apply:
- Dry-run (recommended/default) — no files change.
- Direct apply — bumps package ranges and installs immediately.
Do not invoke the helper until the user chooses a mode. If they already stated a preference, follow it without asking again.
Step 2: Run the helper
Run from the project root. Resolve the helper as <skill-dir>/scripts/check-pi-version,
where <skill-dir> is the directory containing this SKILL.md.
If it returns upToDate: true, congratulate the user and stop.
If it errors, surface the exact error and ask the user to fix it.
Step 3: Continue based on the selected mode
If dry-run was selected
Use the JSON output to summarize the available upgrade, release notes, and files
that would be bumped. Do not analyze node_modules/ as the latest release yet:
dry-run does not install anything, so local docs and type definitions may still be
from the old version.
After the preview, ask whether the user wants to apply the upgrade. If they
confirm, rerun the helper without --dry-run, then continue with the installed-doc
analysis below. If they decline, stop after the preview.
If direct apply was selected
The helper bumps package ranges and runs install immediately. If installExitCode
is non-zero, surface installOutput and stop; the latest docs may not be present.
If install succeeds, continue with the installed-doc analysis below.
Step 4: Read the newly installed pi docs
After the helper succeeds with applied: true and installExitCode: 0, the
latest pi docs are available in node_modules/.
- Prefer
node_modules/@earendil-works/pi-coding-agent/README.mdanddocs/*.md - If the project is still on the deprecated scope during an in-progress migration, read the matching installed path for whatever scope is actually present
- Focus on new APIs, config options, deprecations, and behavior changes that matter to the user's code
Step 5: Investigate the user's pi usage
Read the project's pi-relevant files to understand current patterns:
package.jsonpi manifest (pi.extensions,pi.prompts,pi.skills)- Extension source files (event handlers, tool registrations, UI components)
- Existing skills and prompts
- Any
CLAUDE.mdor project docs referencing pi APIs
Step 6: Generate the upgrade report
Use the helper output and the repo context to write a report that includes:
- What changed in pi
- Which files in the repo are affected
- Any breaking changes or deprecations
- Concrete follow-up steps
Step 7: Offer to apply migrations
After presenting the report, ask what the user wants to do next:
- Apply a specific migration
- Create a task list
- Leave it for later
Guardrails
- Ask before the first invocation.
- Respect version pinning; keep
^/~prefixes unless the upgrade requires it. - Handle pre-releases carefully.
- If
ghis missing, ask the user to install and authenticate it. - For private forks/mirrors, ask for the repo override before editing the helper.
- If install fails, surface
installOutputandinstallExitCode.
More from mrclrchtr/skills
agent-orchestrator
Orchestrate complex work via a phase-gated multi-agent loop (audit → design → implement → review → validate → deliver). Use when you need to split work into subsystems, run independent audits, reconcile findings into a confirmed issue list, delegate fixes in clusters, enforce PASS/FAIL review gates, and drive an end-to-end validated delivery. Do not use for small, single-file tasks.
38git-commit
Creates a commit: detects conventions, stages intentionally, writes a clear subject, add a concise body when useful, and commits.
22agent-orchestrator-standalone
Orchestrate complex work via a phase-gated multi-agent loop (audit → design → implement → review → validate → deliver). Use when you need to split work into subsystems, run independent audits, reconcile findings into a confirmed issue list, delegate fixes in clusters, enforce PASS/FAIL review gates, and drive an end-to-end validated delivery. Do not use for small, single-file tasks.
16commit
Creates a commit with repo-matching style and intentional staging.
4web-fetch-to-markdown
Fetches and normalizes http(s) web pages into clean Markdown for LLM ingestion. Use when a task includes a URL, needs to fetch docs or asks to convert web docs/articles/pages into Markdown for summarizing, quoting, diffing, or saving.
4web-design-guidelines-design
Use when creating, redesigning, or restyling a UI and Codex should establish a clear design direction before implementation.
4