huashu-design
alchaincyf
Huashu Design 3.0 · 在 agent 里打一句话,拿回能交付的设计:网页 / App 原型 / 可编辑 PPTX / 动画 / 信息图 · 六个候选挑三个方向 · 84 种带样张的风格库 · 越用越懂你的外观账本与设计体检 · HTML-native design skill for Claude Code, Codex, Cursor & any agent
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:FYZB2020/dsh-fy-code-animation
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Turn a Chinese script into a finished MP4 — with code, not a timeline.
A DeepSeek Harness plugin. You keep the script; the agent writes HTML/Canvas animation, renders it frame by frame, and hands back an MP4. No GPU, no monthly credits, no per-frame fee: every frame is renderAt(t) on your own machine.
8 GB VRAM is not a requirement here — rendering is CPU + headless browser, and the plugin falls back to your installed Edge if Chromium will not download.index.html, task.json and notes.md. Hand it to a human, a different agent, or git diff it.| Piece | What you get |
|---|---|
| Two skills | fy-code-animation (10-step creation order, task-card contract, four delivery tiers) and code-animation-prompts (style library + renderer contract) |
| Six tools | codeanim_status codeanim_switch codeanim_setup codeanim_style codeanim_new codeanim_render |
| 341 styles | 10 series, 196 of them with reference stills, plus an offline picker (风格挑选.html) that works without network |
| Dependency installer | Python 3.10+ probe → venv → Playwright + imageio-ffmpeg → Chromium (auto-fallback to Edge) → FFmpeg. Idempotent, logged, offline-capable |
| A panel | Bottom-right floating switch: mode on/off, dependency status, style count, last render — polls every 4 s |
| Deterministic output | window.renderAt(t) on an <canvas>; Playwright screenshots each frame, FFmpeg encodes with libx264 + yuv420p + crf18 + faststart |
# inside DeepSeek Harness
plugin_manager install_bundle target="dsh-fy-code-animation"
or from the plugin market, or from a folder:
dsh plugin add "N:\path\to\dsh-fy-code-animation"
Ask the agent to run codeanim_setup, or press the switch in the panel once. It fills ~/.dsh/code-animation/:
env/ isolated venv (playwright + imageio-ffmpeg)
tools/ffmpeg/ bundled ffmpeg binary
style-library/ 341 prompts + 196 stills
projects/ your projects
output/ finished MP4s
logs/ setup.log / render.log
What it needs, and how big it is:
| Need | Size | Notes |
|---|---|---|
| Python 3.10+ | already on most systems | probed as CODEANIM_PYTHON → py -3.12/3.11/3.10 → python3 → python |
| Playwright + Chromium | ≈ 40 MB + 436 MB | download failure is not fatal — falls back to local Edge |
| FFmpeg | ≈ 80 MB | taken from imageio-ffmpeg, never written into system PATH |
Full step-by-step, mirrors and offline install: docs/DEPENDENCIES.en.md · 中文
Say “开启动画模式 / start animation mode”, or click the bottom-right dot, or call codeanim_switch({ action: "on" }).
When it is off the skills stay readable but building/rendering is refused — that is deliberate, so a half-configured machine cannot silently produce broken MP4s.
codeanim_status # five dependency checks, style count
codeanim_switch { action: "on" }
codeanim_style { action: "search", query: "水墨" }
codeanim_style { action: "show", id: "Z1" } # read the whole brief before rendering
codeanim_new { name: "第一条", copy: "<150–300 字文案>", style: "Z1", duration: 12 }
# edit projects/<name>-<timestamp>/index.html into a real storyboard
codeanim_render { project: "projects/<name>-<timestamp>", duration: 12 }
Output lands in ~/.dsh/code-animation/output/; an existing name never gets overwritten — a -YYYYMMDD-HHmmss suffix is appended.
Any HTML you hand to codeanim_render must expose:
window.renderAt = (t) => { /* draw the frame at t seconds, synchronously */ }
t is seconds, 0 <= t < duration; the same t must always produce the same frame.?export=1 the page must not start its own animation loop — the renderer drives time.requestAnimationFrame autoplay, random seeds) breaks frame accuracy.| Tool | Params | Notes |
|---|---|---|
codeanim_status |
— | switch, five dependency steps, style count, last project/render |
codeanim_switch |
action: on/off/toggle |
off = read-only skills |
codeanim_setup |
steps?: ["python","venv","pip","chromium","ffmpeg","verify"] |
idempotent; setup.log has timings |
codeanim_style |
action: search/show/list/open_picker, query, id, series, limit |
pure JS search, no Python needed |
codeanim_new |
name, copy, style?, duration?, width?, height?, fps? |
splits the script into scenes, writes task.json and validates it with fy's validate_task.py |
codeanim_render |
project?, output?, name?, duration?, width?, height?, fps?, audio? |
reads back ffmpeg metadata instead of trusting exit code 0 |
Style series: AG code samples 26 · M motion 40 · K cartoon 38 · Z Chinese 15 · H layout 12 · L Lemo-Opuscar 59 · V mg-styles 15 · X code-video 31 · R reference 7 · O Oscar 98.
Details and preview behaviour: docs/STYLE-LIBRARY.md · 中文
codeanim_style show tells you.audio to codeanim_render (apad pads silence, never loops).render_video.py.style-library/第三方许可/.node scripts/pack.mjs --out N:\deliver # → portable zip ≈15.6 MB
node scripts/build-offline-pack.mjs --zip # → offline deps ≈330–500 MB
See docs/PORTING.en.md · 中文.
| Symptom | Fix |
|---|---|
| Panel missing | press Ctrl+R; after editing lib/client.js a reload is mandatory |
| Plugin enabled but the app will not boot | node scripts/toggle-profile.mjs --profile desktop --off, then restart DSH |
| Chromium download stalls | ignore it — Edge is used automatically; or codeanim_setup({ steps: ["chromium"] }) |
| pip fails | codeanim_setup({ steps: ["pip"] }) (PyPI → Tsinghua mirror fallback) |
| Want it fully silent | create an empty file named DISABLE in ~/.dsh/code-animation/ |
| Logs | ~/.dsh/code-animation/logs/setup.log, render.log, plugin.log |
>=0.2.0-rc.1 <0.3.0-0 (declared in package.json → dsh.compatibility; verified on 0.2.2-rc.3).>=20, Windows 10/11 (Edge fallback path is Windows-specific; Chromium path is portable).node tests/contract.mjs proves the plugin registers 6 tools, 2 skills and 4 routes against a mock host; node tests/harness.mjs runs the style library + project pipeline end to end.code-animation-prompts skill: XiaoyeCodes/code-animation-promptsfy-code-animation skill: Akillll-DuoHe/fy-code-animationstyle-library/第三方许可/).Plugin code: MIT.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: video。