Skip to content

feat(skills): plugin manifests for Codex/Cursor + positional platform CLI (#507)#508

Merged
platinummonkey merged 2 commits into
mainfrom
feat/codex-cursor-plugins-507
May 15, 2026
Merged

feat(skills): plugin manifests for Codex/Cursor + positional platform CLI (#507)#508
platinummonkey merged 2 commits into
mainfrom
feat/codex-cursor-plugins-507

Conversation

@platinummonkey
Copy link
Copy Markdown
Collaborator

@platinummonkey platinummonkey commented May 15, 2026

Summary

  • Adds Codex plugin manifest files (.codex-plugin/plugin.json and .agents/plugins/marketplace.json) so pup can be installed alongside Claude in Codex. Cursor and opencode discover skills natively via .cursor/skills and .opencode/skills, which the new install paths already write to.
  • Reshapes pup skills install / pup skills path: platform is now a positional arg (claude, cursor, codex, opencode, windsurf, gemini, pi, or all), default scope flips to user-global, and --project opts back into project-local installs. name moves to --name.
  • Refactors src/skills.rs to a single PlatformSpec table (replaces scattered match arms) and tightens error handling — typo'd platforms always validate (even with --dir), no-op installs from --name/--type filters 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. Use pup 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 root
  • src/skills.rsPlatformSpec table; lookup_platform / resolve_platform_name / resolve_platform_list (with `all` expansion); resolve_relative extracted to dedupe path-building across skills_dir/agents_dir/extensions_dir _with_home variants
  • src/commands/skills.rs — new install/path command signatures; resolve_or_bail always validates regardless of --dir; unique-entry counting for the user-facing summary and agent-mode JSON; new #[cfg(test)] mod tests with 8 tests
  • src/main.rs — CLI surface updated (positional platform, --project, --name)
  • src/test_support.rs — shared TempDir helper used by the new tests
  • README.md, SKILL.md, docs/COMMANDS.md, skills/extensions/dd-pup-pi/README.md — usage examples updated

Test plan

  • `cargo test --bin pup -- skills:: commands::skills::` — 55 tests pass (47 lib + 8 command-layer)
  • `cargo clippy --bin pup --tests -- -D warnings` — clean
  • `cargo fmt --check` — clean
  • Manual: `pup skills install claude`, `pup skills install codex`, `pup skills install all --dir /tmp/x --name dd-pup` produce expected paths
  • Manual: typo'd platform errors with a useful message; `--name` on a wrong-platform extension errors loudly instead of silently no-op'ing
  • Reviewer: confirm the breaking CLI change is acceptable (positional name → positional platform)

Closes #507

🤖 Generated with Claude Code

…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>
@platinummonkey platinummonkey requested a review from a team as a code owner May 15, 2026 13:55
Comment thread src/main.rs Outdated
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>
@platinummonkey platinummonkey merged commit e5abd1b into main May 15, 2026
6 checks passed
@platinummonkey platinummonkey deleted the feat/codex-cursor-plugins-507 branch May 15, 2026 15:39
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.

[FEATURE] Plugin manifest for Codex and Cursor

2 participants