Skip to content

fix(skills): fix pi platform install and all-platform extension inclusion#560

Merged
platinummonkey merged 2 commits into
mainfrom
fix/skills-install-pi-platform
Jun 4, 2026
Merged

fix(skills): fix pi platform install and all-platform extension inclusion#560
platinummonkey merged 2 commits into
mainfrom
fix/skills-install-pi-platform

Conversation

@platinummonkey
Copy link
Copy Markdown
Collaborator

Summary

Fixes #559. pup skills install fails in two ways when pi is targeted:

  1. pup skills install --name dd-apm pi gives a cryptic "no install target" error instead of explaining that pi only supports extensions.
  2. pup skills install --name dd-apm all silently skips pi and reports a misleading platform count (7 platforms but nothing installs on pi).

Changes

Bug fix — better error for extension-only platforms (src/commands/skills.rs)

  • When a skill/agent is requested for an extension-only platform like pi, emit a helpful error: "pi only supports extensions, not skills or agents. Available extension(s): dd-pup-pi"

New behavior — all always installs pi extension (src/commands/skills.rs)

  • pup skills install all (with or without --name/--type filter) now also installs dd-pup-pi on pi, since all means "full experience on every platform"

Correctness fixes (src/skills.rs, src/commands/skills.rs)

  • Platform count in success messages reflects actual platforms written to, not all selected platforms
  • --dir multi-platform installs deduplicate writes by path (prevents redundant writes and inflated counts)
  • Extension platform guard in install_paths and install_path is now unconditional — --dir can no longer bypass platform capability checks, preventing wrong attribution
  • Agent-mode JSON "platforms" field reports only installed platforms

Code quality (src/skills.rs)

  • Extracted PlatformSpec::is_extension_only() helper (was duplicated inline)
  • format_as_agent_md delegates to format_as_skill_md (currently identical; doc comment notes when they diverge)
  • Added impl PlatformSpec block for is_extension_only()

Testing

  • 14 tests in commands/skills.rs including 6 new ones covering: original bug scenario, --type agent pi, --name dd-apm all, --type skill all, wrong-platform generic error, and dedup file count
  • New tests in skills.rs: is_extension_only() unit tests, structural platform invariant, extension content-empty integrity check, pi+--dir returning None
  • All 1233+ non-network tests pass; clippy clean under -D warnings

Related Issues

Closes #559


🤖 Generated with Claude Code

…sion

Fixes pup skills install failing with pi as a target (#559).

- `pup skills install --name <skill> pi` now gives a helpful error
  explaining pi is extension-only and listing dd-pup-pi as the
  available extension, instead of a cryptic "no install target" message.
- `pup skills install all` (with or without --name/--type filter) now
  installs dd-pup-pi on pi in addition to skills on other platforms.
- Platform count in success messages reflects actual platforms written
  to, not the full selected set.
- `--dir` multi-platform installs deduplicate writes by path so file
  counts are accurate.
- Extension platform guard in install_paths/install_path is now
  unconditional — --dir cannot bypass platform capability checks.
- Agent-mode JSON "platforms" field reports installed platforms only.
- Extracted PlatformSpec::is_extension_only() helper to avoid
  duplicating the user_skills/project_skills emptiness check.
- Collapsed format_as_agent_md to delegate to format_as_skill_md
  (currently identical; doc comment notes when they will diverge).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@platinummonkey platinummonkey requested a review from a team as a code owner June 4, 2026 20:49
@datadog-official

This comment has been minimized.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@platinummonkey platinummonkey merged commit 474dc2a into main Jun 4, 2026
5 of 6 checks passed
@platinummonkey platinummonkey deleted the fix/skills-install-pi-platform branch June 4, 2026 21:34
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.

[BUG] pup skills install fails with pi as a target

1 participant