Skip to content

Add pi package wrapper and tests for pi skill loading - #28

Open
snorfyang wants to merge 2 commits into
NVIDIA:mainfrom
snorfyang:snorfyang/pi-package-support
Open

snorfyang wants to merge 2 commits into
NVIDIA:mainfrom
snorfyang:snorfyang/pi-package-support

Conversation

@snorfyang

Copy link
Copy Markdown

PR description

pi is an agent runtime that consumes Agent Skills, but it discovers skills through its own package system: a package.json manifest whose pi.skills field maps to directories containing SKILL.md. This PR makes the repository double as a pi package, so pi users get first-class installation instead of hand-copying the skill directory:

  • package.json maps pi.skills to skills/, enabling:

    pi install git:github.com/NVIDIA/nvidia-kaggle

    or a settings-based reference to a local checkout (updates with git pull):

    { "skills": ["/absolute/path/to/nvidia-kaggle/skills"] }
  • tests/test_pi_package.py validates the wrapper and the skill against pi's skill rules: frontmatter name/description constraints, pi.skills path mapping to a discoverable */SKILL.md, integrity of ./-prefixed references in SKILL.md, bundled script compilation, evals manifest parsing, and that no credential artifacts are shipped

  • tests/test_pi_smoke.py spawns the real pi CLI (opt-in via RUN_PI_SMOKE=1) to verify end-to-end skill discovery and /skill:nvidia-kaggle-skill routing

  • README: adds a pi section alongside the existing Codex and Claude Code paths

No changes to the skill itself, the plugin manifests, or any workflow.

Checklist

  • Tests pass (uv run pytest) — 71 passed, 14 skipped
  • All commits are signed off (DCO) using git commit -s
  • License header (SPDX-FileCopyrightText / SPDX-License-Identifier) is included on new non-markdown code files
  • The change stays focused on one workflow where possible (see CONTRIBUTING.md)
  • Credentials are read from KAGGLE_API_TOKEN (or another env var) — no .env, kaggle.json, or account artifacts committed
  • (new/changed workflow) N/A — no workflow changed
  • (plugin change) N/A — manifests untouched (claude plugin validate . passes)

🤖🤖🤖

- package.json maps pi.skills to skills/ so pi discovers the skill via
  'pi install git:github.com/snorfyang/nvidia-kaggle'
- tests/test_pi_package.py validates the wrapper and the skill against
  pi's Agent Skills rules: frontmatter name/description constraints,
  pi.skills path mapping, './'-prefixed reference integrity, bundled
  script compilation, evals manifest, and no shipped credentials
- tests/test_pi_smoke.py spawns the real pi CLI (RUN_PI_SMOKE=1) to
  verify skill discovery and /skill:nvidia-kaggle-skill routing
- README: document pi installation alongside Codex and Claude Code

Signed-off-by: snorfyang <snorfyang@gmail.com>
Signed-off-by: snorfyang <snorfyang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant