Skip to content

The workbench as a plugin for Claude Code and Codex; Studio refreshes stale skill stubs - #230

Merged
ZLHad merged 10 commits into
mainfrom
claude/agent-plugins
Nov 22, 2026
Merged

ZLHad merged 10 commits into
mainfrom
claude/agent-plugins

Conversation

@ZLHad

@ZLHad ZLHad commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Part b of the 首片上手 batch. The workbench's skill can now be added as a plugin of Claude Code and of Codex, two shell commands each, about 2 MB. When Studio opens, it rewrites the skill stubs bin/vh install-skill wrote for this clone that nobody has changed and that have fallen behind, and nothing else.

Why

Today the only ways in are the install script and npx skills add. Neither agent's own plugin marketplace can find or install it. A stub that falls behind (a renamed skill, a new one, a changed description) waits until someone reads bin/vh doctor and reinstalls it by hand.

What changes

  • The repo is a marketplace for both agents, as each one's docs specify:
    • Claude Code reads .claude-plugin/marketplace.json (Claude Code docs, plugin marketplaces);
    • Codex reads .agents/plugins/marketplace.json (OpenAI's "Package your plugin" page).
  • Both point at plugins/open-video-harness/. It holds the two skills, copied from skills/, plus each host's manifest (.claude-plugin/plugin.json, .codex-plugin/plugin.json with "skills": "./skills/").
  • Why a subfolder, not the repo root. With the root as the plugin, each host would copy the whole repo into its plugin cache, and the root bin/ would load as a plugin component.
  • The copies stay in step with skills/. bin/vh sync-agents copies each skill's whole folder; tools/ci.sh holds them equal file by file and checks that one name is used in all four files.
  • A version that moves with the skills. Both manifests carry "version"; tools/plugin_version.py keeps the hash of the plugin's skills in skills.sha256 and bumps the last number when, and only when, that hash changes (sync-agents runs it, CI checks it). A commit that leaves the skills is no new version, and claude plugin validate no longer warns.
  • Installing, with --sparse, so only the plugin's own folders are fetched (measured from this branch in temp homes: Claude Code 1.8 MB, Codex 2.6 MB; without it, 210–230 MB of the repo):
    • Claude Code: claude plugin marketplace add ZLHad/OpenVideoHarness --sparse .claude-plugin plugins/open-video-harness, then claude plugin install open-video-harness@open-video-harness. The one-step claude plugin install … --marketplace takes no --sparse (checked in --help, 2.1.326), so it is not the documented form.
    • Codex: codex plugin marketplace add ZLHad/OpenVideoHarness --sparse .agents/plugins --sparse plugins/open-video-harness, then codex plugin add open-video-harness@open-video-harness.
    • What gets installed is still the pointer skill: on first use it asks before installing the workbench itself, as the npx skills add route does.
    • Updating, as the README says: Claude Code: claude plugin marketplace update open-video-harness, then claude plugin update open-video-harness@open-video-harness. Codex: codex plugin marketplace upgrade, then codex plugin add … again.
  • bin/vh studio, before it opens, writes again the stubs tools/doctor.py --stale-skills names, file by file:
    • which ones: stubs install-skill wrote for this clone, untouched, and behind skills/ (a changed description, or the stub shape from before the mark);
    • how doctor knows: every stub install-skill writes now ends with a mark line, the sha256 of everything above it. A stub of the earlier shape is recognised by its text being today's stub text;
    • one line on stderr when it wrote something or could not, none on a normal start, none for --print-address and --json; it does not run for -h, --icon-status, --install-icon and --remove-icon.
  • What the refresh leaves alone, all tested:
    • someone else's skill folder of the same name;
    • a stub pointing at another clone;
    • a whole copy (npx skills add, through a link too);
    • a stub edited by hand (doctor says so);
    • a host nobody installed into. It adds no skill a host did not have.
  • The homepage: under "Get started" → "Pick a way in" (Homepage: a sentence to make one like each film and style; Get started lists the ways in #232's layout), in the "Any folder" row beside its npx skills add line, a collapsed "Or as a Claude Code or Codex plugin (about 2 MB)" with the two sparse pairs, so the page and the README carry the same five commands. Looked at after the merge with main, in the app's browser at 1440 (en, closed), 742 (zh, open) and 375 (en, open): no sideways scroll; the long commands wrap inside their boxes.
  • bin/vh install-skill writes what doctor.py --stub renders, so there is one renderer. It exits 1 when a stub cannot be written.
  • README (en, zh): the two commands each, the sizes, how to update, and what to remove when both the plugin and the installer's stubs are there. CONTRIBUTING.md and tools/commands.json say what sync-agents and studio write.

How it was checked

  • claude plugin validate .: passed, no warning now (a version is set).
  • Installed for real from this branch, in temp homes, with --sparse: Claude Code's marketplace and plugin (1.8 MB in ~/.claude/plugins), Codex's marketplace (2.6 MB).
  • New checks in tools/ci.sh:
    • the plugin's copies equal skills/ file by file, one name throughout, the version and skills.sha256 held to the skills;
    • Studio's refresh, case by case: someone else's open-video-harness-web beside a stale stub of ours; another clone's stub beside a stale one; an npx copy through a link; a hand edit; a stub of the shape before the mark; a folder that cannot be written; the quiet and the excluded flags; a second start that says nothing;
    • install-skill's exit 1 when it cannot write.
  • Each turns red when its behaviour is removed (7 mutations: the refresh writing whole hosts again, an edited stub taken as ours, the shape before the mark not taken, install-skill always 0, the quiet flags speaking, -h refreshing, a normal start speaking).
  • tools/ci.sh --committed with shellcheck and pyflakes (through uv): at 09a6ef2, at a0a7002 (main with Lighter install, a short last screen, a word before the local voice's first download #228 merged in) and at 629d5c0 (main with Mirrors in one step: the installer falls back to them, and every later download follows #231 and Homepage: a sentence to make one like each film and style; Get started lists the ways in #232 merged in), all passed; one check skipped (frames on a HyperFrames composition).

Not looked at

  • Adding the marketplace from main (ZLHad/OpenVideoHarness without a ref): that works once this is on main. I tested from this branch's ref.
  • Whether Codex refreshes a versioned plugin's copy on codex plugin marketplace upgrade without the second codex plugin add. Its docs do not say; the README gives both steps.
  • A slash-command form inside a session (/plugin marketplace add … --sparse): only the shell CLI was run.
  • sync-agents copying a skill folder with files beside its SKILL.md: no skill has any today, so the folder copy and the file-by-file compare run only on SKILL.md here.

Merged with main

Review round 1 (all findings addressed in this PR)

  1. The refresh overwrote skill folders it does not own: --stale-skills now prints exact files, only this clone's untouched stubs, and the refresh writes only those. Both reproduced cases are tests: someone else's open-video-harness-web stays; another clone's stub stays.
  2. npx copies taken over, and a skill added: only stubs install-skill wrote (the mark, or today's stub text) are rewritten. A whole copy never is, through a link either, and no skill is added that the host did not have; bin/vh doctor goes on saying what to do.
  3. The whole repo downloaded: the documented commands are the sparse two-step ones (the one-step form takes no --sparse), with the sizes, and the README says the workbench itself still installs on first use, after asking.
  4. Failures reported as success: install-skill returns 1 when a stub cannot be written. The refresh says "could not be written" then, and says nothing when nothing was written.
  5. A hand-edited stub: left alone; doctor says "it was changed after install-skill wrote it, so Studio leaves it as it is".
  6. Docs:
    • how to update, in both READMEs and the change note;
    • what happens with both the plugin and the stubs, and what to remove;
    • the zh line no longer says "一条命令".
      The version notes for the one-step form are gone with that form.
  7. Docs and tables:
    • CONTRIBUTING.md: editing skills/ needs bin/vh sync-agents, and untouched stubs refresh themselves;
    • tools/commands.json: the writes of sync-agents and studio;
    • sync-agents copies whole folders, and CI compares them.
  8. Tests: for 1, 2 and 4, for the -h and --icon-status exclusions (--install-icon is excluded by the same case, but not run, since it would install), and for --print-address and --json saying nothing.
  • Note, the version: added as above, held honest by tools/plugin_version.py.

…e's outdated skill stubs

- The repo is a plugin marketplace for both: .claude-plugin/marketplace.json and .agents/plugins/marketplace.json point
  at plugins/open-video-harness/, which holds the two skills (copied from skills/ by bin/vh sync-agents, held equal by
  CI) and each host's manifest; no version pinned, so updates follow main. Validated with claude plugin validate and
  installed in a temp home with claude plugin install and codex plugin add.
- bin/vh studio, before it opens: the stubs bin/vh install-skill wrote for this clone that doctor calls outdated are
  written again (doctor --stale-skills), one line on stderr; a host nobody installed into, and a stub pointing at
  another clone that is there, are left alone.
- README: the install lines for both.
…py where there is none; ci: own temp folder, skills/** reaches studio_checks
…untouched stubs, file by file; the sparse install (about 2 MB); a version that moves with the skills

doctor.py: every stub ends with a mark, the hash of what is above it (one renderer, skill_stub; bin/vh install-skill writes
what doctor.py --stub renders); --stale-skills prints the exact files that are this clone's, untouched and behind (a stub of
the shape before the mark too); someone else's skill folder, another clone's stub, a whole copy (npx, through a link too)
and a hand edit are left, said by doctor; nothing is added that a host did not have.
bin/vh: install-skill exits 1 when it cannot write; the refresh says one line only when it wrote or could not, nothing for
--print-address and --json, and does not run for -h and --icon-status; sync-agents copies whole skill folders and moves the
plugin's version with them (tools/plugin_version.py). README (en, zh): the two sparse commands each, how to update, what to
remove when both are installed; CONTRIBUTING and commands.json say what sync-agents and studio write.
… README (two sparse pairs and npx), collapsed
ZLHad added a commit that referenced this pull request Nov 21, 2026
…EADMEs give them (no plugin lines until #230); the pill at the card's top-left; sentences by kind of film; the toast cleared by a lightbox

readme.py check: every command the page offers to copy is one a README gives on the same commit. The film's pill sits over the
card's top-left, opposite the play button: on hover or keyboard focus (not clickable while hidden), always on a phone; the
caption keeps its height. Reduced motion: no fade for the pill and the toast. The launch short's sentence leaves a blank.
…st and the stub flags; the plugin carries #228's skill lines (version 1.0.1)
's four ways in, with the plugin commands folded under its skill row
…s page's group on LOCAL.example.md and studio_checks on skills/**
… on skills/** (the settings page's and Studio's); the install-skill fixtures copy tools/keys.py, which doctor.py imports since #234
@ZLHad
ZLHad marked this pull request as ready for review November 22, 2026 08:53
@ZLHad
ZLHad enabled auto-merge (squash) November 22, 2026 08:53
@ZLHad
ZLHad merged commit 2d6d193 into main Nov 22, 2026
4 checks passed
@ZLHad
ZLHad deleted the claude/agent-plugins branch November 22, 2026 09:21
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