一键导入
package-pi-github-tools
Package-specific context for @gotgenes/pi-github-tools. Load when working on code, tests, or docs in packages/pi-github-tools/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Package-specific context for @gotgenes/pi-github-tools. Load when working on code, tests, or docs in packages/pi-github-tools/.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Vitest mock patterns (vi.mock, vi.hoisted, vi.fn reset), TDD planning rules, and general test strategy. Load when writing or debugging tests.
Pre-completion protocol for implementation agents — gather context, dispatch the pre-completion-reviewer subagent, and handle its report before writing stage notes and recommending /ship-issue. Load at the end of /tdd-plan and /build-plan after all implementation steps are complete.
Package-specific context for @gotgenes/pi-permission-system. Load when working on code, tests, or docs in packages/pi-permission-system/.
TypeScript conventions, code design principles (SOLID, self-documenting code, file organization), structural design heuristics (dependency width, LoD, output arguments), pnpm rules, ES2024 target, Pi SDK patterns, and Biome/ESLint conflict workarounds. Load during implementation, refactoring, or code review.
Review a module's dependency and structural patterns for code smells. Use when adding a parameter to a shared interface, when a dependency bag grows past 5 fields, or when planning a refactoring that touches wiring between layers.
Heuristics and process for discovering structural improvements in a package. Load when planning a new improvement round — contains the smell taxonomy, analysis workflow, and prioritization framework distilled from 10 phases of pi-subagents refactoring.
| name | package-pi-github-tools |
| description | Package-specific context for @gotgenes/pi-github-tools. Load when working on code, tests, or docs in packages/pi-github-tools/. |
Pi extension that registers deterministic GitHub CI, release, and issue tools via pi.registerTool().
Replaces ad-hoc gh CLI polling with structured tools that have exponential backoff, progress streaming, and structured success/timeout returns.
Portable business logic in src/lib/ — no Pi SDK imports.
Thin Pi wrappers in src/tools/ register each tool and map onProgress to Pi's onUpdate.
src/extension.ts is the Pi extension entry point.
src/
├── extension.ts # default export: registers all tools
├── tool-result.ts # AgentToolResult builders
├── tools/ # Pi tool wrappers (one per tool)
├── lib/ # portable business logic
│ ├── ci.ts # findRun, watchRun, listRuns
│ ├── ci-helpers.ts # CIJob, findRetryDelay, formatProgress
│ ├── config.ts # config loading and normalization
│ ├── release.ts # findReleasePR, mergeReleasePR, watchRelease
│ ├── issue.ts # closeIssue
│ ├── github.ts # gh(), ghJson(), git(), detectRepo()
│ └── process.ts # runCommand(), sleep()
└── progress.ts # maps onProgress → Pi onUpdate
src/lib/ must not import from @earendil-works/pi-coding-agent — only src/tools/ and src/progress.ts touch Pi types.gh CLI is the sole external binary dependency.Extension-owned JSON config, project overriding global (same pattern as pi-colgrep):
<agentDir>/extensions/pi-github-tools/config.json<cwd>/.pi/extensions/pi-github-tools/config.jsondefaultMergeMethod ("rebase" | "squash" | "merge"): fallback merge method for release_pr_merge when the tool call omits method.
Missing or malformed config files are tolerated silently; invalid values are dropped by normalizeConfig.
runCommand in lib/ tests to avoid real gh calls — every lib test should run offline.tools/ wrappers are thin and tested lightly.