openrive-embed-animation
Installation
SKILL.md
Embed a Rive animation in an application
Use this skill when a .riv file must ship inside a website, mobile app, desktop app, or game. Read references/runtime-guides.md for platform examples before writing integration code.
Inspect the host project first
- Identify the framework, package manager, build tool, platform, asset directory, test commands, and existing Rive dependency.
- Do not replace an existing Rive runtime or upgrade unrelated dependencies without a reason.
- Inspect the exported file with OpenRive (
inspect_riv,openrive info, or the project MCP tools). Record the exact artboard, animation, state-machine, property, and theme names. - Copy the
.rivinto the host project's normal static asset location. Prefer a local, versioned asset over an opaque remote URL. - Choose the runtime for the host platform. Use the current official Rive runtime documentation for package names and versions; do not assume an old API is still valid.
Cross-platform rules
- Detect the host operating system and use its normal package-manager and shell conventions, but keep the workflow itself platform-neutral.
- Do not require Bash-only commands, Unix permissions,
/tmp, Windows drive letters, or hard-coded path separators. Use the host project's path utilities (path.join,Path.Combine,File.path.join, or the platform equivalent). - Use forward slashes only for browser URLs, package paths, and
.rivpaths inside web bundles. Quote filesystem paths with spaces in shell examples. - For skills installation on Windows or Linux,
npx skills add ... --copyis the portable fallback when symlinks are unavailable. The skill content must not assume that a global agent directory is writable. - Treat line endings as host-controlled. Do not compare generated text files byte-for-byte unless the format requires it;
.rivbinary round-trip checks remain byte-exact.