Agent Skills
› nexu-io/motion-anything
› lottie-favorite
lottie-favorite
GitHub提供可移植的Lottie JSON心形/收藏图标动画,支持Web与App端一致表现。在用户交互时触发,尊重无障碍设置,避免滥用运行时开销。
Trigger Scenarios
需要跨平台一致的微交互动画
用户点击切换收藏状态
Install
npx skills add nexu-io/motion-anything --skill lottie-favorite -g -y
SKILL.md
Frontmatter
{
"od": {
"mode": "prototype",
"preview": {
"type": "html"
},
"surface": "web",
"category": "animation-motion",
"platform": "desktop",
"upstream": "https:\/\/github.com\/spemer\/lottie-animations-json",
"design_system": {
"requires": false
},
"example_prompt": "Use lottie-favorite: load animation.json with lottie-web on the icon, loop it, and guard\nprefers-reduced-motion (autoplay:false)."
},
"name": "lottie-favorite",
"triggers": [
"lottie",
"favorite",
"收藏图标"
],
"description": "A heart\/favorite icon that animates on toggle — Lottie JSON, portable across web & app. A Lottie (JSON) animation — portable motion that plays identically on web and app via\nlottie-web. Honors prefers-reduced-motion (don't autoplay). Reserve Lottie for motion that earns\nits ~160KB runtime.\n"
}
Lottie · Favorite
A heart/favorite icon that animates on toggle — Lottie JSON, portable across web & app. Lottie JSON from spemer/lottie-animations-json
(MIT). Part of motion-anything; obeys MOTION-SPEC.md.
When to use it
- Portable JSON motion identical on web & app; icon/control micro-animations (incl. After Effects / Jitter exports).
When NOT to use it (restraint)
- When a pure-CSS effect would do — don't ship the Lottie runtime for a simple fade.
How to apply
- Include
lottie.min.js(runtime) andanimation.json. lottie.loadAnimation({ container, renderer:'svg', loop:true, autoplay:false, path:'animation.json' }); start on intent / guard reduced-motion.
Accessibility & performance
prefers-reduced-motion: don't autoplay. SVG renderer; motion-as-JSON (portable, AI-readable).
Version History
- b016900 Current 2026-07-11 17:06


