pi-init
Initialize a pi package project after cloning from pi-package-template. Run once at the start of development to verify the development environment is set up correctly. Use when the user says "init", "setup", "initialize", "check environment", "pi-init", or asks to verify their pi package development setup. Also use when the user says they just cloned the template or wants to start developing a pi package. Do not use for general pi package development tasks (use pi-package) or for running tests.
- License 许可
- MIT
- 最近更新
- 2026-05-17
- Stars
- ★ 5
- Forks
- 1
01 前言 Front Matter
- name
- pi-init
- description
- Initialize a pi package project after cloning from pi-package-template. Run once at the start of development to verify the development environment is set up correctly. Use when the user says "init", "setup", "initialize", "check environment", "pi-init", or asks to verify their pi package development setup. Also use when the user says they just cloned the template or wants to start developing a pi package. Do not use for general pi package development tasks (use pi-package) or for running tests.
02 资源文件 6
- 资产文件assets/template.md469 B
- 参考文档references/00-INTRO.md1.3 KB
- 参考文档references/01-METADATA.md1.2 KB
- 参考文档references/02-REQUIREMENTS.md1.5 KB
- 参考文档references/03-RENAME.md3.7 KB
- 参考文档references/04-DOCS.md2.1 KB
03 SKILL.md 正文
Pi Package Project Initialization
This skill walks through a checklist to verify that a pi package development
environment is correctly configured. It writes findings to a state file in the
project root (.pi-init.md) so progress is persisted between sessions.
Official Pi Documentation
If you need to look up APIs or verify behavior during initialization, see pi's installed docs:
# Find the docs directory
npm root -g # → <dir>/@earendil-works/pi-coding-agent/docs/
Key documents: extensions.md, skills.md, themes.md, packages.md.
Overview
The checklist has a welcome step followed by four execution steps. Each step collects information and records the result in the state file. If the skill is interrupted, it reads the state file on the next invocation and resumes from where it left off.
- Welcome — Display overview and ask user to confirm readiness
- Metadata — Extract package name and GitHub username
- Requirements — Verify required tools are installed
- Rename — Replace template placeholders with the user's package name and info
- Docs — Update README and AGENTS.md with the user's package description
State file
The state file lives at .pi-init.md in the project root. It doubles as the
progress tracker and the final report.
- On first run: display the welcome message (step 0). Only create the state file after the user confirms readiness.
- On resume: read
.pi-init.md, find the first unchecked step, and skip any already-passed steps (don't re-verify them). If the state file exists, skip step 0. - After each sub-step: update the file with findings (fill in the sections, check off boxes)
- Add
.pi-init.mdto.gitignoreso it doesn't pollute the repo
Steps that have sub-checks use indented checkboxes. When resuming, skip to the first unchecked box at any level.
Step execution
For each step, read the corresponding reference file and follow its instructions. Update the state file after completing each step.
| Step | Reference file | What it does |
|---|---|---|
| 0. Welcome | references/00-INTRO.md |
Display welcome message and overview, ask user to confirm |
| 1. Metadata | references/01-METADATA.md |
Extract package name from directory, GitHub username from git remote |
| 2. Requirements | references/02-REQUIREMENTS.md |
Check that node, npm, pi, biome, typescript are installed |
| 3. Rename | references/03-RENAME.md |
Derive package identifiers, rename files and replace content, verify, commit |
| 4. Docs | references/04-DOCS.md |
Collect package description, update README and AGENTS.md |
Severity levels
- ❌ Failure — a required check did not pass. The user must fix this.
- ⚠️ Warning — an optional/recommended check did not pass. Suggest the fix but don't block progress.
- ✅ Pass — check passed.
Important notes
- Ask the user before proceeding through each step. Don't run the whole checklist silently — this is meant to be interactive and educational.
- If something fails, explain why and suggest how to fix it. The user may be new to pi package development.
- The state file uses markdown checkboxes (
- [ ]/- [x]) to track progress. Keep the format consistent so resume works reliably. - Never modify files outside the project without explicit approval.
Completion message
When all 4 steps are complete (all checkboxes checked), display a final message:
🎉 Initialization complete! Here's what was set up:
- ✅ Package metadata extracted
- ✅ Development requirements verified
- ✅ Template renamed from
pi-package-template→<package-name> - ✅ Documentation updated with your package description
Suggested next steps:
-
Review and delete
.pi-init.md— This file tracked progress during initialization. Review it if you like, then remove it. It's already in.gitignoreso it won't affect your repo. -
Implement your extension — Edit
extensions/index.tsto add your tools, commands, and event handlers. Use thepi-packageskill for patterns and best practices. -
Test your package — Run
pi -ne -e . --no-session -p "Call your tool"to verify tools work, orpi -ne -e . --no-sessionfor interactive testing.
Fill in <package-name> with the actual package name from step 3. Adapt the recap
naturally based on what actually happened (e.g., if some steps had warnings).
04 同仓库更多 Skills
hello
暂无简介
pi-test
Test pi package TUI components using pilotty for PTY-based terminal automation. Use when the user wants to test, verify, or validate TUI components built with pi-tui in their pi package — interactive selectors, overlays, dialogs, custom editors, status indicators, or any ctx.ui.custom() output. Also use when the user says "test the TUI", "verify the UI renders", "check my component", "run pilotty", "test my extension's UI", or asks about TUI testing strategies for pi packages. Do not use for unit testing non-TUI code, linting, type checking, or testing tools that only return text without rendering a TUI.
pi-package
Pi package development best practices and patterns. Use when planning, editing, implementing, or reviewing pi package code — structuring a new package, writing extensions, registering tools, commands, events, skills, prompt templates, or themes. Also use when the user asks about package architecture, conventions, or "how should I implement" a pi package feature. Do not use for general TypeScript development unrelated to pi packages, or for running tests (use pi-test skill if it exists).