zimai233/dsh-figma-to-lottie
为DeepSeek Harness设计的Figma/SVG到Lottie动画编译器。将SVG路径与关键帧数据转换为独立的.lottie.json文件。
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness that compiles Figma or SVG path and keyframe data into ready-to-use Lottie 5.7.4 JSON animation files. It can be installed directly via the DSH CLI, with two installation options available: install from the npm registry, or install directly from the GitHub repository. For better supply chain security, the repository recommends locking the install to a specific commit hash when installing from GitHub. The plugin exposes two agent-callable tools: lottie_compile_shape for testing SVG path conversion, and lottie_compile for building full animations.
To use the plugin, you simply describe your desired animation in natural language to your DSH agent. For example, you can ask for a 3-second loading animation with specific dimensions, background color, and staggered sliding bars, and the agent will handle the rest. The plugin accepts compact layer specifications that support multiple layer types including rectangles with gradient fills, SVG paths, base64-embedded images, and text layers. Each layer can be configured with custom opacity and keyframe timing to get the exact animation you need.
The plugin is written as pure ESM, so there are no build steps required, and no prepare scripts or build permissions are needed to run it. It is open source under the permissive MIT license, so you can modify or redistribute it freely per the license terms. For developers who want to contribute or modify the code, you can run npm install to get dependencies, npm test to run core function tests, and npm run pack to do a publish dry run before releasing changes. Output Lottie JSON files work with all standard Lottie runtimes across web, iOS, and Android.
这是一个专为 DeepSeek Harness 开发的原生插件,功能是将 Figma 或 SVG 格式的路径和关键帧数据编译为自包含的 Lottie 动画 JSON 文件。它填补了 DSH 插件生态中缺少设计工具桥接层的空白,将 SVG 转 Lottie 的完整编译流程提炼为两个可被 agent 直接调用的工具,全程无需额外设计工具,可直接在对话中完成编译。
本插件面向需要通过 agent 快速生成 Lottie 动画资产的开发者与设计师,常规使用流程十分简便。用户只需用自然语言向 agent 描述动画需求,agent 就会调用插件提供的对应工具完成编译。例如你可以请求生成自定义加载动画,插件最终会输出可直接在 Web、iOS 和 Android 平台使用的成品 Lottie JSON 文件。
插件采用纯 ESM 编写,无需额外构建步骤,发布包即可直接运行。安装方式支持从 npm 或 GitHub 源码安装,推荐锁定 GitHub commit 以保障供应链安全。插件源代码开放,采用 MIT 许可证,用户可自由修改和使用,开发者也可运行测试完成开发预检。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-figma-to-lottie(zimai233/dsh-figma-to-lottie)
仓库:https://github.com/zimai233/dsh-figma-to-lottie
本站详情页:https://www.yhbd.top/plugins/zimai233-dsh-figma-to-lottie/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-08-14 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile myprofile add dsh-figma-to-lottie
把 zimai233/dsh-figma-to-lottie 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-figma-to-lottie
为 DeepSeek Harness 打造的 Figma/SVG → Lottie 动画编译器。
将 SVG 路径与关键帧数据编译成自包含的 .lottie.json 文件——直接在 agent 对话中完成,无需任何设计工具。
为什么需要它
DSH 插件生态没有设计工具桥接层(虽然有 Figma MCP,但没有插件能把设计数据编译成动画资产)。本插件填补了这个空白:它把 SVG→Lottie 的编译管道——路径解析、贝塞尔进出切线转换、关键帧缓动——提炼成两个可被 agent 调用的工具。
功能特性
lottie_compile_shape— 将 SVG 路径d字符串解析为 Lottie 形状值{ i, o, v, c },带正确的贝塞尔切线。编译完整动画前,可先检查任意 SVG 路径的转换结果。lottie_compile— 从紧凑的图层规格组装完整的 Lottie 5.7.4 JSON 文档:矩形(支持渐变填充)、路径、图片(base64 内嵌)、文字,每层均支持透明度 / 上滑关键帧动画。- 零构建步骤——纯 ESM,发布即运行时代码。无需
prepare脚本,无需构建授权。
安装
# 从 npm 安装
dsh plugin --profile myprofile add dsh-figma-to-lottie
# 从 GitHub 安装(建议锁定 commit,供应链更安全)
dsh plugin --profile myprofile add github:zimai233/dsh-figma-to-lottie#<sha>
使用
用自然语言告诉 agent:
"编译一个 3 秒的加载动画:345×414 画布,浅灰背景,10 根蓝色柱子在 x=215.5 处以 0.48/0.24/0.4/1.4 的缓动上滑,每根错开 100ms。写入 ./loading.lottie.json"
agent 会调用 lottie_compile,传入类似这样的规格:
{
"frame": { "w": 345, "h": 414, "bg": "#f3f4f6", "name": "loading" },
"fps": 60,
"durationMs": 3000,
"layers": [
{ "type": "rect", "id": "bar-1", "x": 215.5, "y": 112, "w": 57, "h": 13, "r": 6.5,
"gradient": ["#61adf8", "#8fd1fa"], "slideUp": 15, "startMs": 0 },
{ "type": "rect", "id": "bar-2", "x": 215.5, "y": 137, "w": 57, "h": 13, "r": 6.5,
"gradient": ["#61adf8", "#8fd1fa"], "slideUp": 15, "startMs": 100 }
]
}
产出的 Lottie JSON 可直接用于 iOS / Android / Web(LottieWeb、lottie-ios、lottie-android)。
图层规格参考
| 字段 | 类型 | 说明 |
|---|---|---|
frame.w / frame.h |
number | 画布尺寸(像素,必填) |
frame.bg |
hex 字符串 | 可选背景色 |
fps |
number | 帧率,默认 60 |
durationMs |
number | 动画总时长(必填) |
bezier |
{p1x,p1y,p2x,p2y} | 可选缓动曲线,默认为上滑缓动 |
图层类型
| 类型 | 字段 |
|---|---|
rect |
x、y、w、h、r?、fill?、gradient?: [c1,c2]、slideUp?、opacity?、startMs?、endMs? |
path |
d(SVG 路径)、x?、y?、fill?、opacity? |
image |
path(绝对文件路径,PNG 以 base64 内嵌)、x、y、w、h |
text |
text、x、y、size、color?、font? |
开发
npm install
npm test # 对 buildLottie + svgPathToLottie 运行纯核心测试
npm run pack # 打包预检(相当于 pnpm pack)
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
runzhliu/deepseek-harness-docker
BrambleXu/dsh-annotate
AKS1st/dsh-mermaid
redfox-data/redfox-community-dsh
Flora233333/dsh-minimal-vision
bowang-lab/dsh-medomni