Communitygithub.com

fy-code-animation

Produce expressive, aesthetically consistent, and coherent code animations (Remotion / Canvas / HTML) from Chinese copy, style prompts, and audio. Covers full-text understanding and shot breakdown, in-situ retrieval from a 341-style library, kinetic typography for emphasis words, living backgrounds and particles, motion physics, camera moves, transitions, character performance, pixel/cartoon/hand-drawn/3D branches, charts/maps/UI/photo montage, four music and sound-effect plans, Remotion delivery, review and repair, and cross-agent handoffs. Output is differentiated by authorization level: task card only, still frames, audition, or final cut. Intended for requests to create code animation, write animation task cards, design storyboards, or repair animations; not for auto-installing dependencies or generating media without authorization.

What is fy-code-animation?

This skill is a comprehensive system for creating code animations from Chinese text, style prompts, and audio. It is designed for use with AI agents like Claude, Cursor, Codex, and similar developer tools, providing a structured workflow from full-text analysis to final rendered output using Remotion, Canvas, or HTML. The skill guides the agent through semantic understanding, shot breakdown, style selection from a 341-style library, kinetic typography for emphasis, living backgrounds, motion physics, camera moves, transitions, character performance, and multiple visual branches (pixel, cartoon, hand-drawn, 3D). It also covers data visualization, UI elements, photo montage, and a four-option music and sound-effect planning and generation workflow. Crucially, it enforces clear authorization stages: task card only, still frames, audition (with local music generation), or final cut, ensuring the agent never generates media or installs dependencies without explicit permission. The skill is modular, with separate files for decisions, workflow, style retrieval, engineering contracts, and quality assurance, and it mandates consistent visual language and deliverable standards across agents.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/FYZB2020/dsh-fy-code-animation/tree/main/skills/fy-code-animation

Ask in your favorite AI

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

Documentation

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

  1. 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 own task.json or task card. If a STOP.txt or explicit pause record exists, only do permitted housekeeping.

  2. 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 variable FY_STYLE_LIBRARY_ROOT > root in adapters/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, run python 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, run python scripts/doctor.py: it will directly report whether the library is located, whether the index is stale, and what else is missing.

  3. 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.

  4. 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)

StepWhat to DoLoad
1Read thoroughly: main idea, author's purpose, change in audience understanding, emotional arc, facts, metaphors, cause-effect, contrast, progressionMeaning, Narrative Structure
2Divide by content structure, mark key words and emphasis words with their intensityMeaning, Kinetic Typography and Emphasis
3First, 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
4Retrieve and thoroughly read the original text of the selected style(s) using the script; record SHA and dependency gapsLibrary Interface
5Re-read the author's overall requirements; resolve conflicts between style, fonts, characters, duration, sound, and stageDecisions
6Design the full audiovisual framework and shot-by-shot breakdown: what each segment says, pace, illustrations, whitespace, entity changes, camera, transitions, text, background, sound requirementsDirection and Detail, Shot Sheet Template, plus the capability routing below
7After the framework is set, write four substantially different music plans and a sound effects tableMusic Module, Music and Sound Recipe, Four-Plan Template
8Only 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 selectsLocal Music Adapter
9Based on the actual audio and voiceover timing points, implement shots, motion, subtitles, and sound effects using Remotion or similarEngineering Contract, Remotion Adapter, Remotion Kit
10Review and repair, recording machine checks, actual viewing/listening, and author's adoption separatelyQuality 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 / ProblemModuleDeeper RecipeReusable Implementation
Cause-effect, transitions, abstract concepts; fear of making word-by-word PPTMeaningNarrative Structure, Direction and Detail—
Selecting styles, numbers, author list, changing style across chaptersStyleLibrary Interfacescripts/style_library.py
Emphasis words, key words, titles, subtitles, Chinese line breaks, font consistencyTypographyKinetic Type and Emphasis, Glyphs and Line Artimplementations/type-cn/, implementations/craft/type/, scripts/glyph_outline.py
Stiff background, want particles, rotation, light effects, grids, procedural textures, background photo animationBackground GeometryLiving Backgrounds, Formation and Mosaicimplementations/backgrounds/, implementations/specimen/
Motion lacks weight, uniform rhythm, spring oscillation, misaligned timingMotionSpring and Stagger Value Tables, Motion Reference, UI 16 Recipesimplementations/motion-core.mjs
Pan, tilt, zoom, focus, parallax, orbit, flip, follow, depth of fieldCamera and TransitionsCamera Movesimplementations/camera/
How to connect segments: same-object relay, masks, page turns, particle reformation, traversal, hard cutCamera and TransitionsTransition Spectrum, Seams and Seekimplementations/transitions/
Recurring small character, expressions, eye lines, walking, holding objects, consistency across stylesStyle BranchesCharacter Performance, Paper Puppets and Stop Motionimplementations/character/
Pixel, cartoon, hand-drawn, print, blueprint, 3DStyle BranchesSpecialized Recipesimplementations/craft/, implementations/specimen/
Photos, product images, quick image showcase, collage, carouselImagesPhoto and Montageimplementations/data-ui/ (PhotoMontage, KenBurns)
Product operations, charts, counters, maps, code demosProducts and DataCharts, Maps, UI, UI 16 Recipesimplementations/data-ui/
Four music plans, hit points, sound effects, voiceover spacing, mixingMusicMusic and Soundimplementations/audio-sync/beat-grid.mjs, Local Adapter
Remotion, Canvas, HTML/GSAP delivery, time base, font loadingEngineering ContractRemotion Adapter, Seams and Seekimplementations/remotion-kit/, implementations/canvas-contract.mjs
Model change, handoff, repair a specific shotHandoff ContractTask Card Specificationtemplates/task.json, scripts/validate_task.py, templates/repair.md
Self-review, finding problems, repairQualityDirection 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. Read fy-code-animation/SKILL.md in 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 name in the frontmatter and the directory name. All other references within the package are relative; only the invocation example's fy-code-animation/SKILL.md is illustrative and can be changed too.
  • Change defaults: Write your own preferences into the project's DECISIONS.md, or directly edit modules/decisions.md; the user's instructions for the current task always take precedence.
  • Change the library: Edit adapters/style-library.config.json, set FY_STYLE_LIBRARY_ROOT, or pass --root each time—no code changes needed.
  • After library update: Run python scripts/style_library.py build --root <library_root> once, then run python scripts/doctor.py to 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.

Related Skills