Communitygithub.com

papercut-shorts

Use when asked to make an animated short video, Reel, YouTube Short or TikTok — a 30–60 s vertical animated story or explainer (history, facts, product story, how-it-works) — rendered locally in a paper-cut 2D style with captions and original music, no AI video generator.

What is papercut-shorts?

papercut-shorts is a Claude Code agent skill that use when asked to make an animated short video, Reel, YouTube Short or TikTok — a 30–60 s vertical animated story or explainer (history, facts, product story, how-it-works) — rendered locally in a paper-cut 2D style with captions and original music, no AI video generator.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mominbot999/papercut-shorts/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Paper-cut animated shorts

Make 30–60 second vertical (1080×1920) animated shorts in a layered paper-cut style: flat cut-out shapes with soft cast shadows, paper grain, parallax camera moves, word-by-word captions, and an original synthesized music bed with sound effects. Everything is HTML/SVG rendered frame-by-frame in headless Chrome and encoded with ffmpeg. The repo root (where this file lives) is ROOT below.

Pipeline

  1. Topic and facts. Agree the topic and the one-sentence takeaway with the user. For factual topics (history, science, news), research and verify every fact with at least two sources before writing. Keep the source list; it goes on the end card and in a comment at the top of story.js. Never invent dates, names, numbers or quotes.
  2. Script. Write 7–10 captions, one per shot, using the formula in references/story-guide.md: hook question → setting → characters → problem → turning point → payoff → why it matters → share CTA. Each caption ≤ 12 words (≤ 2 lines). Mark one key word per caption with *asterisks* (accent colour). Show the script to the user if they are around; otherwise proceed.
  3. Shot plan. Create stories/<slug>/story.js (copy stories/first-bangla-type/story.js as a starting point). For each shot pick a sky, 3–7 layers from references/assets.md, a camera move and entrance animations. Read references/story-guide.md for timing and composition rules.
  4. Stills check. python3 scripts/stills.py stories/<slug> renders 3 stills per shot plus sheet.jpg. Look at the sheet and fix: captions overlapping objects, things cut off at the edges, empty-looking shots, unreadable text, characters floating above the ground. Repeat until every shot looks deliberate.
  5. Render. python3 scripts/render.py stories/<slug> → stories/<slug>/<slug>.mp4 (H.264 + AAC, -14 LUFS target). Use --voice voice.mp3 to mix in a voiceover (music ducks under it), --scale 1.3333 for 1440×2560.
  6. QA the video. Grab frames at a few timestamps with ffmpeg (ffmpeg -ss T -i out.mp4 -frames:v 1 f.jpg) and look at them, especially at shot boundaries. Check the duration and that audio is present (ffprobe).
  7. Deliver the MP4, plus a suggested post caption and 3–5 hashtags in the video's language.

Requirements: Python 3.9+, pip install playwright numpy pillow and python3 -m playwright install chromium (or an installed Chrome), and ffmpeg.

story.js essentials

window.STORY = {
  title: "…", fps: 30, width: 1080, height: 1920,
  lang: "bn",                       // caption language (sets the font); omit for English
  music: { bpm: 92, key: "D" },     // original music bed is generated from this
  shots: [{
    dur: 5.5,                       // seconds
    sky: "dawn",                    // dawn | day | dusk | night | paper
    camera: { from: { x: -70, zoom: 1 }, to: { x: 70, zoom: 1.06 } },
    caption: "*১৭৭৮* সাল। হুগলি নদীর পাড়।",
    captionStyle: "hook",           // hook (top, big) | card (centre) | default (lower third)
    layers: [
      { asset: "hills", y: 1520, depth: 0.2, opts: { color: "#8fae6a" } },
      { asset: "person", x: 360, y: 1290, depth: 0.6, scale: 1.2,
        opts: { coat: "#c8553d", pose: "write", hat: "tricorn" },
        in: { type: "slide-l", at: 0.1 }, loop: { type: "bob" } },
    ],
  }],
};
  • x, y = bottom-centre of the asset on the 1080×1920 stage. The ground line is usually y≈1250–1300.
  • depth 0 (far, barely moves) … 1 (near, moves most with the camera).
  • Entrances in.type: pop, rise, drop, slide-l, slide-r, fade, grow. Loops loop.type: bob, float, sway, drift, write, stamp, pulse, spin.
  • Captions sit at y 1300–1560 in the default style. Keep that band free of important objects, and make sure the background behind it is mid-to-dark so white text reads.

Style rules

  • One idea per shot, 4–6 s each; the hook shot 3.5–4.5 s; total 40–60 s.
  • Every shot moves: a slow camera move plus at least one entrance or loop. No static slides.
  • Characters stand on the ground (feet at the ground line), never float.
  • Max 3 accent colours per shot from the palette in references/assets.md. Skin tones should fit the place and people of the story.
  • Hook first: the first shot asks the question the video answers. No logo intro, no "hello everyone".
  • End card: share/follow CTA + sources (for factual videos).
  • Use only original assets from engine/assets.js or new ones drawn in the same flat style. Don't trace copyrighted characters or logos.
  • To add an asset, add a function to engine/assets.js returning { w, h, svg }, and document it in references/assets.md.

Related Skills