npx skills add smithery/neversight --skill rive-scripting
stevysmith/rive-skills · Archived
rive-scripting
Trigger when: (1) Working with Rive scripts or Luau code, (2) Code contains Node, Layout, Converter, or PathEffect protocols, (3) User mentions "Rive scripting" or "Rive Luau", (4) Drawing with Path, Paint, Renderer APIs, (5) Files have .lua extension in a Rive project context. Best practices for Rive Scripting - Luau-based scripts for procedural graphics, custom layouts, data converters, and path effects that run inside Rive animations.
Installation
npx skills add stevysmith/rive-skills --skill rive-scripting
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Trigger when: (1) Using @rive-app/react-canvas or @rive-app/react-webgl, (2) Using useRive hook…
14 installsTrigger when: (1) User wants to create a Rive animation programmatically, (2) User mentions "ge…
5 installsTrigger when: (1) Loading or embedding .riv files on the web, (2) Using @rive-app/canvas or @ri…
4 installsRequired reference for Prisma ORM 7 SQL driver adapter work.
258.3K installsSimilar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Authoring MSW scripts (.mlua) plus integrated playtest and debugging. Covers mlua syntax, annot…
6.6K installs>- XSS playbook. Use when user-controlled content reaches HTML, attributes, JavaScript, DOM sin…
3.2K installsWrite Unity 6.3 LTS C# gameplay scripts: the MonoBehaviour lifecycle (Awake/OnEnable/Start/Upda…
2.1K installsBash scripting workflow for creating production-ready shell scripts with defensive patterns, er…
2K installsTurn a reference Instagram Reel into a script for your own Reel, tuned to your voice and repurp…
1.2K installsBash scripting guidelines covering security, portability, error handling, and automation best p…
820 installsAlso in this package
Other skills from stevysmith/rive-skills.
npx skills add stevysmith/rive-skills
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
More metadata
- tags
- rive, scripting, luau, animation, graphics, procedural
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md3,025 B -
docs
SUMMARY.md463 B
History
- First seen on skills.sh
- First recorded snapshot · 11 installs
SKILL.md
Rive Scripting
Rive Scripting uses Luau (Roblox's Lua variant) to create interactive and procedural behaviors inside Rive animations. Scripts run in the Rive editor and export with your .riv file.
Script Types
| Type | Purpose | Key Methods |
|---|---|---|
| Node Script | Procedural drawing and interactivity | init, advance, update, draw |
| Layout Script | Custom sizing and positioning | measure, resize |
| Converter Script | Transform data for bindings | convert, reverseConvert |
| PathEffect Script | Modify paths procedurally | effect |
| Util Script | Reusable helper functions | exports |
Luau Quick Reference
-- Types
type MyState = {
count: number,
active: boolean,
items: {string},
}
-- Functions
local function add(a: number, b: number): number
return a + b
end
-- Tables
local t = {x = 10, y = 20}
t.z = 30
-- Conditionals
if value > 0 then
-- positive
elseif value < 0 then
-- negative
else
-- zero
end
-- Loops
for i = 1, 10 do
print(i)
end
for key, value in pairs(table) do
print(key, value)
end
Core Pattern
All Rive scripts follow this pattern:
-- 1. Define your state type
type MyNode = {
path: Path,
paint: Paint,
time: number,
}
-- 2. Define protocol methods
function draw(self: MyNode, renderer: Renderer)
renderer:drawPath(self.path, self.paint)
end
function advance(self: MyNode, elapsed: number)
self.time = self.time + elapsed
end
-- 3. Return factory function
return function(): Node<MyNode>
return {
draw = draw,
advance = advance,
path = Path.new(),
paint = Paint.new(),
time = 0,
}
end
Key APIs
Drawing
Path- Vector paths (moveTo, lineTo, quadTo, cubicTo, close)Paint- Fill/stroke styling (color, gradient, thickness)Renderer- Drawing operations (drawPath, clipPath, transform)
Geometry
Vec2D- 2D vectors (xy, length, normalize, dot)AABB- Axis-aligned bounding boxesMat2D- 2D transformation matrices
Data
ViewModel- Access bound dataProperty- Read/write data valuesTrigger- Fire events
Rules
@file rules/getting-started.md @file rules/node-scripts.md @file rules/drawing.md @file rules/pointer-events.md @file rules/layout-scripts.md @file rules/converter-scripts.md @file rules/path-effects.md @file rules/data-binding.md @file rules/util-scripts.md @file rules/api-reference.md