Repository navigation
Description
The work
buildAcpSkillsInstructions in packages/provider-bridge-acp/src/session-params.ts renders the injected bb skills catalog for every ACP session as one line per skill, and each line repeats the full absolute path of the staged skill root:
bb/packages/provider-bridge-acp/src/session-params.ts
Lines 92 to 119 in b23150d
| function buildAcpSkillsInstructions( | |
| skillRoots: readonly AcpSkillRoot[] | undefined, | |
| ): string | undefined { | |
| if (!skillRoots || skillRoots.length === 0) { | |
| return undefined; | |
| } | |
| const skillLines = skillRoots.flatMap((skillRoot) => { | |
| return skillRoot.skills.map((skill) => { | |
| const skillFilePath = path.join( | |
| skillRoot.skillDirectoryRootPath, | |
| skill.name, | |
| "SKILL.md", | |
| ); | |
| return `- ${skill.name}: ${sanitizeAcpSkillDescription(skill.description)} (SKILL.md: ${skillFilePath})`; | |
| }); | |
| }); | |
| if (skillLines.length === 0) { | |
| return undefined; | |
| } | |
| return [ | |
| "bb skills are reusable instruction folders. When the current task matches a listed skill description, read that skill's SKILL.md at the absolute path before proceeding; you may read supporting files in the same skill directory that SKILL.md references. If a listed path does not exist, the list is stale and should be ignored.", | |
| "", | |
| "Available bb skills:", | |
| ...skillLines, | |
| ].join("\n"); | |
| } |
The staged root is a content-hash directory (<dataDir>/runtime/global-skills/<64-hex-hash>/skills), so every line carries the same ~100-character prefix. Verbatim catalog from a bb-app 0.44.0 ACP thread (10 plugin skills, paths shortened only here; the real hash is 64 hex chars):
Available bb skills:
- acp-provider: Configure or troubleshoot ACP agent discovery, custom models, skills, and compaction in BB. (SKILL.md: /root/.bb/runtime/global-skills/cd0a3c18…b3fcf/skills/acp-provider/SKILL.md)
- automations: Schedule or manage recurring and one-shot BB agent or script automations. (SKILL.md: /root/.bb/runtime/global-skills/cd0a3c18…b3fcf/skills/automations/SKILL.md)
- bb-plugin-authoring: Create or change BB plugins and Plugin SDK extensions, including CLI commands, agent tools, providers, and UI surfaces. (SKILL.md: /root/.bb/runtime/global-skills/cd0a3c18…b3fcf/skills/bb-plugin-authoring/SKILL.md)
… (7 more lines with the same prefix)
Measured on that real catalog (wc -c on the ten list lines, path suffix isolated with grep -o ' (SKILL.md: [^)]*)'):
| chars | |
|---|---|
| Ten catalog lines total | 2493 |
Of which (SKILL.md: …) path suffixes |
1412 (57%) |
| Same catalog with the root declared once | ~1198 |
The catalog is part of the session instructions, so this cost is paid in every request of every ACP thread. #4460 measured the pointer catalog at ~51K chars / ~12.7K tokens per session for 83 skills; on that scale roughly half of it is this repeated prefix.
The Claude Code, Codex, and Pi bridges are not affected: they map skills/configure onto native discovery (local plugin config, skills/extraRoots/set, Pi skill paths) and never render this text.
Proposed change (short term, no protocol change): group the catalog by skill root and declare each root once, then list only name: description per skill, with the instruction sentence telling the model that each skill lives at <root>/<name>/SKILL.md:
bb skills are reusable instruction folders. When the current task matches a listed skill description, read that skill's SKILL.md before proceeding: it lives at <skills root>/<skill name>/SKILL.md under the root declared for its group. …
Available bb skills:
Skills root: /root/.bb/runtime/global-skills/cd0a3c18…b3fcf/skills
- acp-provider: Configure or troubleshoot ACP agent discovery, custom models, skills, and compaction in BB.
- automations: Schedule or manage recurring and one-shot BB agent or script automations.
…
This keeps the per-skill description in context (that is what lets the model decide when to read a skill, same as native skill listings) and drops only the redundant bytes. We are carrying this change on a fork branch (hxy91819/bb, fix/acp-skills-prompt-paths) and can open a PR if the direction is acceptable.
Possible follow-up (separate decision, opt-in): most ACP agents bb ships (Cursor, OpenCode, omp, Grok Build, DeepSeek Harness, Pi) already read ~/.agents/skills. An opt-in setting could link the staged bb skill directories into ~/.agents/skills/<name> and skip the prompt catalog for agents whose nativeSkillRoots include that directory, leaving the catalog only for agents that do not read it (Hermes). Per-agent config adapters (skills.external_dirs, skills.customDirectories, …) and an MCP "read skill" tool were considered and rejected: the former multiplies agent-specific maintenance, the latter keeps the same context cost while making skill triggering less reliable than a description in the instructions.
Why now
Every ACP thread pays this on every request, and the number of injected skills grows with each installed plugin. The waste is mechanical and fixable inside one function without touching the skills/configure protocol or other providers. Related but not duplicates: #4460 (invocation path and SKILL.md re-reads; this issue is only about the catalog rendering), #2709 (always-on context in general), #4164 / #3774 (duplicate listings).
Acceptance criteria
- The ACP session instructions declare each skill root once and list skills as
name: descriptionunder it; multiple roots render as separate groups; roots without skills are skipped; no roots or no skills still yields no skills block. session-params.test.tsandbridge/bridge.test.tsassert the new shape (root declared once, every name and description present, no per-line absolute path).- Any docs or skill text that quote the old
(SKILL.md: <path>)format are updated. - No change to
skills/configure,HOST_DAEMON_PROTOCOL_VERSION, or the Claude Code / Codex / Pi bridges.
Environment
bb-app 0.44.0 (desktop tag desktop-v0.44.0); behavior unchanged on main at b23150d. Observed in an ACP thread on Linux; origin thread thr_k8xqi2ge68.
AGENT GENERATED
Activity
hxy91819 commentedon Oct 3, 2026
Implementation for this, in case it helps triage.
Branch
fix/acp-skills-prompt-pathson hxy91819/bb, rebased ondesktop-v0.45.0(129f6217): hxy91819/bb@desktop-v0.45.0...hxy91819:bb:fix/acp-skills-prompt-paths — core commit hxy91819@a6707afceChange in
packages/provider-bridge-acp/src/session-params.ts:Skills root: <path>line per skill root, and each skill line carries only the name and description.SKILL.mdlives at<skills root>/<skill name>/SKILL.mdunder the root declared for its group, instead of repeating the absolute path on every line.Before:
After:
Diff is 3 files, +119/−45. Agents on the fork (Cursor, Codex via ACP) have been resolving skills from the grouped form since September 30 without a stale-path failure.