Skip to content

Generate the per-host box skill copies from shared/skills/box, with a CI sync check - #84

Draft
chenchenSimular wants to merge 1 commit into
mainfrom
chenchen/shared-skill-source
Draft

chenchenSimular wants to merge 1 commit into
mainfrom
chenchen/shared-skill-source

Conversation

@chenchenSimular

Copy link
Copy Markdown
Contributor

Closes #83

What

Every host folder still ships its own copy of the box skill, because each folder is installed on its own and symlinks aren't allowed. From now on those copies are generated from one source:

  • shared/skills/box/SKILL.md holds the common text. The parts that differ on purpose are marked <!-- name -->default<!-- /name -->.
  • shared/skills/box/variants/<name>.<variant>.md holds the per-host replacement text.
  • shared/skills/box/hosts.json maps each host to its output file and its variants.
  • scripts/gen-skills.mjs (Node, no dependencies) writes every host's file. It fills {{CLI_VERSION}} from claude-code/skills/box-offload/SKILL.md, the pin that e2e and box-cli's bump workflow already read. Each generated file gets an HTML comment after its frontmatter saying it is generated. claude/ is the one exception (see below).
  • CI has a new skills job that runs the generator and fails if any committed copy differs, untracked files included. It also prints a warning, not a failure, when a PR changes claude/. shared/**, scripts/**, cursor/**, openai/** and gemini/** are now in the PR path filters, so a hand edit to any copy is caught. Side effect: a PR that only touches cursor/, openai/ or gemini/ now runs the full CI.
  • README "Adding an agent" and "Releasing" now say: edit shared/, run node scripts/gen-skills.mjs, commit the outputs, and bump only the hosts whose file changed.

claude/ is not touched

claude/ is the version under Claude directory review, so this PR leaves it byte-identical to 806ee69 (git diff origin/main -- claude/ is empty). It has its own variants: the stricter "never a secret (... cloud or ssh config)" rule, and "sign in in the box's live view" with no Chrome import tip. It also has "header": false, so no generated comment is added, and its version is not bumped.

What users of each host will see

The only accidental drift was the CLI pin. These hosts move from npx -y @simular-ai/box@1.2.1 to @1.2.2 in the four file-transfer commands (download, upload, rsync, login), and each gets a version bump:

Host Visible change Version
cursor/ (Cursor and Antigravity) CLI pin 1.2.1 → 1.2.2 0.1.0 → 0.1.1 (both manifests)
grok/ CLI pin 1.2.1 → 1.2.2 0.1.1 → 0.1.2
openai/ CLI pin 1.2.1 → 1.2.2 1.0.2 → 1.0.3, new release_notes
hermes/ CLI pin 1.2.1 → 1.2.2 0.2.2 → 0.2.3
openclaw/ CLI pin 1.2.1 → 1.2.2 0.1.3 → 0.1.4 (package.json + openclaw.plugin.json)
pi/ CLI pin 1.2.1 → 1.2.2 0.1.2 → 0.1.3
gemini/GEMINI.md CLI pin 1.2.1 → 1.2.2 gemini-extension.json 0.1.0 → 0.1.1
claude-code/ No text change, only the generated comment Not bumped
claude/ Nothing Not bumped

Apart from the pin and the generated comment, every generated file is byte-identical to main. I checked this by diffing each file against HEAD with the pin normalized and the comment removed.

What stays per host (intentional)

  • intro (sign-in sentence): hermes (personal key in MCP_BOX_API_KEY), openclaw (Settings > Plugins > Connect), pi (mcp__box__<tool> names, /mcp login box). Everyone else uses the default OAuth sentence.
  • view-tool and watch (box_view and sending view_url): hermes and openclaw only, as OpenClaw, Hermes: hand the user the live screen with box_view #71 decided ("Limit box_view guidance to OpenClaw and Hermes").
  • secrets and sign-in: claude/ only (directory policy).
  • frontmatter: false: gemini/GEMINI.md is a plain context file.

Not done here (needs a human)

  • External releases for the bumped hosts are still to do. Each follows README "Releasing": openai ZIP upload, hermes catalog sha PR, grok marketplace PR, pi pi-v0.1.3 tag, openclaw clawhub package publish.
  • box-cli's bump-pins.yml still edits only claude/ and reads claude/skills/box-offload/SKILL.md. That file no longer exists after Split the Claude directory plugin (claude/) from the marketplace plugin (claude-code/) #82, so the bot already fails as it stands. When it is fixed, it should edit claude-code/ (and claude/ only if the directory version should move), then run node scripts/gen-skills.mjs and add the regenerated host folders. Otherwise this PR's new CI check will fail its PRs.

🤖 Generated with Claude Code

Each host folder ships its own copy of the box skill, and the copies had
drifted: cursor/, grok/, openai/, hermes/, openclaw/, pi/ and gemini/ still
pinned box CLI 1.2.1 after claude-code/ moved to 1.2.2 (#74).

shared/skills/box/SKILL.md now holds the common text, variants/ the parts
that differ on purpose per host, and hosts.json which host gets which.
scripts/gen-skills.mjs (Node, no dependencies) writes every host's file and
reads the CLI pin from claude-code/skills/box-offload/SKILL.md. claude/ is
reproduced byte for byte (no generated header), since it is the version
under Claude directory review.

CI regenerates and fails when the committed copies differ, and warns when a
PR changes claude/. Hosts whose skill text changed get a version bump.

Closes #83
@chenchenSimular
chenchenSimular marked this pull request as draft November 27, 2026 07:38

This branch has not been deployed

No deployments
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.

One source for the per-host box skill copies, with a CI sync check

1 participant