Repository navigation
Description
Scenario
With the Claude Code provider, the skills bb injects as the bb-global-skills
plugin are listed a second time by Claude Code itself whenever the same skill
also exists under a root Claude Code scans natively — <home>/.claude/skills/<name>/SKILL.md
or <cwd>/.claude/skills/<name>/SKILL.md. bb has no visibility into that scan,
so its own catalog dedup cannot see the collision.
Steps to reproduce:
- Put a skill at
~/.claude/skills/demo/SKILL.md(a symlink into
~/.bb/shared-provider-skills/demoreproduces it too — bb itself creates
such symlinks for shared-provider skills). - Register the same skill with bb so it lands in the injected catalog
(bb skill list --jsonshows it). - Start a Claude Code thread in bb and ask the model to list its available
skills, or inspect the system prompt's skill catalog.
Measured on a real workspace (49 shared/bb-owned skills): about 45 names appear
twice, adding roughly 13 500 tokens of repeated description text to every
Claude Code thread's system prompt at startup.
Current behavior
assembleSkillPlugins symlinks the whole staged catalog into one local plugin
and hands it to every Claude Code session unchanged:
Each colliding skill is then listed twice: bare (demo) from Claude Code's own
filesystem scan, and prefixed (bb-global-skills:demo) from the injected plugin.
Secondary effect, and the reason this is more than wasted tokens: Claude Code
caps the skill listing at skillListingBudgetFraction (1% of the context
window) and truncates descriptions once the catalog exceeds it. On the workspace
measured above, seven skills reached the model with an empty description, so the
model cannot tell when to invoke them. Removing the duplicates brings the
catalog back under the budget and restores those descriptions.
A skillOverrides entry keyed "bb-global-skills:<name>" in Claude Code
settings does not hide the injected copy (tried 2026-09-23), so there is no
user-side workaround short of deleting the native symlinks — which also takes
the skills away from Claude Code sessions started outside bb.
Expected behavior
For a Claude Code session, the injected catalog should omit skills whose name
that session already sees natively, so each skill is listed exactly once.
Providers without their own filesystem scanner (Codex and other ACP agents)
should keep receiving the full catalog.
Not a duplicate of #3774: that one is about the same skill registered under
several bb scopes, which bb can dedup inside its own listing. Here the second
copy never passes through bb at all — it comes from Claude Code's own scan of
~/.claude/skills and <cwd>/.claude/skills.
Prototype
Fork commit filtering the catalog per session by natively visible names
(compared both by directory name and by front-matter name), staging the
filtered set as symlinks under a hash-named directory that is reused across
sessions with the same set, and leaving the catalog untouched when there is no
overlap:
Happy to open a PR if this direction looks right.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 23, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied missing classification: Bug · Priority Medium · Effort Medium; labels
providers,provider-claude-code, andpartial-repro. Final Type verified as Bug.Reproduction and root-cause report: PARTIALLY REPRODUCED, with high confidence in the project-root cause.
The bridge injects the complete staged catalog while native project discovery remains enabled. An isolated SDK test lists the same project skill as both a native and plugin-prefixed entry. This repeated in two clean checkouts of
94d77da09. The home-root fixture returned only one entry; token overhead and description truncation remain unverified. The report includes the executable reproduction and failing deduplication assertion. Full build and all 363 existing provider tests passed.No PR: scope-dependent native visibility remains unresolved, so a filtering fix could incorrectly remove skills.
Unify skill indexing and explicit provider selection
Unify skill discovery and dedupe; pass picked skills to Codex (get-bb…