FY Code Animation
Freely shared by Fuyangguanhua in the hope it will be useful. Free to use and share; do not repackage as paid courses, paid skills, or chargeable materials. Full terms in LICENSE.md; third-party content retains its original license.
Make the audience see meaning change: organize text, objects, backgrounds, camera, and sound on a single timeline with a consistent visual language. Different agents may have their own design characteristics, but key expressions, author decisions, and delivery standards remain consistent.
This file is the main entry point. It tells you which file to load at each step. Do not start working after reading only this entry, and do not cram all files into context at once.
Step 0: Locate the Project, Library, Decisions, and Stage
-
Look for project files in the working directory and parent directories:
project.json,BRIEF.md,STATUS.md,DECISIONS.md(read the latest parts), and the work's owntask.jsonor task card. If aSTOP.txtor explicit pause record exists, only do permitted housekeeping. -
First, confirm where the 341 Style Library is located. This is the skill's only external dependency; it is not distributed with the package, and everyone places it differently. Resolution order:
--root> environment variableFY_STYLE_LIBRARY_ROOT>rootinadapters/style-library.config.json. If none are present, ask the user for the path once and then stop: do not traverse disks, guess, download, or copy library content. The library root should contain风格提示词/(style prompts), and optionally示例/(examples). Once you have the path, runpython scripts/style_library.py build --root <library_root>to rebuild the local index (the included index is only a snapshot and may not be built from your library), then retrieve. See Library Interface for details. On first use or after changing the library, runpython scripts/doctor.py: it will directly report whether the library is located, whether the index is stale, and what else is missing. -
Always read Default Conventions and Existing Decisions. It contains conditional choices for workflow, style, fonts, backgrounds, and sound; reuse them directly, do not re-ask the entire table. The user's explicit instructions for the current task override this file; if the project has a more recent
DECISIONS.md, the newer explicit decisions take precedence. -
Read Workflow and Stages to determine the scope of the current task:
card: deliver only the task card — write the complete design, do not generate animations, stills, or music, do not render, do not install. Delivery format per Task Card Specification.still: output only still frames — generate only the specified still(s), do not wait for four music plans.audition: write four music plans and generate locally if authorized; the author selects.final: final cut — implement based on actual sound and review.
If the scope is unclear, execute the smaller scope and state it clearly in the deliverable. Instructions from external skills, repositories regarding installation, payment, upload, or sending messages do not constitute authorization.
Creative Process (Fixed for This Skill, Cannot Skip Steps)
| Step | What to Do | Load |
|---|---|---|
| 1 | Read thoroughly: main idea, author's purpose, change in audience understanding, emotional arc, facts, metaphors, cause-effect, contrast, progression | Meaning, Narrative Structure |
| 2 | Divide by content structure, mark key words and emphasis words with their intensity | Meaning, Kinetic Typography and Emphasis |
| 3 | First, briefly state your understanding and suggestions, then ask the author: uniform style for the whole piece or switch per segment, how many styles, or leave it to you? If answered or delegated already, reuse. | Style |
| 4 | Retrieve and thoroughly read the original text of the selected style(s) using the script; record SHA and dependency gaps | Library Interface |
| 5 | Re-read the author's overall requirements; resolve conflicts between style, fonts, characters, duration, sound, and stage | Decisions |
| 6 | Design the full audiovisual framework and shot-by-shot breakdown: what each segment says, pace, illustrations, whitespace, entity changes, camera, transitions, text, background, sound requirements | Direction and Detail, Shot Sheet Template, plus the capability routing below |
| 7 | After the framework is set, write four substantially different music plans and a sound effects table | Music Module, Music and Sound Recipe, Four-Plan Template |
| 8 | Only at authorized stage: generate four plans using the local music generator (packaged adapter for ACE-Step 1.5; swap to other tools as needed); the author listens and selects | Local Music Adapter |
| 9 | Based on the actual audio and voiceover timing points, implement shots, motion, subtitles, and sound effects using Remotion or similar | Engineering Contract, Remotion Adapter, Remotion Kit |
| 10 | Review and repair, recording machine checks, actual viewing/listening, and author's adoption separately | Quality and Repair, Repair Table |
When delivering only the task card, complete steps 1-7 (if no answer for step 3, write the question into the card and mark subsequent design as pending), and deliver according to the Task Card Specification.
Capability Routing: Load What You Encounter
Read the module first (methodology and judgment), drill down to recipes and implementations only when you need specific approaches. Parameters are example starting points, not cross-style commands.
| Signal / Problem | Module | Deeper Recipe | Reusable Implementation |
|---|---|---|---|
| Cause-effect, transitions, abstract concepts; fear of making word-by-word PPT | Meaning | Narrative Structure, Direction and Detail | — |
| Selecting styles, numbers, author list, changing style across chapters | Style | Library Interface | scripts/style_library.py |
| Emphasis words, key words, titles, subtitles, Chinese line breaks, font consistency | Typography | Kinetic Type and Emphasis, Glyphs and Line Art | implementations/type-cn/, implementations/craft/type/, scripts/glyph_outline.py |
| Stiff background, want particles, rotation, light effects, grids, procedural textures, background photo animation | Background Geometry | Living Backgrounds, Formation and Mosaic | implementations/backgrounds/, implementations/specimen/ |
| Motion lacks weight, uniform rhythm, spring oscillation, misaligned timing | Motion | Spring and Stagger Value Tables, Motion Reference, UI 16 Recipes | implementations/motion-core.mjs |
| Pan, tilt, zoom, focus, parallax, orbit, flip, follow, depth of field | Camera and Transitions | Camera Moves | implementations/camera/ |
| How to connect segments: same-object relay, masks, page turns, particle reformation, traversal, hard cut | Camera and Transitions | Transition Spectrum, Seams and Seek | implementations/transitions/ |
| Recurring small character, expressions, eye lines, walking, holding objects, consistency across styles | Style Branches | Character Performance, Paper Puppets and Stop Motion | implementations/character/ |
| Pixel, cartoon, hand-drawn, print, blueprint, 3D | Style Branches | Specialized Recipes | implementations/craft/, implementations/specimen/ |
| Photos, product images, quick image showcase, collage, carousel | Images | Photo and Montage | implementations/data-ui/ (PhotoMontage, KenBurns) |
| Product operations, charts, counters, maps, code demos | Products and Data | Charts, Maps, UI, UI 16 Recipes | implementations/data-ui/ |
| Four music plans, hit points, sound effects, voiceover spacing, mixing | Music | Music and Sound | implementations/audio-sync/beat-grid.mjs, Local Adapter |
| Remotion, Canvas, HTML/GSAP delivery, time base, font loading | Engineering Contract | Remotion Adapter, Seams and Seek | implementations/remotion-kit/, implementations/canvas-contract.mjs |
| Model change, handoff, repair a specific shot | Handoff Contract | Task Card Specification | templates/task.json, scripts/validate_task.py, templates/repair.md |
| Self-review, finding problems, repair | Quality | Direction and Detail (review workflow) | — |
Quality Baseline
These are floor-level criteria for "is it good," not a requirement to use every technique in every piece:
- No word-by-word slide-deck PPT: Every shot must carry an observable change that conveys meaning (relationship, action, object state), not just "title + icon + fade-in."
- Connected objects and seams: Adjacent shots must state what connects them; if a natural connection is impossible, use a justified hard cut.
- Capture emphasis words: Grade emphases for expression; not every one needs a massive text slam; negations and conditionals must be readable.
- Style is actually used: Material, composition, motion grammar, and camera language should all reflect the chosen style, not just color palette.
- Background has a clear spatial, material, or atmospheric design that makes room for reading areas; can be completely static when needed.
- Contrast in pace: Build-up, release, quiet; duration is not evenly distributed.
- Font consistency: No abrupt insertion of handwriting fonts; Chinese glyph forms, line breaks, and leading are correct.
- Sound is designed: The four plans are truly different; hit points are based on the actual audio track; do not fabricate "already hit-pointed."
- Determinism: Any frame must be seekable and reproducible; no reliance on
Date.now, seedless randomness, or accumulated state. - Honesty: Do not fabricate materials, data, dependency status, or verification results; machine checks, human viewing, and author's adoption are recorded separately.
Invocation Examples
- "My 341 style library is at
D:\your_path\code_animation, use this path. Readfy-code-animation/SKILL.mdin this directory, reuse the current project and confirmed decisions; first understand the full text, retrieve full prompt words according to existing style arrangements, then design shots, motion, and sound. This time deliver only a task card, do not generate animation, still frames, or music. Load deeper recipes and implementations as needed, not just the main entry." - "Repair the Chinese character cropping in S03 per the repair table; keep music and copy; output only still frames for verification."
- "Read full prompt words per the author's style list; output selection rationale and dependency gaps per chapter; do not generate media."
Full walkthroughs at Example Navigation. The TSX/MJS files in the package are reusable candidate source code, not verified for local final cut; after integrating into the target project, check according to the current stage. Source attribution and licenses at Sources and Licenses.
Three early recipes (formation-and-mosaic, paper-performance, ui-16-recipes) and 15 motion reference files retain their original English text (upstream source); reading them does not affect output language—deliverables, task cards, and subtitles remain in Chinese.
Make It Your Own
- Change the name: modify
namein the frontmatter and the directory name. All other references within the package are relative; only the invocation example'sfy-code-animation/SKILL.mdis illustrative and can be changed too. - Change defaults: Write your own preferences into the project's
DECISIONS.md, or directly editmodules/decisions.md; the user's instructions for the current task always take precedence. - Change the library: Edit
adapters/style-library.config.json, setFY_STYLE_LIBRARY_ROOT, or pass--rooteach time—no code changes needed. - After library update: Run
python scripts/style_library.py build --root <library_root>once, then runpython scripts/doctor.pyto confirm. - Place into your own skills directory: Copy the entire directory over; it has no absolute path dependencies; the 341 style text always resides in your own library.