Skip to content

Split skill bundles into on-demand references with safe upgrades - #310

Open
iuyo5678 wants to merge 5 commits into
mainfrom
feat/skill-reference-bundles
Open

iuyo5678 wants to merge 5 commits into
mainfrom
feat/skill-reference-bundles

Conversation

@iuyo5678

@iuyo5678 iuyo5678 commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

BrowserSkill previously loaded long skill bodies and maintained overlapping CLI instructions at the repository root and inside the crate. This change keeps exactly two authored skill packages and loads detailed procedures from references only when needed.

  • Make crates/bsk-cli/skill/ the sole CLI source and keep the DSH source in its existing package. Reduce the entry points by 65% and 50%, respectively, while retaining prompt-injection rules in both entry points and preserving AGENT_INSTALL.md.
  • Embed and install complete CLI packages. Track each managed file in a versioned checksum manifest, preserve local edits/deletions and unknown files, remove unchanged retired resources, and resume interrupted writes safely. Migrate both checksum-based single-file installs and known official historical LF/CRLF contents; explicit custom installs remain protected. Ordinary installation verifies existing resources even when SKILL.md is missing, and validates pending old/new states before retrying an interrupted install. Conflicts preserve content and identify paths; explicit force replaces package targets while preserving unrelated user files. Existing single-file --source usage, including explicit symbolic links, remains supported alongside directory sources. Links inside packages and installed resources remain rejected.
  • Register DSH's module-relative resource directory and ship references in npm. Validate an actual unpacked npm archive from an unrelated working directory on Linux and Windows. Launch npm through a fixed shell command so Windows can execute its command shim; pass temporary paths through npm configuration without interpolating them into shell text. The Windows package job also covers paths containing spaces and &.
  • Show modified, deleted and conflicting resource paths in doctor diagnostics.
  • Parse LF/CRLF multiline metadata consistently without changing resource bytes or checksum semantics. Add reference/budget and Cargo/npm package checks to CI, run Node skill validation and Cargo package checks on Windows, extend Windows skill migration coverage, and update installation/development documentation. Harness-path tests run with isolated child-process environments and verify Windows defaults and overrides.

Validation:

  • cargo test --workspace --locked: 749 passed, 1 ignored on macOS.
  • cargo clippy --workspace --all-targets --locked -- -D warnings and Rust formatting passed.
  • Changed JavaScript files passed Biome; DSH typecheck, build and 333 plugin tests passed.
  • Node script tests: 13 passed, including LF/CRLF parity for both actual skill packages and preservation of original bytes. Both skills passed the skill validator.
  • Cargo package contents and actual npm package/runtime resource checks passed.
  • Frozen, hash-pinned pre-change root and crate fixtures cover markerless and legacy-marker adoption, LF/CRLF bytes, custom intent, local edits, reference collisions, and exact checksum baselines in CI. These are immutable test inputs, not additional authored skill sources.

Local validation ran on macOS. All eight checks on commit dc80625 passed, including the dedicated Windows DSH build/npm archive/runtime resource check (with spaces and & in temporary paths), Windows skill installation/migration, Node metadata/resource/Cargo checks, updates, cancellation, PowerShell 5.1 and PowerShell 7 installers, and the independent Windows daemon lifecycle job: https://github.com/Tencent/BrowserSkill/actions/runs/35607591094.

Validation scope: these tests cover installation, recovery, metadata and package/runtime resource resolution. No real-model CLI/DSH task comparison has been run for reference-read timing, completion rate or token usage; those metrics require a configured harness and model evaluation environment.

Isolate harness path tests from host environment settings and verify Windows defaults. Cover real historical LF/CRLF fixtures, custom intent, local edits, reference collisions, and exact checksum baselines.
@iuyo5678
iuyo5678 marked this pull request as ready for review September 21, 2026 13:53
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.

2 participants