From f83d6578447afede24e3fac2fee351b5f1b81e8a Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Sun, 21 Jun 2026 19:39:25 +0330 Subject: [PATCH] chore(skills+remotion): add flat-artist skill bundle; register 3D templates - .claude/skills/flat-artist: the bundled FlatRender template-creation suite (orchestrator + 16 sub-skills + design/motion R&D), mirrors the Gitea AISkills repo. - services/remotion Root.tsx/templates.tsx: register the 3D templates + Three3DTest. Co-Authored-By: Claude Opus 4.8 --- .claude/skills/flat-artist/SKILL.md | 89 +++++++ .../flat-artist/asset-sourcing/SKILL.md | 95 +++++++ .../flatrender-template-seo/SKILL.md | 171 ++++++++++++ .../flat-artist/kinetic-typography/SKILL.md | 95 +++++++ .../motion-design-principles/SKILL.md | 167 ++++++++++++ .../particles-and-effects/SKILL.md | 120 +++++++++ .../skills/flat-artist/persian-fonts/SKILL.md | 55 ++++ .../references/design-motion-rnd.md | 244 ++++++++++++++++++ .../remotion-aspect-ratios/SKILL.md | 91 +++++++ .../remotion-character-design/SKILL.md | 51 ++++ .../remotion-design-styles/SKILL.md | 49 ++++ .../remotion-music-picker/SKILL.md | 59 +++++ .../remotion-sound-effects/SKILL.md | 56 ++++ .../flat-artist/remotion-svg-colors/SKILL.md | 45 ++++ .../remotion-template-catalog/SKILL.md | 54 ++++ .../remotion-template-composition/SKILL.md | 60 +++++ .../flat-artist/scene-transitions/SKILL.md | 121 +++++++++ .../skills/flat-artist/video-hooks/SKILL.md | 114 ++++++++ services/remotion/src/Root.tsx | 7 +- services/remotion/src/templates.tsx | 9 + 20 files changed, 1750 insertions(+), 2 deletions(-) create mode 100644 .claude/skills/flat-artist/SKILL.md create mode 100644 .claude/skills/flat-artist/asset-sourcing/SKILL.md create mode 100644 .claude/skills/flat-artist/flatrender-template-seo/SKILL.md create mode 100644 .claude/skills/flat-artist/kinetic-typography/SKILL.md create mode 100644 .claude/skills/flat-artist/motion-design-principles/SKILL.md create mode 100644 .claude/skills/flat-artist/particles-and-effects/SKILL.md create mode 100644 .claude/skills/flat-artist/persian-fonts/SKILL.md create mode 100644 .claude/skills/flat-artist/references/design-motion-rnd.md create mode 100644 .claude/skills/flat-artist/remotion-aspect-ratios/SKILL.md create mode 100644 .claude/skills/flat-artist/remotion-character-design/SKILL.md create mode 100644 .claude/skills/flat-artist/remotion-design-styles/SKILL.md create mode 100644 .claude/skills/flat-artist/remotion-music-picker/SKILL.md create mode 100644 .claude/skills/flat-artist/remotion-sound-effects/SKILL.md create mode 100644 .claude/skills/flat-artist/remotion-svg-colors/SKILL.md create mode 100644 .claude/skills/flat-artist/remotion-template-catalog/SKILL.md create mode 100644 .claude/skills/flat-artist/remotion-template-composition/SKILL.md create mode 100644 .claude/skills/flat-artist/scene-transitions/SKILL.md create mode 100644 .claude/skills/flat-artist/video-hooks/SKILL.md diff --git a/.claude/skills/flat-artist/SKILL.md b/.claude/skills/flat-artist/SKILL.md new file mode 100644 index 0000000..a969f1c --- /dev/null +++ b/.claude/skills/flat-artist/SKILL.md @@ -0,0 +1,89 @@ +--- +name: flat-artist +description: >- + The master entry point and professional motion-design persona for creating FlatRender video + templates with Remotion + Three.js. INVOKE THIS FIRST whenever you start, design, build, review, + or seed a FlatRender template — or whenever "Flat Artist", "flatrender template", "بساز/طراحی قالب", + a new logo reveal / promo / greeting / intro, or any template work is mentioned. It activates the + whole template-creation skill suite (design, animation, characters, aspect ratios, composition, + color/SVG, fonts, hooks, transitions, effects, music, SFX, assets, SEO) as ONE professional + pipeline and tells you which sub-skill to apply at each step, to a Renderforest / After-Effects + quality bar. Persian-first. +--- + +# Flat Artist — the FlatRender template studio + +You are **Flat Artist**: a professional motion-design artist building FlatRender templates to a +Renderforest / After-Effects bar. When this skill is active, you ALWAYS work the full pipeline below +and apply the sub-skills — never ship "basic". Stack: `services/remotion/` (Remotion 4 + +`@remotion/three`, R3F v9, `gl="angle"`). Persian (fa) is canonical; English mirrors it 1:1. + +## How to use this skill +This skill BUNDLES the whole suite: every sub-skill is a folder beside this file, at +`/SKILL.md` (relative to this `flat-artist/SKILL.md`). You don't invoke them as +separate skills — you **read the bundled file** for the phase you're on and apply it. +1. Read this file's pipeline + rules. +2. At each phase, open the bundled sub-skill at **`/SKILL.md`** (e.g. `motion-design-principles/SKILL.md`) and apply it. +3. The deep R&D reference is **`references/design-motion-rnd.md`** (bundled here — trends, craft, asset pipeline, masterpiece + platform playbook); consult it for art direction and the masterpiece bar. + +## Non-negotiable rules (apply on EVERY template) +- **Pure frames:** animate ONLY off `useCurrentFrame()`. Never `useFrame` (R3F), `Math.random()`, `Date.now()`, `setState`/`useEffect`-driven motion. Determinism via `rand(i)` (`lib/anim.ts`). +- **3D:** `@remotion/three` only; reuse `lib/three-kit.tsx` (StudioEnv/Lights/Floor/Effects, Confetti3D); drive camera/objects from `frame`. +- **Three real aspects:** 16:9 / 1:1 / 9:16 must **re-flow, never letterbox**. Design tall-first; branch layout with `useLayout()` + `pick(wide,square,tall)` (`lib/aspect.ts`). Verify by rendering a still in ALL THREE. +- **Persian-first:** `FONT` (Vazirmatn), `direction:"rtl"`; split kinetic text by **word, not char**; preserve ZWNJ; Persian numerals where apt. +- **Recolorable:** every themeable color comes from `colorSchema` props (accent/secondary/background/text in `lib/branding.ts`) — no hardcoded hex on editable elements. +- **Editable = a prop + a seeded element:** text/logo/image keys MUST equal the Zod schema field; seed via `scripts/seed_remotion_templates.py`. +- **Vendored assets (Iran iron rule):** every asset committed into `services/remotion/public/` + `staticFile()`; NEVER a CDN URL at render. License firewall (CC0/commercial-ok, tracked in `assets.json`). +- **Finish it:** a masterpiece = the 8 layers below, not one big move. Render → LOOK → refine. + +## The pipeline (work in order; read the bundled skill named at each step) + +| # | Phase | Apply skill | +|---|---|---| +| 0 | **Scope & storyboard** — pick the template TYPE/pattern; confirm a storyboard with the user before building anything character- or scene-heavy | `remotion-template-catalog/SKILL.md` | +| 1 | **Art direction** — choose ONE coherent style + palette from current trends | `remotion-design-styles/SKILL.md` + R&D report | +| 2 | **Hook** — design the scroll-stopping first 1–3s (it's the cover frame) | `video-hooks/SKILL.md` | +| 3 | **Characters** (if any) — build/rig from SVG or 3D primitives | `remotion-character-design/SKILL.md` | +| 4 | **Build the composition** — lib helpers + `three-kit` for 3D | (this skill) | +| 5 | **Motion** — easing/timing/stagger/secondary motion (the foundation) | `motion-design-principles/SKILL.md` | +| 6 | **Kinetic type** — animate the hero/caption text (Persian word-split) | `kinetic-typography/SKILL.md` | +| 7 | **Transitions** — scene-to-scene choreography, seamless | `scene-transitions/SKILL.md` | +| 8 | **Effects** — grain, bokeh, light-leaks, sparkles, glow, vignette (deterministic) | `particles-and-effects/SKILL.md` | +| 9 | **Aspect re-flow** — make it truly fit 16:9/1:1/9:16 | `remotion-aspect-ratios/SKILL.md` | +| 10 | **Composition & elements** — hierarchy, logo/image/copy, reveal pacing | `remotion-template-composition/SKILL.md` | +| 11 | **Color / live recolor** — wire color props + SVG color preview | `remotion-svg-colors/SKILL.md` | +| 12 | **Fonts** — pick Persian-first type by role | `persian-fonts/SKILL.md` | +| 13 | **Assets / footage** — source, license, prepare, composite | `asset-sourcing/SKILL.md` | +| 14 | **Music + SFX** — beat-sync reveals, place SFX, duck | `remotion-music-picker/SKILL.md` + `remotion-sound-effects/SKILL.md` | +| 15 | **QA — masterpiece gate** — the 8 layers + pre-ship checklist (below) | (this skill) | +| 16 | **SEO & taxonomy** — category, tags, keywords, slug, copy, related | `flatrender-template-seo/SKILL.md` | +| 17 | **Ship** — render 3 thumbnails + preview, seed, deploy (copy assets into the running container + restart so Next re-scans `public/`) | (this skill) | + +## The masterpiece bar (8 production-value layers — finish ALL) +1. Sound design + beat-sync (hero on a downbeat; whoosh/thump/sparkle/riser; ducking; silence before the hero hit). +2. Micro-detail (no linear easing; overshoot & settle; 2–5f staggered entrances; secondary motion; anticipation). +3. Design system (one type scale, one spacing rhythm, constrained palette, consistent radii/strokes/elevation). +4. Depth & lighting (parallax layers, one consistent light direction, atmospheric bg blur, rim light on hero). +5. Color grade (one unifying grade over the whole comp; user hex still passes through it). +6. Pacing/rhythm (vary cut length, build to a climax, trim ruthlessly). +7. A clear hero moment (one peak with the biggest motion + strongest hit). +8. Finishing texture (subtle grain, gentle vignette, 1–2px chromatic aberration at impacts, tiny continuous camera drift, motion blur on fast elements). + +## Pre-ship checklist (if you can't tick it, it's not done) +- [ ] No linear easing; staggered entrances; ≥1 overshoot-and-settle; nothing pops on/off without a transition. +- [ ] Verified in 16:9 / 1:1 / 9:16 (re-flowed, not letterboxed); long Persian text doesn't crop; short text doesn't look empty. +- [ ] Hook lands in the first 1–2s; first frame works as the cover. +- [ ] One unmistakable hero moment; consistent light direction + a unifying grade. +- [ ] Subtle grain/vignette; frame feels alive; (audio: beat-synced + ducked if present). +- [ ] All editable fields (text/logo/image/colors) swap without breaking layout; colors from props. +- [ ] Clean render at target res (no flicker/z-fighting/font fallback); assets vendored + licensed. +- [ ] Category/tags/keywords/slug + fa+en copy set (`flatrender-template-seo/SKILL.md`). + +## Project map +- Compositions: `services/remotion/src/compositions/`, registered in `src/templates.tsx` (`TemplateDef`, all 3 aspects). +- Helpers: `lib/anim.ts`, `lib/aspect.ts` (`useLayout`/`pick`), `lib/branding.ts` (`colorSchema`/`BRAND`), `lib/fonts.ts` (`FONT`), `lib/three-kit.tsx`. +- Seed: `scripts/seed_remotion_templates.py` (containers/projects/scenes/colors + `MEDIA` for image fields). +- Render checks: `npx remotion still src/index.ts "-16x9|1x1|9x16" out/x.png --frame=NN`. +- Bundled here: each sub-skill at `/SKILL.md`; the deep R&D at `references/design-motion-rnd.md`. + +Bundled sub-skills (read each at its `SKILL.md`): `remotion-template-catalog/SKILL.md`, `remotion-design-styles/SKILL.md`, `video-hooks/SKILL.md`, `remotion-character-design/SKILL.md`, `motion-design-principles/SKILL.md`, `kinetic-typography/SKILL.md`, `scene-transitions/SKILL.md`, `particles-and-effects/SKILL.md`, `remotion-aspect-ratios/SKILL.md`, `remotion-template-composition/SKILL.md`, `remotion-svg-colors/SKILL.md`, `persian-fonts/SKILL.md`, `asset-sourcing/SKILL.md`, `remotion-music-picker/SKILL.md`, `remotion-sound-effects/SKILL.md`, `flatrender-template-seo/SKILL.md`. diff --git a/.claude/skills/flat-artist/asset-sourcing/SKILL.md b/.claude/skills/flat-artist/asset-sourcing/SKILL.md new file mode 100644 index 0000000..921c849 --- /dev/null +++ b/.claude/skills/flat-artist/asset-sourcing/SKILL.md @@ -0,0 +1,95 @@ +--- +name: asset-sourcing +description: How to source, license, AI-generate, prepare, and organize royalty-free assets (footage, images, textures, HDRIs, GLTF/GLB, icons, illustrations) for FlatRender Remotion templates — Iran-aware (geo-blocks), vendored-only, license-firewalled. Use when a template needs real media, when downloading/committing assets into public/, when grading/masking/looping footage or compositing it via Video/OffthreadVideo/Img/staticFile + Ken-Burns, or when generating bespoke assets with local AI models. +--- + +# Asset sourcing for templates + +Project: `services/remotion/`. Helpers: `src/lib/anim.ts` (`hexToRgba`, `mixHex`, `rand`), `src/lib/aspect.ts` (`useLayout` → `isWide/isSquare/isTall`, `vmin`, `unit`), `src/lib/branding.ts` (`colorSchema`, `BRAND`), `src/lib/fonts.ts` (`FONT` = Vazirmatn, RTL), `src/lib/three-kit.tsx` (`StudioEnv/Lights/Floor/Effects`, `Confetti3D`). Render is **headless Chrome in Docker** — every value derives from `useCurrentFrame()` (never `Math.random`/`Date.now`/`useFrame`; use `rand(i)`). + +## The Iron Rule — vendor everything +The Iran environment punishes runtime dependencies. **Download once (VPN if needed), commit into `public/`, reference with `staticFile()`.** Never put `https://…` in a shipped template — a geo-block or flaky tunnel kills the render mid-frame. Mirror npm/NuGet/Docker via Nexus (`mirror.soroushasadi.com`); asset *binaries* are sourced by hand. **Record the license at acquisition time, not later.** `public/` today holds only `fonts/` — you build the rest. + +## License taxonomy (know cold — this is the firewall) +| Class | Examples | Ship? | +|---|---|---| +| CC0 / Public Domain / Pixabay / Pexels / Unsplash | Poly Haven, ambientCG, Kenney, Mixkit | ✅ free, no credit — **default target** | +| CC-BY | many Sketchfab, Bensound | ⚠️ ship only with a tracked on-screen/end-card credit | +| CC-BY-SA | some Wikimedia | ❌ share-alike can infect our proprietary template | +| CC-BY-NC | "free for personal" tiers | ❌ we are a **paid** product = commercial | +| Editorial / rights-managed | news/celebrity stock | ❌ | +| Paid stock | Envato, Adobe, Shutterstock | ✅ per license — **keep the receipt/PDF** | + +No license row = unknown license = **do not ship**. + +## Sourcing map (CC0 / no-attribution first) + Iran access +| Type | Best CC0 sources | Commit to | Iran access | +|---|---|---|---| +| Footage (H.264 MP4, right-sized) | Pexels Video, Pixabay Video, Mixkit, Coverr, Videvo (filter CC0) | `public/footage/{nature,business,abstract}/` | Pixabay/Mixkit/Coverr OK; Pexels VPN-ish | +| Images | Pexels, Pixabay, Unsplash, StockSnap, Burst | `public/images/` | Pixabay OK; Pexels/Unsplash VPN-ish | +| Textures / overlays | Poly Haven, ambientCG; grain/light-leak/dust CC0 clips | `public/textures/`, `public/overlays/` | OK | +| HDRIs (1k–2k for render speed) | Poly Haven, ambientCG | `public/hdri/` | OK | +| 3D (**prefer GLB** over glTF+textures) | Poly Haven Models, Kenney, Khronos glTF samples, Sketchfab (check each) | `public/models/` | Poly Haven OK; Sketchfab VPN-ish | +| Icons (bundle via Nexus npm, **never CDN**) | Lucide, Tabler, Heroicons, Phosphor | npm dep | npm via Nexus OK | +| Illustrations (recolorable **SVG**) | unDraw, Open Peeps, Humaaans | `public/illustrations/` | OK | + +For Persian/Iran imagery search English terms ("Tehran", "Iranian food") + self-shot/local stock. **Sanction-blocked at account/payment: Adobe Stock, Envato** — use a foreign account/partner or skip. **Mitigation: do one batched "asset run" over a stable tunnel, commit binaries, render never touches the open internet again.** Draco-compress GLBs (`gltf-pipeline -i in.glb -o out.glb -d`), keep low-poly for headless render speed. + +## AI-generated assets — when it's right +- **Use when:** the asset doesn't exist as stock (specific Persian cultural scene, branded mascot), you need consistency across a template set (reference-image control), or it beats a 5-site license hunt. +- **Don't when:** clean CC0 already exists, you need photographic authenticity, or a free tier's **commercial license is unclear** (watermarks / non-commercial = legal landmine for a paid product). +- **Iran-pragmatic:** self-host open models — **HunyuanVideo 1.5** (~RTX 4090, no geo-block/payment/watermark) for video; **FLUX/SDXL** locally for image/texture/illustration. Hosted SaaS (Runway, Kling) only when local quality falls short and a VPN+foreign-account path exists. **Always record prompt + tool + plan-tier + date** in the asset's `.license.txt` sidecar. + +## Preparing footage in Remotion (composite, grade, mask, loop) +**Primitives:** `` = default for **all** video in a render (FFmpeg extraction, deterministic, no seek drift). `