From 416eae8d76a1f7275a6a0ff67dbef745178b1feb Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Nov 2026 10:16:44 +0000 Subject: [PATCH 1/3] feat(plugin): mirror a skills-only edition for Claude's plugin directory The directory refuses a local MCP server and script files from an organization that is not Verified, so the mirror now carries the skills alone: no .mcp.json, no launcher, no capture script. Text that differs between the two editions is marked in the Markdown, and build-plugin-mirror.mjs drops or unwraps it, then refuses a tree that still holds a file the directory rejects or points at what it left out. PLUGIN_MIRROR_EDITION=full switches the mirror back once verified. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019SAKipREuKRNW28N1gsAuR --- .github/scripts/build-plugin-mirror.mjs | 132 +++++++++++++++++++ .github/scripts/build-plugin-mirror.test.mjs | 87 ++++++++++++ .github/workflows/plugin-mirror.yml | 16 ++- plugin/README.md | 20 ++- plugin/skills/openscreen-capture/SKILL.md | 8 ++ plugin/skills/openscreen-demo/SKILL.md | 23 +++- 6 files changed, 276 insertions(+), 10 deletions(-) create mode 100644 .github/scripts/build-plugin-mirror.mjs create mode 100644 .github/scripts/build-plugin-mirror.test.mjs diff --git a/.github/scripts/build-plugin-mirror.mjs b/.github/scripts/build-plugin-mirror.mjs new file mode 100644 index 000000000..638bb26b1 --- /dev/null +++ b/.github/scripts/build-plugin-mirror.mjs @@ -0,0 +1,132 @@ +#!/usr/bin/env node +// Builds the tree that plugin-mirror.yml pushes to getopenscreen/openscreen-plugin, +// the repository Claude's plugin directory reads. +// +// node .github/scripts/build-plugin-mirror.mjs [--edition full|directory] +// +// The directory accepts a local MCP server and any file that is not text, JSON, YAML +// or an image only from Verified organizations. Until getopenscreen is one, the +// mirror carries the "directory" edition: the skills alone, without the server's +// launcher (.mcp.json, scripts/) or the headless capture script. The "full" edition +// is plugin/ as it is, less evals/. +// +// Text that differs between the two editions is marked in the Markdown files: +// +// text of the full plugin only +// +// +// The full plugin is installed straight from plugin/, where the directory text stays +// an HTML comment. The directory edition drops the full-only text and unwraps the +// directory text. Markers stay out of the full edition's way: it is copied as it is. + +import { + cpSync, + existsSync, + mkdirSync, + readdirSync, + readFileSync, + rmSync, + statSync, + writeFileSync, +} from "node:fs"; +import { join, relative } from "node:path"; +import { argv } from "node:process"; + +const FULL = /([\s\S]*?)\n?/g; +const DIRECTORY = /\n?/g; +const MARKER = /The plugin's launcher starts it.", + "", + "End.", + "", + ].join("\n"), + ); + writeFileSync(join(dir, "LICENSE"), "MIT\n"); +}); + +afterEach(() => rmSync(dir, { recursive: true, force: true })); + +describe("buildPluginMirror", () => { + it("ships the skills alone in the directory edition", () => { + const out = join(dir, "out"); + const files = buildPluginMirror(join(dir, "plugin"), out, { license: join(dir, "LICENSE") }); + expect(files).toEqual([".claude-plugin/plugin.json", "LICENSE", "skills/demo/SKILL.md"]); + expect(readFileSync(join(out, "skills/demo/SKILL.md"), "utf8")).toBe( + "Setup. Register it by hand.\nEnd.\n", + ); + }); + + it("keeps plugin/ as it is, less evals/, in the full edition", () => { + const out = join(dir, "out"); + const files = buildPluginMirror(join(dir, "plugin"), out, { edition: "full" }); + expect(files).toContain(".mcp.json"); + expect(files).toContain("skills/demo/scripts/capture.mjs"); + expect(existsSync(join(out, "evals"))).toBe(false); + expect(readFileSync(join(out, "skills/demo/SKILL.md"), "utf8")).toContain( + "never closed\n"); + expect(() => + buildPluginMirror(join(dir, "plugin"), join(dir, "out"), { edition: "full" }), + ).toThrow(/not closed/); + }); +}); + +describe("applyDirectoryEdition", () => { + it("drops full-only text and unwraps the directory text", () => { + expect( + applyDirectoryEdition( + "abc\n\ne", + ), + ).toBe("ac\nd\ne"); + }); +}); diff --git a/.github/workflows/plugin-mirror.yml b/.github/workflows/plugin-mirror.yml index 2fd4acaf7..50c794efe 100644 --- a/.github/workflows/plugin-mirror.yml +++ b/.github/workflows/plugin-mirror.yml @@ -21,12 +21,14 @@ on: - "plugin/**" - "LICENSE" - "package.json" + - ".github/scripts/build-plugin-mirror.mjs" - ".github/workflows/plugin-mirror.yml" pull_request: branches: [main] paths: - "plugin/**" - "package.json" + - ".github/scripts/build-plugin-mirror.mjs" - ".github/workflows/plugin-mirror.yml" workflow_dispatch: @@ -65,14 +67,16 @@ jobs: process.exit(bad.length ? 1 : 0); ' + # The directory edition carries the skills alone: the directory accepts a + # local MCP server and script files only from Verified organizations, which + # getopenscreen is not yet. Set PLUGIN_MIRROR_EDITION to "full" (a repository + # variable) once it is. The script says what it drops and why. - name: Build the mirror's tree + env: + EDITION: ${{ vars.PLUGIN_MIRROR_EDITION || 'directory' }} run: | - mkdir -p "$RUNNER_TEMP/mirror" "$RUNNER_TEMP/tree" - # evals/ is development tooling (prompts, graders, mocks) and does not - # ship to users. - cp -a plugin/. "$RUNNER_TEMP/tree/" - rm -rf "$RUNNER_TEMP/tree/evals" - cp LICENSE "$RUNNER_TEMP/tree/LICENSE" + mkdir -p "$RUNNER_TEMP/mirror" + node .github/scripts/build-plugin-mirror.mjs plugin "$RUNNER_TEMP/tree" --edition "$EDITION" --license LICENSE - name: Push to getopenscreen/openscreen-plugin if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'getopenscreen/openscreen' diff --git a/plugin/README.md b/plugin/README.md index 6f53a8914..e17a1c279 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -2,12 +2,15 @@ This plugin turns one sentence into a finished demo video of an app or a feature. Its skills have Claude plan a short storyboard, record the screen with [OpenScreen](https://getopenscreen.com), add zooms, captions and on-screen callouts, export an MP4, check the frames, and then either attach the video to a pull request or draft a post on X. -OpenScreen is a free, open-source (MIT) screen recorder and video editor for Windows, macOS and Linux. The plugin carries several skills and OpenScreen's MCP server, so the recording and editing tools are there as soon as the plugin is enabled. The tools themselves come from the desktop app's own executable, started with `mcp`. +OpenScreen is a free, open-source (MIT) screen recorder and video editor for Windows, macOS and Linux. The plugin carries several skills and OpenScreen's MCP server, so the recording and editing tools are there as soon as the plugin is enabled. The tools themselves come from the desktop app's own executable, started with `mcp`. + ## The skills - **`openscreen-demo`**: makes the whole video, from the storyboard to the export, then attaches it to a pull request or drafts a post on X. -- **`openscreen-capture`**: gets a clean, repeatable take, scripted or recorded, including a web page captured with no window on your desktop. +- **`openscreen-capture`**: gets a clean, repeatable take, scripted or recorded, including a web page captured with no window on your desktop. - **`openscreen-motion`**: places zooms, callouts, speed changes and the 3D camera with motion-design rules. - **`openscreen-effects`**: writes custom shader effects, with a cookbook of worked examples. - **`openscreen-sound`**: adds narration and music, and checks loudness, true peak and silences by measurement. @@ -16,8 +19,13 @@ OpenScreen is a free, open-source (MIT) screen recorder and video editor for Win ## What the plugin runs, sends and fetches + - **Starts OpenScreen's MCP server at session start.** `scripts/openscreen-mcp.mjs`, a short Node script with no dependency, looks for the installed app in its usual locations (or the path in `OPENSCREEN_EXE`) and runs ` mcp` over stdio. The server runs locally and needs no account. The script downloads nothing and sends nothing. - **Explains instead of failing when the app is missing.** If OpenScreen is not installed, is older than 2.1.0 or cannot start, the script serves one tool, `openscreenSetup`, that tells Claude what it checked and how to set OpenScreen up. + + - **Installs OpenScreen, only after you agree.** If the app is missing, a skill offers to download the latest installer from [the project's GitHub releases](https://github.com/getopenscreen/openscreen/releases/latest), or the Microsoft Store on Windows, and install it. - **Records the window you choose.** The recording and the project stay on your machine. The exported video leaves it only when you share it, as below. - **Attaches the video to a pull request** with `gh`, on the repository you work in, when you ask for a pull request video. @@ -25,6 +33,7 @@ OpenScreen is a free, open-source (MIT) screen recorder and video editor for Win ## Use it + Install it in Claude Code: ``` @@ -36,4 +45,11 @@ Then ask Claude for a demo, for example: *make a 30-second demo of the new expor The server needs Node.js on the PATH. Without it, or in an agent without plugin support, register the server by hand: `claude mcp add openscreen -- "" mcp`, or the same command and `mcp` argument in your agent's MCP settings. + + Documentation: [Letting an agent make the whole video](https://getopenscreen.com/docs/ai-editing/#letting-an-agent-make-the-whole-video). diff --git a/plugin/skills/openscreen-capture/SKILL.md b/plugin/skills/openscreen-capture/SKILL.md index ce5daa0bb..cc2aebf6f 100644 --- a/plugin/skills/openscreen-capture/SKILL.md +++ b/plugin/skills/openscreen-capture/SKILL.md @@ -61,6 +61,7 @@ Log where each move starts and ends, and each click; OpenScreen glides between t For a page shown in a real window, the tool's description gives the formula from a page point (`clientX`, `clientY`) to window fractions. `setPointerTrack` replaces the pointer the take had, then plans zooms on the new clicks (`autoZoomsAdded`). On a project not open in the editor it needs a checkpoint, which `stopRecording` and `createProject` make; `restoreCheckpoint` undoes it. + ## The headless recipe `scripts/capture.mjs` captures a web page in a browser with no window: a screenshot loop at twice the display scale (2560×1440 from a 1280×720 viewport, about 20 frames a second, enough for an interface), encoded to an H.264 MP4 at 30 fps, plus the pointer log in video time. Twice the scale is what keeps text sharp under a 1.5× to 2.2× zoom. @@ -82,6 +83,13 @@ Never write a `.cursor.json` file yourself: `setPointerTrack` writes it, and a c - Timers inside the page run on the real clock while frames arrive at their own pace: an on-screen clock or counter can look faster or slower than real time. Keep them out of the shot. - A 3× scale (3840×2160) is worth it only for an effect that magnifies a detail, and costs frame rate. + + ## Check the take before editing Look at the whole take in one image: `getContactSheet` with the `videoPath` as `path` and `count: 12`. If that tool is not listed, use `getFrames` with `path` and `count: 6`. Then: diff --git a/plugin/skills/openscreen-demo/SKILL.md b/plugin/skills/openscreen-demo/SKILL.md index 7eeff2408..699831052 100644 --- a/plugin/skills/openscreen-demo/SKILL.md +++ b/plugin/skills/openscreen-demo/SKILL.md @@ -14,7 +14,7 @@ This skill carries the whole job on its own. Where this plugin's other skills ar ## 1. Set up OpenScreen -You need the tools `startRecording`, `stopRecording`, `exportVideo` and `getFrames`. Both of OpenScreen's MCP servers have them: the one the app serves (*AI settings* → *MCP server*), and `openscreen mcp`. With the OpenScreen plugin installed in Claude Code, `openscreen mcp` is already connected: the plugin starts it through a small launcher (Node) that finds the installed app. If you have the tools, go to step 2. +You need the tools `startRecording`, `stopRecording`, `exportVideo` and `getFrames`. Both of OpenScreen's MCP servers have them: the one the app serves (*AI settings* → *MCP server*), and `openscreen mcp`. With the OpenScreen plugin installed in Claude Code, `openscreen mcp` is already connected: the plugin starts it through a small launcher (Node) that finds the installed app. If you have the tools, go to step 2. If you have only the tool `openscreenSetup`, the plugin's launcher is running but did not find a usable app: call it, and it says why and which locations it checked. Otherwise the tools are missing for one of these reasons, so do only what is missing: @@ -24,6 +24,16 @@ If you have only the tool `openscreenSetup`, the plugin's launcher is running bu - **The agent has no plugin support,** or you work in Codex, Cursor or another agent: register the server by hand, as below. **The app.** Its executable is the MCP server. The launcher checks these locations, and the environment variable `OPENSCREEN_EXE` overrides them: + + | OS | Executable | |---|---| @@ -38,11 +48,20 @@ Check every location in the table before you call OpenScreen missing: the Store - **Windows:** the Microsoft Store (`winget install --source msstore OpenScreen`), or the `Openscreen.Setup..exe` installer, run with `/S /currentuser` for a silent install for the current user. - **Linux:** the `.deb`, `.rpm` or `.pacman` for the distribution, or the `.AppImage` made executable. 2. Check `help` again. If even the latest release does not list `mcp`, this OpenScreen feature is not released yet: say so and stop. + 3. With the plugin, run `/reload-plugins` or start a new session: the launcher now finds the app. **The MCP server by hand,** only without the plugin's server: add it to the agent, then the tools load in the next session. - **Claude Code:** `claude mcp add openscreen -- "" mcp`. Not alongside the plugin's server, which would give you every tool twice. + + - **Codex:** `codex mcp add openscreen -- "" mcp` - **Cursor and others:** a stdio server with the executable as `command` and `["mcp"]` as `args`. @@ -52,7 +71,7 @@ Check every location in the table before you call OpenScreen missing: the Store **Hand over to the next session.** Write the user's request, and anything already decided, to `openscreen-demo-plan.md` in the working directory. Then ask the user to start a new session and say *continue the OpenScreen demo*. In that session, read the file and carry on from step 2. -The tools are missing right after the plugin, the app or the server is added: an agent loads its MCP servers when a session starts, or in Claude Code on `/reload-plugins`. Say so in plain words; when a reload is not possible, hand over as above, with the storyboard in the file if you have made one. Never stand in for the missing tools by driving OpenScreen's window with computer use or a mouse tool: it takes over the user's mouse and screen while they may be working. +The tools are missing right after the plugin, the app or the server is added: an agent loads its MCP servers when a session starts, or in Claude Code on `/reload-plugins`. Say so in plain words; when a reload is not possible, hand over as above, with the storyboard in the file if you have made one. Never stand in for the missing tools by driving OpenScreen's window with computer use or a mouse tool: it takes over the user's mouse and screen while they may be working. ## 2. Plan before recording From ae594862e313d7bbff3281de9f54ac01a9ca6d4a Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Nov 2026 10:22:58 +0000 Subject: [PATCH 2/3] fix(plugin): point the demo skill's headless take at the full plugin in the directory edition Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019SAKipREuKRNW28N1gsAuR --- plugin/skills/openscreen-demo/SKILL.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/skills/openscreen-demo/SKILL.md b/plugin/skills/openscreen-demo/SKILL.md index 699831052..25188da7a 100644 --- a/plugin/skills/openscreen-demo/SKILL.md +++ b/plugin/skills/openscreen-demo/SKILL.md @@ -114,7 +114,12 @@ For staging, choreography and a take recorded with no window at all, use the `op **A video you already have** needs no recording: `createProject` with its absolute `videoPath` lays it out as a project, and returns a `projectId` and a `checkpointId` as `stopRecording` does. Check it as a take in step 5, its `videoPath` included, then go on from step 6. + **A web app captured headless** (frame by frame, so no window opens on the desktop): the `openscreen-capture` skill ships a script that does it at twice the display scale and writes the pointer log. Then `createProject` with the video, and `setPointerTrack` with `recordingStartedAt: 0` and each `at` in milliseconds into the video. + + ## 5. Check the take From 652e3ae8fbe7388370a07f8fef9fa12f9d6820b9 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Nov 2026 10:23:40 +0000 Subject: [PATCH 3/3] fix(plugin): qualify the capture skill's headless choice in the directory edition Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019SAKipREuKRNW28N1gsAuR --- .github/scripts/build-plugin-mirror.mjs | 6 ++++-- .github/scripts/build-plugin-mirror.test.mjs | 8 ++++++++ plugin/skills/openscreen-capture/SKILL.md | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/scripts/build-plugin-mirror.mjs b/.github/scripts/build-plugin-mirror.mjs index 638bb26b1..f03724c7f 100644 --- a/.github/scripts/build-plugin-mirror.mjs +++ b/.github/scripts/build-plugin-mirror.mjs @@ -16,6 +16,7 @@ // +// // // The full plugin is installed straight from plugin/, where the directory text stays // an HTML comment. The directory edition drops the full-only text and unwraps the @@ -35,7 +36,8 @@ import { join, relative } from "node:path"; import { argv } from "node:process"; const FULL = /([\s\S]*?)\n?/g; -const DIRECTORY = /\n?/g; +// A block on its own lines, or inline on one line: . +const DIRECTORY = /\n?| (.*?) -->)/g; const MARKER = /x |\n", + ), + ).toBe("| y |\n"); + }); }); diff --git a/plugin/skills/openscreen-capture/SKILL.md b/plugin/skills/openscreen-capture/SKILL.md index cc2aebf6f..81ee51d05 100644 --- a/plugin/skills/openscreen-capture/SKILL.md +++ b/plugin/skills/openscreen-capture/SKILL.md @@ -13,11 +13,11 @@ A take is cheaper to redo than to repair. Aim for one that needs no cut: the fir |---|---|---| | A desktop app, a native window, anything a browser cannot show | `startRecording`, real mouse | Recorded with the take | | A web app the user wants filmed as they use it | `startRecording`, real mouse | Recorded with the take | -| A web app, a repeatable take, nothing on the user's screen | Headless script (below) | `setPointerTrack` from the script's log | +| A web app, a repeatable take, nothing on the user's screen | Headless script (below) | `setPointerTrack` from the script's log | | A web app shown in a real window, driven by Playwright or CDP | `startRecording`, script drives the page | `setPointerTrack` from the script's log | | A video file that already exists | `createProject` with its `videoPath` | `setPointerTrack` if you know the clicks | -**Prefer a real recording** when the thing to show is not a web page, needs the user's real data or session, involves sound from the app (`startRecording` with `systemAudio: true`), needs the webcam (`camera`) or a narration (`microphone: true`), or when the user wants to drive it themselves. Everything else in a browser is cleaner headless: same timing on every run, no hesitation, the user's screen untouched. +**Prefer a real recording** when the thing to show is not a web page, needs the user's real data or session, involves sound from the app (`startRecording` with `systemAudio: true`), needs the webcam (`camera`) or a narration (`microphone: true`), or when the user wants to drive it themselves. Everything else in a browser is cleaner headless: same timing on every run, no hesitation, the user's screen untouched. ## Stage the app