Skip to content

Follow symlinked project skills that stay inside the repository - #3857

Closed
bjorn-supernomic wants to merge 1 commit into
get-bb:mainfrom
bjorn-supernomic:fix/follow-workspace-skill-symlinks
Closed

bjorn-supernomic wants to merge 1 commit into
get-bb:mainfrom
bjorn-supernomic:fix/follow-workspace-skill-symlinks

Conversation

@bjorn-supernomic

Copy link
Copy Markdown

Human comments

What was wrong

canFollowSkillSymlink in apps/host-daemon/src/command-discovery.ts returned true only for user-origin roots, so the flat project skill scan refused every symlinked entry: a checked-in catalog of links such as .claude/skills/nerd -> ../../.agents/skills/nerd yielded zero provider-project skills for Claude Code and Pi, while Codex still listed them through the real directories it also scans. Nothing was logged. Project roots already carry a boundaryPath that the recursive shape enforces for a linked root, and docs/provider-plugin-api.md states that containment rule, but entries under a root never got the same treatment. Issue: #3856.

What changed

How you verified

  • Added "follows project-origin symlinked skills whose target stays inside the workspace" to command-discovery.test.ts: a relative directory link and a SKILL.md file link inside the workspace are both discovered with origin: "project". It fails on the parent commit (expected undefined to deeply equal { name: 'nerd', … }) and passes here. The existing "does not follow project-origin symlinked skill directories or skill files" test, whose targets live outside the workspace, still passes, as does the user-origin test.
  • pnpm exec vitest run src/command-discovery.test.ts in apps/host-daemon: 27 passed.
  • pnpm exec turbo run typecheck --filter=@bb/host-daemon: passed.
  • pnpm exec oxfmt --check on the two changed source files: clean.
  • Origin of the report: a repository with 120 such links showed provider-project/codex: 106, provider-project/claude-code: 0, provider-project/pi: 0 in bb skill list --json on bb 0.43.1, while claude -p --output-format stream-json --verbose in the same checkout advertised every linked skill in slash_commands.

Fixes #3856

AGENT GENERATED

🤖 Generated with Claude Code

A project skill root refused every symlinked entry, so a checked-in
catalog of links (.claude/skills/x -> ../../.agents/skills/x) produced
no project skills for that provider while Claude Code loaded the same
links. Apply the boundary that roots already honour to entries: a
linked skill directory or SKILL.md is followed when its real path stays
inside the workspace, and a link out of the repository stays hidden.

Fixes get-bb#3856

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks @bjorn-supernomic for the PR. This repo needs approval before a PR. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ) and explain what you want to open a PR for and why. A maintainer then adds you to the allow list. This PR now closes on its own. Reopen it or open a new one after approval.

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.

Symlinked entries in a project skill root are skipped even when they stay inside the repository

1 participant