Skip to content

Commit ed948a8

Browse files
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01HebQXQjEiSeVmhvTbJvSAw
1 parent cb8e02e commit ed948a8

4 files changed

Lines changed: 23 additions & 22 deletions

File tree

‎scripts/check-core-skills.test.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ test("reverse builds the project with init --video and asks for the run's total
4848
);
4949
assert.match(
5050
start,
51-
/add up what each refused step\s+needs, and run `npx hyperframes billing (?:top-up|add-credits) --needed <total>(?: --skill reverse-any-video)?` once for that total/,
51+
/add up what each refused step\s+needs, and (?:run|give them) `npx hyperframes billing (?:top-up|add-credits) --needed <total>(?: --skill reverse-any-video)?`(?: to run)? once for that total/,
5252
);
53+
assert.doesNotMatch(start, /then run the `reverse\.subscribe_command`/);
54+
assert.doesNotMatch(start, /\n\s*run `npx hyperframes billing/);
5355
assert.doesNotMatch(read("SKILL.md"), /copy the video into the project/);
5456
assert.match(read("SKILL.md"), /`init --video` put the video in/);
5557
});

‎skills-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"files": 76
2727
},
2828
"reverse-any-video": {
29-
"hash": "e4c3ac45f5deb337",
29+
"hash": "a4e1c95ba4cd0ed4",
3030
"files": 5
3131
},
3232
"slideshow": {

‎skills/reverse-any-video/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: Rebuild any video file as an editable HyperFrames project - motion
1111

1212
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.
1313

14-
Reverse is a HyperFrames Pro feature. Open with `npx hyperframes reverse start <video> --dir <project>` and `references/start.md`; if it refuses, run its `fix` (`billing subscribe` opens the plans page, where the person sees the price and decides, and waits for the upgrade), then start again. Given a link, run `npx hyperframes auth status` before downloading it. Resuming (a `REVERSE.md` or half-built project) opens the same. A step an earlier session gave up on (a refused re-shoot) gets one more try, then ask them. If it ran under a credit limit, ask whether that limit still holds. Rebuild the video as it is; remix it only when the person asks.
14+
Reverse is a HyperFrames Pro feature. Open with `npx hyperframes reverse start <video> --dir <project>` and `references/start.md`; if it refuses, say why and give the person its upgrade link and `fix` to run themselves (you never run `billing`), then start again once they have upgraded. Given a link, run `npx hyperframes auth status` before downloading it. Resuming (a `REVERSE.md` or half-built project) opens the same. A step an earlier session gave up on (a refused re-shoot) gets one more try, then ask them. If it ran under a credit limit, ask whether that limit still holds. Rebuild the video as it is; remix it only when the person asks.
1515

1616
## The original decides the frame
1717

‎skills/reverse-any-video/references/start.md‎

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,18 @@ one. Never sign in with an API key to get past Pro: that signs in a HeyGen app a
3838

3939
## Signed in on Free
4040

41-
Reverse is part of Pro. Say why in one line, then run the `reverse.subscribe_command` from `reverse start` exactly as
42-
printed (`npx hyperframes billing subscribe --feature reverse --skill reverse-any-video --session <id>`): it opens the plans page in the person's
43-
browser, where they see the price and decide; payment happens only there, by them. It credits the purchase to this run
44-
and waits until they are on Pro, so the run goes on by itself. Start nothing
45-
before it finishes. Give the `reverse.upgrade_url`, when it isn't `null`, as a link in the same message. For example:
41+
Reverse is part of Pro. Upgrading is the person's to do: never run a `billing` command yourself. Say why in one line and
42+
give them the `reverse.upgrade_url` as a link, and the `reverse.subscribe_command` exactly as printed
43+
(`npx hyperframes billing subscribe --feature reverse --skill reverse-any-video --session <id>`) for them to run instead
44+
if they prefer: either opens the plans page, where they see the price and decide. Start nothing until they say they are
45+
on Pro, then run `reverse start` again. For example:
4646

47-
> Reverse is part of HyperFrames Pro: it re-shoots the people in your video with HeyGen. I've opened the upgrade page in
48-
> your browser (or open it here: <upgrade_url>) and I'll carry on as soon as you're subscribed.
47+
> Reverse is part of HyperFrames Pro: it re-shoots the people in your video with HeyGen. Upgrade here: <upgrade_url>
48+
> (or run `<subscribe_command>`), then tell me and I'll carry on.
4949
50-
When `reverse start` refuses the run (it exits with an error whose `fix` is that command), run the `fix` the same way,
51-
then run `reverse start` again. When `subscribe_command` is `null` (or the refusal names no command), a plan can't be
52-
purchased right now: say so plainly, give no link, run nothing, and stop. If the command times out, tell the person
53-
and run it again once they say they are ready.
50+
When `reverse start` refuses the run (it exits with an error whose `fix` is that command), do the same with its `fix`.
51+
When `subscribe_command` and `upgrade_url` are `null` (or the refusal names no command), a plan can't be purchased right
52+
now: say so plainly, give no link, and stop.
5453

5554
## Signed in on Pro
5655

@@ -63,15 +62,15 @@ or at the end of a run. `reverse start` and `auth status` are for the sign-in: d
6362

6463
## Out of credits mid-run
6564

66-
A refused step prints what it needs and the command that fixes it (buy add-on credits, or pick a plan). Shots are launched all
67-
at once, so several refuse together: wait until every launched step has answered, add up what each refused step
68-
needs, and run `npx hyperframes billing add-credits --needed <total> --skill reverse-any-video` once for that total, never one step at a time. If a
69-
refusal prints no amount, run plain `billing add-credits` for that one. It opens the add-on credits page, where they see the
70-
price, and waits until the balance covers the total; give the refusal's `url` (on an older CLI, the link in its `fix`) as a
71-
link in the same message. Then relaunch every refused step, keeping the plan whole.
65+
A refused step prints what it needs and the command that fixes it (buy add-on credits, or pick a plan). Buying is the
66+
person's to do: never run a `billing` command yourself. Shots are launched all at once, so several refuse together: wait
67+
until every launched step has answered, add up what each refused step needs, and give them `npx hyperframes billing add-credits --needed <total> --skill reverse-any-video` to run once for that total, never one step at a time, with the
68+
refusal's `url` (on an older CLI, the link in its `fix`) as a link. If a refusal prints no amount, give plain
69+
`billing add-credits` for that one. Either opens the add-on credits page, where they see the price. When they say their
70+
balance is topped up, relaunch every refused step, keeping the plan whole.
7271

73-
> Three steps need 633 credits together and you have 30. I've opened the add-on credits page in your browser (or open it here:
74-
> <url>); I'll pick up right where I stopped once your balance covers them.
72+
> Three steps need 633 credits together and you have 30. Add credits here: <url> (or run
73+
> `npx hyperframes billing add-credits --needed 633 --skill reverse-any-video`), then tell me and I'll pick up right where I stopped.
7574
7675
## Handing it over
7776

0 commit comments

Comments
 (0)