feat(skills): plugin manifests for Codex/Cursor + positional platform CLI (#507)#508
Merged
Merged
Conversation
…l platform CLI Closes #507. Adds Codex plugin manifest files at the repo root so the pup plugin can be installed alongside Claude's existing marketplace files, and extends `pup skills install` to support Cursor, Codex, and opencode as first-class platforms. - Add .codex-plugin/plugin.json and .agents/plugins/marketplace.json so Codex can discover the plugin via its native marketplace flow. - Replace ad-hoc agent+platform match arms in src/skills.rs with a single PlatformSpec table covering claude-code, cursor, codex, opencode, windsurf, gemini-code, and pi. Each spec carries project- and user-scope subpaths for skills/agents/extensions plus alias normalization. - Reshape `pup skills install` and `pup skills path`: - `--platform` becomes a positional arg accepting any platform plus `all` to install for every supported platform. - Default scope flipped to user-global (e.g. ~/.claude/skills); add `--project` for project-local installs. - `name` moves to `--name`. - Tighten error handling so typo'd platform names always validate (even with --dir), `--name`/`--type` filters that match nothing bail loudly, and auto-detect failures emit a tailored message. - Add commands::skills test module with 8 tests covering resolve_or_bail and install error paths; promote the TempDir helper into src/test_support.rs. - Update README.md, SKILL.md, docs/COMMANDS.md, and the pi extension README for the new CLI surface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jack-edmonds-dd
previously approved these changes
May 15, 2026
Per review on PR #508 — strengthen the `pup skills install <platform>` / `pup skills path <platform>` boundary by turning the positional from a free `Option<String>` into a typed `Option<skills::SkillsPlatform>`. Clap now rejects typos at parse time, lists possible values in `--help`, and the canonical names are derived from a single source. - Add `SkillsPlatform` enum in src/skills.rs alongside the `PLATFORMS` table, with `#[clap(rename_all = "kebab-case")]` and aliases for `claude`, `gemini`, and `pi-dev`. An `All` variant carries the multi-platform selector through to `resolve_platform_list`. - Wire it through the CLI in src/main.rs; route to the command layer via `as_canonical()` so commands::skills::install/path still take the plain string keys lookup_platform expects. - Lock the invariants with three tests: - `platform_enum_matches_table` — bijection between enum variants and PLATFORMS rows. - `platform_enum_aliases_match_table_aliases` — clap aliases match `PlatformSpec.aliases` so any CLI alias also resolves at runtime. - `platform_enum_all_does_not_resolve_to_a_spec` — pins down the `All` sentinel semantics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.codex-plugin/plugin.jsonand.agents/plugins/marketplace.json) sopupcan be installed alongside Claude in Codex. Cursor and opencode discover skills natively via.cursor/skillsand.opencode/skills, which the new install paths already write to.pup skills install/pup skills path: platform is now a positional arg (claude,cursor,codex,opencode,windsurf,gemini,pi, orall), default scope flips to user-global, and--projectopts back into project-local installs.namemoves to--name.src/skills.rsto a singlePlatformSpectable (replaces scattered match arms) and tightens error handling — typo'd platforms always validate (even with--dir), no-op installs from--name/--typefilters bail loudly, and auto-detect failures emit a tailored message.Breaking change
pup skills install <name>no longer works — the positional is now a platform. Usepup skills install <platform> --name <name>instead. The CLI emits a clear error listing supported platforms when given a non-platform value.Changes
.codex-plugin/plugin.json,.agents/plugins/marketplace.json— new Codex manifests at repo rootsrc/skills.rs—PlatformSpectable;lookup_platform/resolve_platform_name/resolve_platform_list(with `all` expansion);resolve_relativeextracted to dedupe path-building acrossskills_dir/agents_dir/extensions_dir_with_homevariantssrc/commands/skills.rs— new install/path command signatures;resolve_or_bailalways validates regardless of--dir; unique-entry counting for the user-facing summary and agent-mode JSON; new#[cfg(test)] mod testswith 8 testssrc/main.rs— CLI surface updated (positional platform,--project,--name)src/test_support.rs— sharedTempDirhelper used by the new testsREADME.md,SKILL.md,docs/COMMANDS.md,skills/extensions/dd-pup-pi/README.md— usage examples updatedTest plan
Closes #507
🤖 Generated with Claude Code