From 410a516ceec79177c6e456e73f9f8aca974f45d8 Mon Sep 17 00:00:00 2001 From: WaterrrForever Date: Fri, 6 Nov 2026 11:19:34 +0000 Subject: [PATCH] fix(skills): reverse hands billing commands to the person instead of running them (#7314) * fix(skills): reverse hands billing commands to the person instead of running them The Snyk audit on skills.sh still fails reverse-any-video on E004 because the skill has the agent run `billing subscribe` and `billing add-credits` itself. media-use, which hands the person the billing command instead, passes the same audit. reverse now does the same: on Free it gives the upgrade link and the subscribe command for the person to run, and mid-run it gives one add-credits command for the run's total. It waits until they say they're done, then starts again or relaunches the refused steps. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HebQXQjEiSeVmhvTbJvSAw * test(skills): pin reverse's billing handoff per payment section start.md's opening said the agent runs every command, which contradicts the billing sections below it. It now excludes `billing` and says the person opens and pays on the upgrade and add-on credits pages. The test now checks the handoff itself. Both payment sections must give the person the command and forbid running billing. Neither may tell the agent to run, execute or launch a billing command, and SKILL.md must keep its prohibition. Each of those mutations, and main's start.md, fails the test. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HebQXQjEiSeVmhvTbJvSAw * fix(skills): reverse hands over one add-credits for the run when an amount is unknown "If a refusal prints no amount, give plain `billing add-credits` for that one" let the agent hand over a purchase for each step with no amount, on top of the aggregate one. Now, if any refusal prints no amount, the total is unknown and the person gets one plain add-credits for the whole run, never one per step. The test now requires that sentence and rejects a per-step fallback in the out-of-credits section, even when the aggregate sentence is still there. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HebQXQjEiSeVmhvTbJvSAw --------- Co-authored-by: Claude Opus 5.5 --- scripts/check-core-skills.test.mjs | 35 +++++++++++++++- skills-manifest.json | 2 +- skills/reverse-any-video/SKILL.md | 2 +- skills/reverse-any-video/references/start.md | 43 ++++++++++---------- 4 files changed, 57 insertions(+), 25 deletions(-) diff --git a/scripts/check-core-skills.test.mjs b/scripts/check-core-skills.test.mjs index 45b7aaba9d..a1859efec5 100644 --- a/scripts/check-core-skills.test.mjs +++ b/scripts/check-core-skills.test.mjs @@ -48,12 +48,45 @@ test("reverse builds the project with init --video and asks for the run's total ); assert.match( start, - /add up what each refused step\s+needs, and run `npx hyperframes billing (?:top-up|add-credits) --needed (?: --skill reverse-any-video)?` once for that total/, + /add up what each refused step\s+needs, and give them `npx hyperframes billing (?:top-up|add-credits) --needed (?: --skill reverse-any-video)?` to run once for that total/, ); assert.doesNotMatch(read("SKILL.md"), /copy the video into the project/); assert.match(read("SKILL.md"), /`init --video` put the video in/); }); +test("reverse hands every purchase to the person instead of running billing itself", () => { + const read = (path) => + readFileSync(new URL(`../skills/reverse-any-video/${path}`, import.meta.url), "utf8"); + const start = read("references/start.md"); + const section = (heading) => start.split(`## ${heading}`)[1].split("\n## ")[0]; + assert.match( + read("SKILL.md"), + /give the person its upgrade link and `fix` to run themselves \(you never run `billing`\)/, + ); + assert.match(start, /You run every command except `billing`, which\s+is theirs/); + assert.doesNotMatch(start, /you run every command,/); + const outOfCredits = section("Out of credits mid-run"); + assert.match( + outOfCredits, + /If any refusal prints no amount, the total is unknown:\s+give plain `billing add-credits` once instead, for the whole run/, + ); + assert.doesNotMatch( + outOfCredits, + /for that one|for each (?:refused )?step|one per (?:refused )?step(?!\.)/, + ); + for (const heading of ["Signed in on Free", "Out of credits mid-run"]) { + const text = section(heading); + assert.match(text, /never run a `billing` command yourself/, heading); + assert.match(text, /for them to run|to run once for that total/, heading); + const rest = text.replace("never run a `billing` command yourself", ""); + assert.doesNotMatch( + rest, + /\b(?:run|execute|launch)\b[^.\n]{0,60}(?:`(?:npx hyperframes )?billing|`reverse\.subscribe_command`)/i, + heading, + ); + } +}); + test("flags a skill that never reports its own run", () => { assert.deepEqual( beaconProblems("slideshow", "Run `npx hyperframes events --skill=slideshow` first."), diff --git a/skills-manifest.json b/skills-manifest.json index 90499b61c5..3a0e039cc6 100644 --- a/skills-manifest.json +++ b/skills-manifest.json @@ -26,7 +26,7 @@ "files": 76 }, "reverse-any-video": { - "hash": "e4c3ac45f5deb337", + "hash": "f94599be483b10df", "files": 5 }, "slideshow": { diff --git a/skills/reverse-any-video/SKILL.md b/skills/reverse-any-video/SKILL.md index f01c3e76c8..6541cf9fd5 100644 --- a/skills/reverse-any-video/SKILL.md +++ b/skills/reverse-any-video/SKILL.md @@ -11,7 +11,7 @@ description: Rebuild any video file as an editable HyperFrames project - motion The result is a HyperFrames project whose render matches the original frame for frame and stays editable. Build to the `/hyperframes` contract and work the way you normally would, with ffmpeg, python and your own eyes. Reverse videos the person has the right to use. -Reverse is a HyperFrames Pro feature. Open with `npx hyperframes reverse start