animate-10x-better 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,78 @@
1
- # Temporary Holding Version
1
+ # animate-10x-better
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Instantly install curated programmatic video, animation, motion-graphics, and slide-deck skills across any AI coding CLI or IDE (Claude Code, Kiro CLI V3, Cursor, Gemini CLI, Codex CLI, OpenCode, Antigravity) and inject a clean skill routing guide into `AGENTS.md`.
4
+
5
+ Zero external npm dependencies. Node.js 18+ ESM.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ npx animate-10x-better
11
+ ```
12
+
13
+ Or install non-interactively with all presets:
14
+
15
+ ```bash
16
+ npx animate-10x-better --yes
17
+ ```
18
+
19
+ Install globally (skills installed with `-g` and routing guide written to `~/.agents/AGENTS.md`):
20
+
21
+ ```bash
22
+ npx animate-10x-better --global --yes
23
+ ```
24
+
25
+ ## Presets & Skill Catalog
26
+
27
+ Pick a focused preset to keep your agent's context window lean, or install `all`.
28
+
29
+ ### `video` — Programmatic Video, Motion & Cloning
30
+ | Skill | Source Command | Best For |
31
+ | :--- | :--- | :--- |
32
+ | `reanimate` | `npx skills add NiazMorshed2007/reanimate -y` | Frame-by-frame animation cloning & reverse-engineering |
33
+ | `hyperframes` | `npx skills add heygen-com/hyperframes -y` | HTML/CSS/GSAP video rendering, 450+ blocks, captions, voiceovers |
34
+ | `remotion` | `npx skills add remotion-dev/skills -y` | React/TypeScript video templates, Mapbox/CesiumJS flyovers |
35
+ | `manim` | `npx skills add iart-ai/manim-skills --skill manim -y` | Math, LaTeX equations, proofs, and algorithm explainers (Python) |
36
+
37
+ ### `slides` — Developer Decks, Markdown Slides & PowerPoint
38
+ | Skill | Source Command | Best For |
39
+ | :--- | :--- | :--- |
40
+ | `slidev` | `npx skills add slidevjs/slidev --skill slidev -y` | Developer talks with Markdown, Vue components, and code diffs |
41
+ | `marp-slide` | `npx skills add jjmartres/ai-coding-agents --skill marp-slide -y` | Fast pure-Markdown slides exported to PDF/PPTX/HTML |
42
+ | `revealjs` | `npx skills add ryanbbrown/revealjs-skill --skill revealjs -y` | Single-file portable browser decks with fragments & speaker notes |
43
+ | `pptx` | `npx skills add anthropics/skills --skill pptx -y` | Editable PowerPoint (`.pptx`) decks via PptxGenJS |
44
+
45
+ ### `3d` — Procedural TypeScript Motion & 3D Choreography
46
+ | Skill | Source Command | Best For |
47
+ | :--- | :--- | :--- |
48
+ | `motion-canvas` | `npx skills add videozero/skills --skill motion-canvas -y` | Generator-based (`makeScene2D`) technical & architecture explainers |
49
+ | `theatre-js` | `npx skills add noklip-io/agent-skills --skill theatre-js -y` | Three.js / React Three Fiber keyframed 3D camera & scene timelines |
50
+
51
+ ### `all`
52
+ Installs all 10 skill entries above.
53
+
54
+ ## CLI Options
55
+
56
+ ```text
57
+ Usage:
58
+ npx animate-10x-better [options]
59
+
60
+ Options:
61
+ --preset <video|slides|3d|all> Select skill preset to install
62
+ -g, --global Install skills globally (-g) and write ~/.agents/AGENTS.md
63
+ -y, --yes Skip interactive prompts and use defaults (preset: all)
64
+ --dry-run Print commands and preview AGENTS.md changes without modifying anything
65
+ -h, --help Show help and exit
66
+ ```
67
+
68
+ ## Non-Destructive `AGENTS.md` & `CLAUDE.md` Updates
69
+
70
+ - Target file: `./AGENTS.md` (project mode) or `~/.agents/AGENTS.md` (`--global` mode).
71
+ - Uses `<!-- animate-10x-better:start -->` and `<!-- animate-10x-better:end -->` markers.
72
+ - Re-running replaces only the marked block in-place without duplicating content.
73
+ - Existing rules in `AGENTS.md` are always preserved.
74
+ - In project mode, if `./CLAUDE.md` exists and does not already reference `AGENTS.md`, `@AGENTS.md` is appended automatically so Claude Code loads it too.
75
+
76
+ ## License
77
+
78
+ MIT
package/bin/cli.mjs ADDED
@@ -0,0 +1,339 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "node:fs";
4
+ import path from "node:path";
5
+ import os from "node:os";
6
+ import { spawnSync } from "node:child_process";
7
+ import { createInterface } from "node:readline/promises";
8
+ import { fileURLToPath } from "node:url";
9
+
10
+ const START_MARKER = "<!-- animate-10x-better:start -->";
11
+ const END_MARKER = "<!-- animate-10x-better:end -->";
12
+
13
+ const PRESETS = {
14
+ video: [
15
+ { name: "reanimate", args: ["skills", "add", "NiazMorshed2007/reanimate", "-y"] },
16
+ { name: "hyperframes", args: ["skills", "add", "heygen-com/hyperframes", "-y"] },
17
+ { name: "remotion", args: ["skills", "add", "remotion-dev/skills", "-y"] },
18
+ { name: "manim", args: ["skills", "add", "iart-ai/manim-skills", "--skill", "manim", "-y"] },
19
+ ],
20
+ slides: [
21
+ { name: "slidev", args: ["skills", "add", "slidevjs/slidev", "--skill", "slidev", "-y"] },
22
+ { name: "marp-slide", args: ["skills", "add", "jjmartres/ai-coding-agents", "--skill", "marp-slide", "-y"] },
23
+ { name: "revealjs", args: ["skills", "add", "ryanbbrown/revealjs-skill", "--skill", "revealjs", "-y"] },
24
+ { name: "pptx", args: ["skills", "add", "anthropics/skills", "--skill", "pptx", "-y"] },
25
+ ],
26
+ "3d": [
27
+ { name: "motion-canvas", args: ["skills", "add", "videozero/skills", "--skill", "motion-canvas", "-y"] },
28
+ { name: "theatre-js", args: ["skills", "add", "noklip-io/agent-skills", "--skill", "theatre-js", "-y"] },
29
+ ],
30
+ };
31
+
32
+ PRESETS.all = [...PRESETS.video, ...PRESETS.slides, ...PRESETS["3d"]];
33
+
34
+ const VALID_PRESETS = Object.keys(PRESETS);
35
+
36
+ function printHelp() {
37
+ console.log(`animate-10x-better - Install programmatic video, animation, and slide-deck skills
38
+
39
+ Usage:
40
+ npx animate-10x-better [options]
41
+
42
+ Options:
43
+ --preset <video|slides|3d|all> Skill pack to install (default: interactive prompt, or "all" with --yes)
44
+ -g, --global Pass -g to npx skills add and write ~/.agents/AGENTS.md
45
+ -y, --yes Skip interactive prompts and use defaults
46
+ --dry-run Preview skill commands and AGENTS.md injection without making changes
47
+ -h, --help Show this help message and exit
48
+
49
+ Presets:
50
+ video Programmatic Video, Motion & Cloning (reanimate, hyperframes, remotion, manim)
51
+ slides Developer Decks, Markdown Slides & PowerPoint (slidev, marp-slide, revealjs, pptx)
52
+ 3d Procedural TypeScript Motion & 3D Choreography (motion-canvas, theatre-js)
53
+ all All 10 skills from video, slides, and 3d
54
+
55
+ Examples:
56
+ npx animate-10x-better
57
+ npx animate-10x-better --preset video
58
+ npx animate-10x-better --global --yes
59
+ npx animate-10x-better --dry-run --preset slides`);
60
+ }
61
+
62
+ function parseArgs(argv) {
63
+ const options = {
64
+ preset: null,
65
+ global: false,
66
+ yes: false,
67
+ dryRun: false,
68
+ help: false,
69
+ };
70
+
71
+ for (let i = 0; i < argv.length; i += 1) {
72
+ const arg = argv[i];
73
+
74
+ if (arg === "-h" || arg === "--help") {
75
+ options.help = true;
76
+ } else if (arg === "-g" || arg === "--global") {
77
+ options.global = true;
78
+ } else if (arg === "-y" || arg === "--yes") {
79
+ options.yes = true;
80
+ } else if (arg === "--dry-run") {
81
+ options.dryRun = true;
82
+ } else if (arg === "--preset") {
83
+ const value = argv[i + 1];
84
+ if (!value || value.startsWith("-")) {
85
+ throw new Error("Missing value for --preset. Expected one of: video, slides, 3d, all.");
86
+ }
87
+ options.preset = value.toLowerCase();
88
+ i += 1;
89
+ } else if (arg.startsWith("--preset=")) {
90
+ const value = arg.slice("--preset=".length);
91
+ if (!value) {
92
+ throw new Error("Missing value for --preset. Expected one of: video, slides, 3d, all.");
93
+ }
94
+ options.preset = value.toLowerCase();
95
+ } else {
96
+ throw new Error(`Unknown option: ${arg}`);
97
+ }
98
+ }
99
+
100
+ if (options.preset !== null && !VALID_PRESETS.includes(options.preset)) {
101
+ throw new Error(
102
+ `Invalid preset "${options.preset}". Expected one of: ${VALID_PRESETS.join(", ")}.`
103
+ );
104
+ }
105
+
106
+ return options;
107
+ }
108
+
109
+ async function promptForPreset() {
110
+ if (!process.stdin.isTTY) {
111
+ return "all";
112
+ }
113
+
114
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
115
+ try {
116
+ console.log("Select a skill preset to install:");
117
+ console.log(" 1) video (reanimate, hyperframes, remotion, manim)");
118
+ console.log(" 2) slides (slidev, marp-slide, revealjs, pptx)");
119
+ console.log(" 3) 3d (motion-canvas, theatre-js)");
120
+ console.log(" 4) all (all 10 skills - default)");
121
+
122
+ const choiceMap = {
123
+ "1": "video",
124
+ video: "video",
125
+ "2": "slides",
126
+ slides: "slides",
127
+ "3": "3d",
128
+ "3d": "3d",
129
+ "4": "all",
130
+ all: "all",
131
+ "": "all",
132
+ };
133
+
134
+ while (true) {
135
+ const answer = (await rl.question("Enter choice [1-4] (default: 4): ")).trim().toLowerCase();
136
+ if (answer in choiceMap) {
137
+ return choiceMap[answer];
138
+ }
139
+ console.log("Invalid selection. Please enter 1, 2, 3, 4, or a preset name.");
140
+ }
141
+ } catch {
142
+ return "all";
143
+ } finally {
144
+ rl.close();
145
+ }
146
+ }
147
+
148
+ function loadAgentsBlock() {
149
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
150
+ const templatePath = path.resolve(__dirname, "..", "templates", "agents-block.md");
151
+ return fs.readFileSync(templatePath, "utf8").trim();
152
+ }
153
+
154
+ function computeAgentsUpdate(existingContent, blockContent) {
155
+ if (existingContent === null) {
156
+ return {
157
+ action: "create",
158
+ content: `${blockContent}\n`,
159
+ };
160
+ }
161
+
162
+ const startIdx = existingContent.indexOf(START_MARKER);
163
+ const endIdx =
164
+ startIdx !== -1
165
+ ? existingContent.indexOf(END_MARKER, startIdx + START_MARKER.length)
166
+ : -1;
167
+
168
+ if (startIdx !== -1 && endIdx !== -1) {
169
+ const updated =
170
+ existingContent.slice(0, startIdx) +
171
+ blockContent +
172
+ existingContent.slice(endIdx + END_MARKER.length);
173
+ return {
174
+ action: "update",
175
+ content: updated,
176
+ };
177
+ }
178
+
179
+ if (existingContent.trim().length === 0) {
180
+ return {
181
+ action: "append",
182
+ content: `${blockContent}\n`,
183
+ };
184
+ }
185
+
186
+ const trimmedEnd = existingContent.replace(/(?:\r?\n)+$/, "");
187
+ return {
188
+ action: "append",
189
+ content: `${trimmedEnd}\n\n${blockContent}\n`,
190
+ };
191
+ }
192
+
193
+ function installSkills(skills, { globalInstall, dryRun }) {
194
+ const total = skills.length;
195
+ const succeeded = [];
196
+ const failed = [];
197
+
198
+ for (let i = 0; i < total; i += 1) {
199
+ const skill = skills[i];
200
+ const cmdArgs = globalInstall ? [...skill.args, "-g"] : [...skill.args];
201
+ const cmdDisplay = `npx ${cmdArgs.join(" ")}`;
202
+
203
+ if (dryRun) {
204
+ console.log(` [${i + 1}/${total}] ${skill.name}: ${cmdDisplay}`);
205
+ succeeded.push(skill.name);
206
+ continue;
207
+ }
208
+
209
+ console.log(`\n[${i + 1}/${total}] Installing ${skill.name}...`);
210
+ console.log(`> ${cmdDisplay}`);
211
+
212
+ const result = spawnSync("npx", cmdArgs, {
213
+ stdio: "inherit",
214
+ shell: process.platform === "win32",
215
+ });
216
+
217
+ if (result.error || result.status !== 0) {
218
+ const reason = result.error ? result.error.message : `exit code ${result.status}`;
219
+ console.warn(
220
+ `Warning: Failed to install "${skill.name}" (${reason}).\n` +
221
+ ` Run manually later: ${cmdDisplay}`
222
+ );
223
+ failed.push({ name: skill.name, command: cmdDisplay });
224
+ } else {
225
+ succeeded.push(skill.name);
226
+ }
227
+ }
228
+
229
+ return { succeeded, failed };
230
+ }
231
+
232
+ function applyAgentsInjection({ globalInstall, dryRun }) {
233
+ const targetPath = globalInstall
234
+ ? path.join(os.homedir(), ".agents", "AGENTS.md")
235
+ : path.join(process.cwd(), "AGENTS.md");
236
+
237
+ const blockContent = loadAgentsBlock();
238
+ const exists = fs.existsSync(targetPath);
239
+ const existingContent = exists ? fs.readFileSync(targetPath, "utf8") : null;
240
+ const { action, content } = computeAgentsUpdate(existingContent, blockContent);
241
+
242
+ const claudePath = !globalInstall ? path.join(process.cwd(), "CLAUDE.md") : null;
243
+ const shouldUpdateClaude =
244
+ Boolean(claudePath) &&
245
+ fs.existsSync(claudePath) &&
246
+ !fs.readFileSync(claudePath, "utf8").includes("AGENTS.md");
247
+
248
+ if (dryRun) {
249
+ console.log(`\n[dry-run] AGENTS.md target: ${targetPath} (action: ${action})`);
250
+ console.log("[dry-run] Block preview:\n");
251
+ console.log(blockContent);
252
+ if (shouldUpdateClaude) {
253
+ console.log(`\n[dry-run] Would also append @AGENTS.md to ${claudePath}`);
254
+ }
255
+ return;
256
+ }
257
+
258
+ fs.mkdirSync(path.dirname(targetPath), { recursive: true });
259
+ fs.writeFileSync(targetPath, content, "utf8");
260
+
261
+ const actionLabel =
262
+ action === "create"
263
+ ? "Created"
264
+ : action === "update"
265
+ ? "Updated existing animate-10x-better block in"
266
+ : "Appended routing guide to";
267
+ console.log(`\n${actionLabel}: ${targetPath}`);
268
+
269
+ if (shouldUpdateClaude) {
270
+ const claudeContent = fs.readFileSync(claudePath, "utf8");
271
+ const separator = claudeContent.endsWith("\n") ? "" : "\n";
272
+ fs.writeFileSync(claudePath, `${claudeContent}${separator}\n@AGENTS.md\n`, "utf8");
273
+ console.log(`Synced @AGENTS.md import into: ${claudePath}`);
274
+ }
275
+ }
276
+
277
+ async function main() {
278
+ let options;
279
+ try {
280
+ options = parseArgs(process.argv.slice(2));
281
+ } catch (err) {
282
+ console.error(`Error: ${err.message}\n`);
283
+ printHelp();
284
+ process.exit(1);
285
+ }
286
+
287
+ if (options.help) {
288
+ printHelp();
289
+ process.exit(0);
290
+ }
291
+
292
+ const preset = options.preset ?? (options.yes ? "all" : await promptForPreset());
293
+ const selectedSkills = PRESETS[preset];
294
+
295
+ console.log(
296
+ `\nanimate-10x-better — preset: "${preset}" (${selectedSkills.length} skill${
297
+ selectedSkills.length === 1 ? "" : "s"
298
+ }), scope: ${options.global ? "global (-g)" : "project"}${options.dryRun ? " [DRY RUN]" : ""}`
299
+ );
300
+
301
+ if (options.dryRun) {
302
+ console.log("\n[dry-run] Skill install commands that would run:");
303
+ }
304
+
305
+ const { succeeded, failed } = installSkills(selectedSkills, {
306
+ globalInstall: options.global,
307
+ dryRun: options.dryRun,
308
+ });
309
+
310
+ applyAgentsInjection({
311
+ globalInstall: options.global,
312
+ dryRun: options.dryRun,
313
+ });
314
+
315
+ if (!options.dryRun) {
316
+ console.log(
317
+ `\nDone! Installed ${succeeded.length}/${selectedSkills.length} skill(s).`
318
+ );
319
+ if (failed.length > 0) {
320
+ console.log("\nThe following skills failed and can be installed manually:");
321
+ for (const item of failed) {
322
+ console.log(` - ${item.name}: ${item.command}`);
323
+ }
324
+ }
325
+ }
326
+ }
327
+
328
+ export { PRESETS, parseArgs, loadAgentsBlock, computeAgentsUpdate, applyAgentsInjection };
329
+
330
+ const isDirectExecution =
331
+ Boolean(process.argv[1]) &&
332
+ fs.realpathSync(process.argv[1]) === fs.realpathSync(fileURLToPath(import.meta.url));
333
+
334
+ if (isDirectExecution) {
335
+ main().catch((err) => {
336
+ console.error(`Unexpected error: ${err.message}`);
337
+ process.exit(1);
338
+ });
339
+ }
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "animate-10x-better",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Install curated programmatic video, animation, and slide-deck skills across AI coding CLIs/IDEs and inject a clean routing guide into AGENTS.md.",
5
+ "type": "module",
6
+ "bin": {
7
+ "animate-10x-better": "bin/cli.mjs"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "templates",
12
+ "README.md"
13
+ ],
14
+ "engines": {
15
+ "node": ">=18"
16
+ },
17
+ "keywords": [
18
+ "ai-agents",
19
+ "agent-skills",
20
+ "agents-md",
21
+ "animation",
22
+ "programmatic-video",
23
+ "remotion",
24
+ "hyperframes",
25
+ "manim",
26
+ "motion-canvas",
27
+ "theatre-js",
28
+ "slidev",
29
+ "marp",
30
+ "revealjs",
31
+ "pptx",
32
+ "claude-code",
33
+ "cursor",
34
+ "codex",
35
+ "gemini-cli",
36
+ "antigravity"
37
+ ],
38
+ "license": "MIT"
39
+ }
@@ -0,0 +1,34 @@
1
+ <!-- animate-10x-better:start -->
2
+ # Programmatic Video, Animation & Presentation Routing (`animate-10x-better`)
3
+
4
+ You have specialized skills installed for programmatic video, motion graphics, animation reverse-engineering, and slide decks. **Never build animations or presentations from scratch without first selecting and loading the matching skill.**
5
+
6
+ ## 1. Decision Matrix: What & When to Use Each Skill
7
+
8
+ | Goal / Deliverable | Skill to Invoke | When to Choose It |
9
+ | :--- | :--- | :--- |
10
+ | **Clone / Reverse-Engineer an Existing Animation** | `/reanimate` | User shares a live URL, screen recording, MP4, GIF, or Lottie and wants an exact frame-by-frame rebuild in CSS, Framer Motion, GSAP, or Three.js. |
11
+ | **HTML-First Videos, Product Launches & Voiceovers** | `/hyperframes` (`/hyperframes-registry`, `/media-use`) | Best for fast HTML/CSS/GSAP videos rendered to MP4, using 450+ pre-built visual blocks, kinetic captions, charts/maps, or generating voiceovers/SFX. |
12
+ | **React / TypeScript Programmatic Video** | `/remotion-best-practices` (`/remotion-create`, `/remotion-maps`) | Best when the user wants React components, data-driven video templates, Mapbox/CesiumJS route flyovers, or SaaS video rendering pipelines. |
13
+ | **Math, Equations, Proofs & Algorithm Explainers** | `/manim` | Best for LaTeX formulas, coordinate graphs, vectors, geometric proofs, and step-by-step computer science / algorithm visualizations (Python). |
14
+ | **Procedural TypeScript Motion & Code Diagrams** | `/motion-canvas` | Best for generator-based (`makeScene2D`) technical explainers, system architecture animations, and smooth code transitions in TypeScript. |
15
+ | **3D Scenes & Keyframed Camera Choreography** | `/theatre-js` | Best for Three.js / React Three Fiber (`@theatre/r3f`) scenes needing keyframed timeline control, camera paths, and exported animation state. |
16
+ | **Developer Talk Slides (Markdown + Vue + Code)** | `/slidev` | Best for technical talks needing live code diffs, Shiki highlighting, interactive Vue components, and click-step animations. |
17
+ | **Fast Pure-Markdown Slides** | `/marp-slide` | Best for quick lecture notes, internal docs, or clean bullet-driven decks exported straight from a single `.md` file to PDF/PPTX/HTML. |
18
+ | **Standalone Browser Deck (Zero Build Step)** | `/revealjs` | Best when the user wants a single portable HTML presentation with 2D vertical slide stacks, fragments, and speaker notes. |
19
+ | **Editable PowerPoint (`.pptx`) Deck** | `/pptx` | Best when the user explicitly needs an editable `.pptx` file for stakeholders, built programmatically with **PptxGenJS**. |
20
+
21
+ ## 2. How to Execute (Mandatory Workflow)
22
+
23
+ 1. **Load One Engine Skill First:** Activate the single best skill from the table above before installing packages or scaffolding files. Do NOT mix video/slide engines in the same project unless explicitly requested.
24
+ 2. **Use Official Scaffolds & Registries:**
25
+ - **HyperFrames:** Check `/hyperframes-registry` (`npx hyperframes catalog`) before hand-coding transitions/blocks. Preview with `npx hyperframes preview`, render with `npx hyperframes render`.
26
+ - **Remotion:** Scaffold via `npx create-video@latest` and render via `npx remotion render`.
27
+ - **Reanimate:** Capture using a virtual clock (`--clock virtual`, plus `--gl` for Canvas/WebGL) for deterministic frame diffs.
28
+ - **Manim:** Render fast low-res previews (`manim -pql scene.py SceneName`) before final high-res (`-pqh`).
29
+ - **Slidev / Marp / Reveal.js / PPTX:** Enforce one core idea per slide—split dense slides rather than shrinking text below readable sizes.
30
+ 3. **Mandatory Visual Verification Loop (Token-Safe):**
31
+ - Never assume compiling code looks good. Render sample frames at key timestamps (start, mid-action, end) or convert slides to images (`pdftoppm` / Playwright / thumbnail script).
32
+ - Inspect the rendered images for clipped text, overlapping elements, contrast, and safe margins.
33
+ - Cap visual fix loops at **2–3 tight iterations** and report the exact final file path (`output.mp4`, `deck.pptx`, `presentation.html`).
34
+ <!-- animate-10x-better:end -->