text-to-lottie

โดย diffusionstudio

สร้างแอนิเมชัน Lottie (Bodymovin) ในรูปแบบ JSON ที่สามารถเรนเดอร์ในโปรแกรมเล่น skia ในเครื่อง ใช้เมื่อผู้ใช้ขอให้สร้าง, แก้ไข, หรือซ่อมแซมแอนิเมชัน Lottie หรือขอ "แอนิเมชัน" เพื่อโหลด

npx skills add https://github.com/diffusionstudio/lottie --skill text-to-lottie

Text To Lottie

Author production-ready Lottie JSON for the official local Skia Skottie player. The deliverable is a renderable scene in the player, not isolated JSON.

Operating Model

  • Use the official player project and verify in Skia Skottie. Do not hand-roll a custom viewer or switch renderers for verification.
  • Keep the skill portable across Agent Skills clients. Avoid host-specific commands, command modes, or orchestration conventions in skill instructions.
  • Prefer fewer questions and stronger defaults. Ask only when a decision changes the output materially, such as transparent vs full-frame background, brand constraints, target format, or supplied source assets.
  • Prioritize clean, intentional, professional motion over merely satisfying the literal prompt.

Reference Loading

This SKILL.md is the thin control plane. Load only one-level references that match the task. Do not open the whole reference library.

Always read references/player-contract.md before creating, editing, fixing, or verifying a scene. If a routed reference is unavailable, continue using the inline rules in this file.

User intentReferences to read when present
Any new/edit/fix Lottie scenereferences/player-contract.md
JSON structure, keyframes, slots, shapes, assetsreferences/lottie-spec-map.md
Logo animationreferences/recipe-logo.md, references/motion-taste.md, references/design-taste.md
Typography, title, quote, text revealreferences/recipe-typography.md, references/design-taste.md, references/motion-taste.md
Lower third, name tag, caption bar, overlayreferences/recipe-lower-thirds.md, references/design-taste.md, references/motion-taste.md
Loader, icon, spinner, badge animationreferences/recipe-loaders-icons.md, references/motion-taste.md
Success, error, warning, completion, empty statereferences/recipe-loaders-icons.md, references/design-taste.md, references/motion-taste.md
UI microinteractionreferences/recipe-ui-microinteractions.md, references/design-taste.md, references/motion-taste.md
Generic "animate this SVG" or SVG-to-Lottiereferences/recipe-svg-animation.md, references/svg-compatibility.md, references/motion-taste.md
Camera follow, pan, zoom, parallax, scene motionreferences/recipe-camera-scene-motion.md, references/design-taste.md, references/motion-taste.md
Diagram, technical line animation, callout, flow tracereferences/recipe-diagram-technical.md, references/design-taste.md, references/motion-taste.md
Data, stats, KPIs, charts, metrics, dashboard figuresreferences/recipe-data-stats.md, references/design-taste.md, references/motion-taste.md
Product launch, feature announcement, social promoreferences/recipe-product-promo.md, references/design-taste.md, references/motion-taste.md
Long text, multiple ideas, list/features/steps, timeline, before/after, problem/solution, quote+proof, recap/story, product walkthrough, multi-language variations, chapters, multi-beat sequence, episode, jump/hard cuts, transition grammarreferences/chapterization-transition-grammar.md, references/motion-taste.md
Glow, glass, metal, gradient, fill, bubble/burst effectsreferences/recipe-visual-effects.md, references/design-taste.md, references/motion-taste.md
SVG input inside logo/icon/UI/lower-third workThe task recipe plus references/svg-compatibility.md
Starter brief or reusable project directionreferences/recipe-starter-projects.md, references/design-taste.md, references/motion-taste.md
Any "premium", "clean", "minimal", "modern", "sleek", or "polished" qualifierreferences/design-taste.md (restraint defaults), plus the routed recipe

For mixed prompts, choose one primary recipe from the main deliverable, then add secondary references for source format or visual treatment. Examples: SVG logo with glow uses logo as primary plus SVG compatibility and visual effects; product launch with pan/zoom uses product promo plus camera scene motion; technical SVG diagram tracing uses diagram/technical plus SVG compatibility; kinetic title with glass sweep uses typography plus visual effects.

Workflow

  1. Route the task using the table above. Read only the relevant references that exist.
  2. Locate the official player project and resolve the target scene using the target precedence below. Before editing, verify the resolved path is public/projects/<project>/<scene-N>/lottie.json; re-read that current file immediately before overwriting because the UI can write slot edits back to source.
  3. Decide the background policy before authoring.
  4. Write or update public/projects/<project>/<scene-N>/lottie.json and, when useful, controls.json.
  5. Validate JSON, run or reuse the dev server, inspect exact frames with ?frame=N, and fix render/design/motion issues before finishing.

Inline Rules

Design Defaults (always apply)

These few defaults are non-negotiable and apply to every designed scene. Load references/design-taste.md for the full reasoning, especially for any "premium", "clean", "minimal", "modern", or "card" prompt.

  • Premium means subtract, not add. When a prompt says premium, clean, minimal, modern, sleek, or sophisticated, default to restraint: remove chrome before adding it. Premium is carried by scale, weight, brightness, spacing, and timing, never by cards, borders, dividers, shadows, glow, or stacked tints.
  • Chrome/container budget is 0 by default. Do not add a framing card, container, border, or divider unless it does a job that whitespace and alignment cannot. Separate grids and columns with negative space and alignment first, a single hairline second, and a filled or bordered card last and only when explicitly warranted.
  • One surface tone. Use one background tone. Do not stack two near-black or two near-white tints to fake a "surface"; it reads muddy. If a card surface must differ from the background, make it one deliberate step with a clear purpose.
  • One divider treatment, one color. If dividers are truly needed, use one weight and one color for all of them, title rule and column rules included. Never use slightly different colors or weights per divider.

Scene Rules

  • Scene files live at public/projects/<project>/<scene-N>/lottie.json.
  • Resolve target scenes by authority: an explicit file path wins; a browser URL route like /<project>/<scene> wins next; an already-known project/scene for the task wins next; otherwise create a new safe scene. Use /__context only for discovery, verification, or playback state unless the task explicitly says to edit what is currently on screen and no more specific target exists. Do not let /__context.live override a known file path, URL, or project/scene. Overwrite main-project/scene-1 only if it is still the untouched placeholder; otherwise create a new scene.
  • Full-frame standalone compositions should include a visible background layer with a bgColor slot and controls.json entry.
  • Transparent-by-default outputs include logos, icons, loaders, overlays, lower thirds, and SVG-derived assets unless the user asks for a background.
  • Include top-level v, fr, ip, op, w, h, nm, assets, and layers. Treat op as exclusive.
  • Use purposeful easing and staging. Avoid defaulting to linear motion. Derive easing from the behavior-based anchors in motion-taste.md (chosen by motion behavior, focal element strongest); do not fall back to one uniform ease for every layer.
  • Use slots for important editable values and add controls.json labels/ranges when they improve the properties panel.
  • For SVG input, preserve the viewBox, normalize styling, watch fill rules and intersections, and verify the result in Skottie.
  • Native Lottie text/text slots (ty:5) render in this player when the scene ships its font: drop a .ttf/.otf/.ttc next to lottie.json, declare it in fonts.list with fFamily matching the font's embedded family name, and reference it from text documents. The loader passes every scene font to Skottie. Prefer native text; reach for vector/shape text only for deliberate path effects (stroke-on, glyph morphs, handwriting). See the player-contract "Native Text" reference.

Verification

Before finishing:

  1. Confirm the intended target file path is public/projects/<project>/<scene-N>/lottie.json.

  2. Validate JSON:

    node -e "JSON.parse(require('fs').readFileSync('public/projects/<project>/<scene-N>/lottie.json','utf8'))"
    
  3. Confirm the official player is running and the scene appears in GET /__context.

  4. Inspect pinned frames in the browser. For new scenes, check frame 0, midpoint, and op - 1.

  5. Confirm the background policy matches the use case.

  6. Check for blank canvas, missing assets, unstyled shapes, wrong layer order, bad easing, awkward timing, cropped content, text overflow, and visible SVG artifacts.

  7. Finish only when the animation renders cleanly and feels intentional.

Maintenance Evals

Do not read eval files during normal animation work. Use them only when testing or changing this skill:

  • evals/trigger-prompts.json
  • evals/routing-prompts.json
  • evals/reference-loading-prompts.json
  • evals/output-rubric.md

Skills ที่เกี่ยวข้อง

character-design-sheet
qu-skills
ความสม่ำเสมอของตัวละครในภาพที่สร้างโดย AI ด้วยชีทอ้างอิงและเทคนิค LoRA ครอบคลุมมุมมองรอบด้าน ชีทแสดงอารมณ์ จานสี และเทคนิคการรักษาความสม่ำเสมอของสไตล์ ใช้สำหรับ: การออกแบบตัวละคร, อาร์ตเกม, ภาพประกอบ, แอนิเมชัน, การ์ตูน, นิยายภาพ ทริกเกอร์: การออกแบบตัวละคร, ชีทตัวละคร, ความสม่ำเสมอของตัวละคร, การอ้างอิงตัวละคร, ชีทมุมมองรอบด้าน, ชีทแสดงอารมณ์, อาร์ตตัวละคร, ตัวละครที่สม่ำเสมอ, คอนเซปต์ตัวละคร, ชีทอ้างอิง, การสร้างตัวละคร, การออกแบบตัวละครดั้งเดิม,...
creativedesignmedia
character-design-sheet
halt-catch-fire
ความสอดคล้องของตัวละครในภาพที่สร้างโดย AI โดยใช้ reference sheets และเทคนิค LoRA ครอบคลุมมุมมองหมุนตัว, แผ
creativedesignmedia
character-design-sheet
101-skills
ความสม่ำเสมอของตัวละครในภาพที่สร้างโดย AI ด้วยชีทอ้างอิงและเทคนิค LoRA ครอบคลุมมุมมองรอบด้าน ชีทแสดงอารมณ์ จานสี และเทคนิคการรักษาความสม่ำเสมอของสไตล์ ใช้สำหรับ: การออกแบบตัวละคร, อาร์ตเกม, ภาพประกอบ, แอนิเมชัน, การ์ตูน, นิยายภาพ ทริกเกอร์: การออกแบบตัวละคร, ชีทตัวละคร, ความสม่ำเสมอของตัวละคร, การอ้างอิงตัวละคร, ชีทมุมมองรอบด้าน, ชีทแสดงอารมณ์, อาร์ตตัวละคร, ตัวละครที่สม่ำเสมอ, คอนเซปต์ตัวละคร, ชีทอ้างอิง, การสร้างตัวละคร, การออกแบบ OC,...
creativedesignmedia
ckm:design
nextlevelbuilder
ทักษะการออกแบบที่ครอบคลุม: อัตลักษณ์แบรนด์, ดีไซน์โทเค็น, การจัดแต่ง UI, การสร้างโลโก้ (55 สไตล์, Gemini AI), โปรแกรมอัตลักษณ์องค์กร (50 ผลงาน, ภาพจำลอง CIP), การนำเสนอ HTML (Chart.js), การออกแบบแบนเนอร์ (22 สไตล์, โซเชียล/โฆษณา/เว็บ/สิ่งพิมพ์), การออกแบบไอคอน (15 สไตล์, SVG, Gemini 3.1 Pro), ภาพถ่ายโซเชียล (HTML→ภาพหน้าจอ, หลายแพลตฟอร์ม) การดำเนินการ: ออกแบบโลโก้, สร้าง CIP, สร้างภาพจำลอง, สร้างสไลด์, ออกแบบแบนเนอร์, สร้างไอคอน, สร้างภาพถ่ายโซเชียล, ภาพสื่อโ
designcreativemedia
design
nextlevelbuilder
ทักษะการออกแบบที่ครอบคลุม: อัตลักษณ์แบรนด์, ดีไซน์โทเคน, การจัดแต่ง UI, การสร้างโลโก้ (55 สไตล์, Gemini AI), โปรแกรมอัตลักษณ์องค์กร (50 ผลงาน, ต้นแบบ CIP), การนำเสนอ HTML (Chart.js), การออกแบบแบนเนอร์ (22 สไตล์, โซเชียล/โฆษณา/เว็บ/สิ่งพิมพ์), การออกแบบไอคอน (15 สไตล์, SVG, Gemini 3.1 Pro), ภาพถ่ายโซเชียล (HTML→ภาพหน้าจอ, หลายแพลตฟอร์ม) การดำเนินการ: ออกแบบโลโก้, สร้าง CIP, สร้างต้นแบบ, สร้างสไลด์, ออกแบบแบนเนอร์, สร้างไอคอน, สร้างภาพถ่ายโซเชียล, ภาพสื่อโซเช
mediadesigncreative
ace-step
agentspace-so
Generate, inpaint, and outpaint music with ACE Step on RunComfy via the `runcomfy` CLI. ACE Step is StepFun-AI's open-weights music foundation model — tag-driven composition (genre, mood, instruments), multilingual lyrics with section markers, 5 s to 4 min stereo output, $0.0002–0.0003 per second (≈ 27× cheaper than ElevenLabs Music). Four endpoints: ACE Step text-to-audio (the default), ACE Step 1.5 text-to-audio (50+ language lyrics, refined structured-lyric handling), ACE Step...
creativeaudiomedia
ace-step
doany-ai
Generate, inpaint, and outpaint music with ACE Step on RunComfy via the `runcomfy` CLI. ACE Step is StepFun-AI's open-weights music foundation model — tag-driven composition (genre, mood, instruments), multilingual lyrics with section markers, 5 s to 4 min stereo output, $0.0002–0.0003 per second (≈ 27× cheaper than ElevenLabs Music). Four endpoints: ACE Step text-to-audio (the default), ACE Step 1.5 text-to-audio (50+ language lyrics, refined structured-lyric handling), ACE Step...
creativemediaaudio
ai-avatar-video
qu-skills
สร้างวิดีโอ AI avatar และ talking head ผ่าน CLI ของ inference.sh แนะนำ: P-Video-Avatar (เร็วที่สุด ถูกที่สุด มี TTS ในตัว) นอกจากนี้: OmniHuman, Fabric, PixVerse เสียง: Inworld TTS-2 (100+ ภาษา ปรับอารมณ์ตัวละครได้), ElevenLabs, Kokoro ความสามารถ: avatar ที่ขับเคลื่อนด้วยเสียง, ข้อความเป็น avatar, วิดีโอ lipsync, การสร้าง talking head, ผู้บรรยายเสมือน, เนื้อหา UGC ใช้สำหรับ: ผู้บรรยาย AI, วิดีโออธิบาย, อินฟลูเอนเซอร์เสมือน, การพากย์, วิดีโอการตลาด, โฆษณา UGC, avatar ในเกม,...
videocreativemedia