Skip to content

Let bb find, install and run large skills like Anatomy - #5436

Closed
brsbl wants to merge 2 commits into
mainfrom
bb/oversized-skills-thr_x6wkp5kcx3
Closed

brsbl wants to merge 2 commits into
mainfrom
bb/oversized-skills-thr_x6wkp5kcx3

Conversation

@brsbl

@brsbl brsbl commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Three problems stopped bb users from using large, popular skills such as Anatomy (about 12 MB including its prebuilt example pages):

  1. One oversized skill broke every thread.
    • The server turned every user skill into a skill tree without checking the limits the host daemon stages under.
    • The daemon treats trees from the server as required, so a skill over 10 MB in <dataDir>/skills failed every thread.start with "Skill tree exceeds max byte count 10485760".
  2. bb skill install refused it with "Skill tree exceeds installation limits" (10 MB cap).
  3. bb skill search returned only skills on skills.sh's home leaderboard.
    • skills.sh's search API now requires an authenticated token, so servers without one fell back to filtering the leaderboard page by name.
    • Any skill not on that page, Anatomy included, was unfindable.

What changed

  • Shared limits: SKILL_TREE_LIMITS (1,000 files, 32 MB, depth 24) in @bb/host-daemon-contract is the one source for registry install, server skill discovery and daemon staging. The byte cap rises from 10 MB to 32 MB.
  • Skip instead of fail: server skill discovery (apps/server/src/services/skills/injected-skills.ts) enforces those limits. A skill over them is skipped with "Skipping invalid injected skill" and a reason, the same path as other invalid skills, instead of being sent to the host and failing thread start.
  • Search: when the authenticated API is unavailable, a query goes to skills.sh's public search (/api/search?q=) before the leaderboard fallback (registry-parse.ts, registry-proxy.ts).
  • Wire change: HOST_DAEMON_PROTOCOL_VERSION 234 → 235.
    • Daemons now accept skill trees up to 32 MB.
    • An older daemon would still reject trees between 10 and 32 MB at thread start, so enrolled machines must update.
    • No message fields change.

How you verified

  • Tests added:
    • injected-skills.test.ts: a skill over the file limit is skipped with its reason, and other skills are still injected.
    • public-project-skills.test.ts: an unauthenticated search uses the public search endpoint and finds a skill that isn't on the leaderboard.
  • Manual checks in a dev app built from this branch (pnpm dev, isolated data dir):
    • With the full 12 MB Anatomy in <dataDir>/skills, a new thread starts and the agent reports anatomy: available. Before this change, thread.start failed.
    • bb skill install wheresryan22/anatomy/anatomy installs it. It failed before.
    • bb skill search anatomy lists wheresryan22/anatomy/anatomy first. It returned nothing before.
    • A skill with 1,001 files is skipped with the logged reason "Skill tree has more than 1000 files". Threads still start, and the agent reports too-big-skill: unavailable.
  • Remote CI on this branch.

BB-Thread: Playgrounds

AGENT GENERATED

🤖 Generated with Claude Code

- Skill search uses skills.sh's public search when the authenticated API is
  unavailable, so any skill can be found, not only the leaderboard's.
- One set of skill tree limits for install, server staging and the host
  daemon; the byte cap rises from 10 MB to 32 MB.
- The server skips a skill over those limits with a logged reason, instead of
  sending it to the host and failing every thread start.
- HOST_DAEMON_PROTOCOL_VERSION 234 -> 235: daemons now accept skill trees up
  to 32 MB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T17:28:00.501148Z 8446c68 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 8446c68ce0

ℹ️ 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".

Comment on lines +175 to +176
typeof entry.installs !== "number" ||
!Number.isFinite(entry.installs)

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 Reject search entries outside the RegistrySkill contract

When the public endpoint returns an entry with a negative or fractional installs value, this accepts it because it only checks finiteness, but the SDK subsequently validates the response with registrySkillSchema, which requires a nonnegative integer. A single malformed upstream entry therefore makes the entire search fail instead of being skipped or triggering the fallback; validate these entries against the full internal contract before returning them.

AGENTS.md reference: AGENTS.md:L13-L13

Useful? React with 👍 / 👎.

@brsbl

brsbl commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Closing at brsbl's request. Playgrounds will ship its own Anatomy-based skill that fits bb's existing limits instead.

@brsbl brsbl closed this Oct 14, 2026
@brsbl
brsbl deleted the bb/oversized-skills-thr_x6wkp5kcx3 branch October 19, 2026 18:17
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.

1 participant