Skip to content

Skills install scope - #174

Merged
jamie-at-bunny merged 3 commits into
mainfrom
skills-install-scope
Aug 20, 2026
Merged

Skills install scope#174
jamie-at-bunny merged 3 commits into
mainfrom
skills-install-scope

Conversation

@jamie-at-bunny

Copy link
Copy Markdown
Member

No description provided.

@bunnynet-devops

Copy link
Copy Markdown

@codex review

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4bf4dbd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@bunny.net/cli Patch
@bunny.net/cli-linux-x64 Patch
@bunny.net/cli-linux-arm64 Patch
@bunny.net/cli-darwin-x64 Patch
@bunny.net/cli-darwin-arm64 Patch
@bunny.net/cli-windows-x64 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 72b6438518

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

];
if (usesClaude(cwd)) {
const skillRoot = `.claude/skills/${skill.name}`;
for (const skillRoot of projectSkillRoots(cwd, skill.name)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate the universal root before clearing its sentinel

When a checkout contains .agents/skills/bunny-cli as a symlink to a directory outside the project, this newly unconditional loop passes it to writeSkillFiles, which executes rmSync(root/SKILL.md) before the first assertWriteWithin check. Consequently, bunny skills install can delete an external SKILL.md and only then reject the symlink; validate the root or sentinel path before removing it.

AGENTS.md reference: AGENTS.md:L1370-L1370

Useful? React with 👍 / 👎.

Comment on lines +215 to +217
for (const skillRoot of [
`${UNIVERSAL_SKILL_DIR}/${name}`,
`.claude/skills/${name}`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve global skills during home-directory project removal

When the current directory is the user's home and a legitimate global installation exists, default bunny skills remove resolves this newly added project root to ~/.agents/skills/<name> and deletes it even though --global was not requested. Project installs into the home directory are now refused, and older project installs never wrote .agents/skills, so removing this path there can only erase the global installation; skip this root when cwd is home or require global scope.

AGENTS.md reference: AGENTS.md:L1371-L1371

Useful? React with 👍 / 👎.

writeSkillFiles removed root/SKILL.md before any boundary check, so a
checkout with .agents/skills/<name> symlinked outside the project could get
an external SKILL.md deleted on the way to the symlink being rejected. The
project install now always walks that root, which widened the exposure, so
the sentinel path is validated before it is removed.

Scopeless removal in the home directory resolved the project roots to
~/.agents/skills/<name> and ~/.claude/skills/<name>, which are the global
install, and deleted them without --global. It now strips only the AGENTS.md
block there, which is the one home artifact --global cannot reach.
@jamie-at-bunny
jamie-at-bunny merged commit e2a7110 into main Aug 20, 2026
1 check passed
@jamie-at-bunny
jamie-at-bunny deleted the skills-install-scope branch August 20, 2026 17:42
@github-actions github-actions Bot mentioned this pull request Aug 20, 2026
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.

3 participants