Web Rive
Rive web and React runtime integration, .riv assets, state machines, inputs, lifecycle cleanup, accessibility, remote asset security, and fallback behavior.
Operating Contract
Use this skill as a compact router plus domain checklist. Load references only
when the current task matches their condition. Do not cite local scrape paths,
machine cache paths, or hidden source locations. Verify API details against the
target repo's installed package versions before editing.
Source Order
- Inspect the target repo's installed packages, framework/runtime versions,
local design tokens, accessibility policy, and existing motion patterns.
- Use the bundled references below for skill-specific gotchas and copied source
excerpts.
- Use official current docs/package source as API truth when local code or
bundled notes are version-sensitive.
Decision Boundaries
- Use web-lottie for Lottie/dotLottie assets.
- For React Native, prefer
expo-motion when installed; otherwise proceed
with the guidance here.
- Use Motion/GSAP/CSS when no .riv asset or state machine is involved.
- For general Motion/CSS API work or cross-stack audits, prefer
motion or
design-motion-audit when installed; otherwise proceed with the guidance
here. Web R3F stays in-bundle via web-three-r3f.
Workflow
- Inspect asset ownership, state machine names, inputs, autoplay, and runtime package.
- Bind inputs through stable component state and cleanup runtime instances.
- Add fallback and accessible semantics outside canvas.
- Review URL actions and remote asset policy.
Gotchas
- Canvas output is not self-describing to assistive tech.
- State machine input names are asset contracts; verify against the asset.
- Remote .riv files and URL actions need explicit allowlisting.
Bundled Resources
references/rive-react-runtime.md - Rive React/runtime lifecycle. Read when using @rive-app/react-webgl2, @rive-app/webgl2, @rive-app/react-canvas, or @rive-app/canvas.
references/state-machine-inputs.md - State machine input contract guide. Read when setting boolean, number, or trigger inputs.
references/asset-security-and-fallbacks.md - Rive asset security, accessibility, and fallback review. Read before shipping remote assets, URL actions, or canvas-only states.
references/layout-fit-and-resize.md - Rive layout, fit, resize, and DPR behavior. Read when sizing a Rive canvas/component, changing artboards, or debugging cropped/blurred assets.
references/data-binding-and-events.md - Rive data binding and event contracts. Read when Rive state machines, inputs, events, or data binding connect to app state.
references/docs-rive-react.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/docs-rive-state-machine.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/docs-rive-web-js.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/implementation-notes.md - Copied source excerpt. Load only when exact upstream wording or API detail is needed.
references/index.md - Complete reference inventory and routing summary.
references/source-ledger.md - Source list, checked date, and copy policy.
references/provenance.json - Machine-readable source and local-resource metadata.
scripts/audit.mjs - Self-contained audit CLI; run doctor before scan when setup is unclear.
assets/templates/web-rive-audit-report.md - Audit response/report template.
assets/templates/web-rive-review-checklist.md - Manual review checklist.
assets/examples/web-rive-starter.tsx - Starter fixture/example for this skill.
evals/trigger-queries.json - Trigger/near-miss eval set for description tuning.
evals/evals.json - Task-quality evals with assertions.
Audit CLI
node scripts/audit.mjs doctor --root . --format json
node scripts/audit.mjs scan --root . --format markdown
node scripts/audit.mjs scan --root . --format json --output web-rive-audit.json
Treat script findings as leads. Verify every finding against current code before
changing behavior or reporting it as valid.
Closeout
Before finalizing, run the repo's focused validation command, this skill's audit
CLI when relevant, and any browser/device/manual proof required by the changed
surface. Report commands run, findings fixed, findings skipped with reasons,
and residual risk.
1---2name: web-rive3description: Use this skill for Rive web and React runtime integration, .riv assets, state machines, inputs, lifecycle cleanup, accessibility, remote asset security, and fallback behavior. Trigger on Rive, .riv, state machine input, @rive-app/react-webgl2, @rive-app/webgl2, @rive-app/react-canvas, @rive-app/canvas, Rive web. Do not use for near-miss tasks outside these boundaries; route to adjacent motion or platform skills when they own the implementation.4license: MIT5---67# Web Rive89Rive web and React runtime integration, .riv assets, state machines, inputs, lifecycle cleanup, accessibility, remote asset security, and fallback behavior.1011## Operating Contract1213Use this skill as a compact router plus domain checklist. Load references only14when the current task matches their condition. Do not cite local scrape paths,15machine cache paths, or hidden source locations. Verify API details against the16target repo's installed package versions before editing.1718## Source Order19201. Inspect the target repo's installed packages, framework/runtime versions,21 local design tokens, accessibility policy, and existing motion patterns.222. Use the bundled references below for skill-specific gotchas and copied source23 excerpts.243. Use official current docs/package source as API truth when local code or25 bundled notes are version-sensitive.2627## Decision Boundaries2829- Use web-lottie for Lottie/dotLottie assets.30- For React Native, prefer `expo-motion` when installed; otherwise proceed31 with the guidance here.32- Use Motion/GSAP/CSS when no .riv asset or state machine is involved.33- For general Motion/CSS API work or cross-stack audits, prefer `motion` or34 `design-motion-audit` when installed; otherwise proceed with the guidance35 here. Web R3F stays in-bundle via [`web-three-r3f`](../web-three-r3f/SKILL.md).3637## Workflow38391. Inspect asset ownership, state machine names, inputs, autoplay, and runtime package.402. Bind inputs through stable component state and cleanup runtime instances.413. Add fallback and accessible semantics outside canvas.424. Review URL actions and remote asset policy.4344## Gotchas4546- Canvas output is not self-describing to assistive tech.47- State machine input names are asset contracts; verify against the asset.48- Remote .riv files and URL actions need explicit allowlisting.4950<!-- skill-resources:start -->51## Bundled Resources5253- `references/rive-react-runtime.md` - Rive React/runtime lifecycle. Read when using @rive-app/react-webgl2, @rive-app/webgl2, @rive-app/react-canvas, or @rive-app/canvas.54- `references/state-machine-inputs.md` - State machine input contract guide. Read when setting boolean, number, or trigger inputs.55- `references/asset-security-and-fallbacks.md` - Rive asset security, accessibility, and fallback review. Read before shipping remote assets, URL actions, or canvas-only states.56- `references/layout-fit-and-resize.md` - Rive layout, fit, resize, and DPR behavior. Read when sizing a Rive canvas/component, changing artboards, or debugging cropped/blurred assets.57- `references/data-binding-and-events.md` - Rive data binding and event contracts. Read when Rive state machines, inputs, events, or data binding connect to app state.58- `references/docs-rive-react.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.59- `references/docs-rive-state-machine.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.60- `references/docs-rive-web-js.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.61- `references/implementation-notes.md` - Copied source excerpt. Load only when exact upstream wording or API detail is needed.62- `references/index.md` - Complete reference inventory and routing summary.63- `references/source-ledger.md` - Source list, checked date, and copy policy.64- `references/provenance.json` - Machine-readable source and local-resource metadata.65- `scripts/audit.mjs` - Self-contained audit CLI; run `doctor` before `scan` when setup is unclear.66- `assets/templates/web-rive-audit-report.md` - Audit response/report template.67- `assets/templates/web-rive-review-checklist.md` - Manual review checklist.68- `assets/examples/web-rive-starter.tsx` - Starter fixture/example for this skill.69- `evals/trigger-queries.json` - Trigger/near-miss eval set for description tuning.70- `evals/evals.json` - Task-quality evals with assertions.71<!-- skill-resources:end -->7273## Audit CLI7475```bash76node scripts/audit.mjs doctor --root . --format json77node scripts/audit.mjs scan --root . --format markdown78node scripts/audit.mjs scan --root . --format json --output web-rive-audit.json79```8081Treat script findings as leads. Verify every finding against current code before82changing behavior or reporting it as valid.8384## Closeout8586Before finalizing, run the repo's focused validation command, this skill's audit87CLI when relevant, and any browser/device/manual proof required by the changed88surface. Report commands run, findings fixed, findings skipped with reasons,89and residual risk.