Open Brush Lua Plugin Development

VerifiedSafe

This skill helps you create and modify Lua plugins for Open Brush, a VR painting application. It provides access to the complete Open Brush Lua API documentation. Use it when you want to develop plugins, write Lua scripts, or ask about Open Brush scripting APIs.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#open-brush#lua#plugin-development#vr-scripting#api-integration

Recommended for

Automated summary

This skill helps create and modify Lua plugins for Open Brush with full access to API documentation.

Strengths

  • Integrated API documentation access
  • Working plugin examples and templates
  • Clear syntax rules to avoid common mistakes
  • Support for all four plugin types (PointerScript, SymmetryScript, ToolScript, BackgroundScript)

Limitations

  • Requires basic Lua knowledge
  • Does not cover general Open Brush features unrelated to plugins
  • Relies on locally maintained documentation files
When to use it

Use this skill when you need to develop a new Open Brush plugin or modify an existing one.

When not to use it

Do not use it for general Open Brush questions or other scripting languages.

Security analysis

Safe
Quality score92/100

The skill only provides documentation and examples for writing Lua plugins; it does not instruct the AI to execute any system commands or access network/external resources, and there are no destructive operations.

No concerns found

How this analysis is made

Examples

Create a wobble pointer plugin
Create a PointerScript plugin that makes strokes wobble as they are drawn. Use a 'Wobble' prefix and add a parameter for wobble intensity.
Create a symmetry plugin
Create a SymmetryScript plugin that mirrors strokes along multiple axes. Let the user choose between 2-fold, 3-fold, and 4-fold symmetry.
Create a tool plugin background effect
Create a BackgroundScript plugin that draws a grid of dots in the scene. Include parameters for spacing and dot size.

name: open-brush-plugin-skill description: Create and modify Lua plugins for Open Brush with full API documentation access. Use when the user wants to create Open Brush plugins, work with Lua scripts for Open Brush, or asks about Open Brush scripting API, Lua functions, or plugin development.

Open Brush Lua Plugin Development

This skill helps you create and modify Lua plugins for Open Brush, a VR painting application. You have access to the complete Open Brush Lua API documentation.

Quick Start

Plugin File Structure

CRITICAL: Plugin Naming Convention Plugins MUST be named with the correct prefix or Open Brush won't recognize them:

  • PointerScript.PluginName.lua (e.g., PointerScript.Wobble.lua)
  • SymmetryScript.PluginName.lua (e.g., SymmetryScript.ManyAround.lua)
  • ToolScript.PluginName.lua (e.g., ToolScript.Circle.lua)
  • BackgroundScript.PluginName.lua (e.g., BackgroundScript.Lines.lua)

A basic plugin structure:

-- Plugin metadata (in Settings table)
Settings = {
  description = "What this plugin does"
}

-- Optional parameters (exposed as UI widgets)
Parameters = {
  speed = {label = "Speed", type = "float", min = 1, max = 100, default = 50},
  count = {label = "Count", type = "int", min = 1, max = 10, default = 5},
  color = {label = "Color", type = "color", default = Color.red},
  enabled = {label = "Enabled", type = "toggle", default = true},
  name = {label = "Name", type = "text", default = "Untitled"},
  mode = {label = "Mode", type = "list", items = {"A", "B", "C"}, default = "A"},
}

-- Main function (required) - runs every frame
function Main()
  -- Your plugin logic here
  -- Return value determines plugin type (Transform, Path, PathList, or nothing)
end

-- Optional: runs once when plugin starts
function Start()
  -- Setup code
end

-- Optional: runs once when plugin ends
function End()
  -- Cleanup code
end

Where to Find Information

IMPORTANT: All documentation files are located inside this skill's directory. The skill directory is typically at: ~/.claude/skills/open-brush-plugin-skill/ (or C:\Users\USERNAME\.claude\skills\open-brush-plugin-skill\ on Windows)

All paths below are relative to the skill directory, NOT the user's project directory.

When creating a new plugin:

  1. Read references/instructions.md for critical API syntax rules and plugin structure
  2. Check references/examples/ directory for similar working code (PointerScript., SymmetryScript., ToolScript., BackgroundScript.)
  3. Read references/guides/example-plugins/ for explanations of what example plugins do
  4. Read references/guides/writing-plugins/ for step-by-step tutorials on each plugin type

When you need API details:

  1. Check references/lua-modules/__autocomplete.lua for complete list of available classes/methods/properties
  2. Read specific files in references/api-docs/ directory: app.md, brush.md, vector3.md, path.md, etc.

External reference (for context only): https://icosa.gitbook.io/open-brush-plugin-scripting-docs

Instructions for AI Agents

Critical API Rules

MOST IMPORTANT: Only use APIs listed in references/lua-modules/__autocomplete.lua. NEVER invent methods or properties. If unsure, say "I'm unsure - let me check the API documentation" and read __autocomplete.lua. Favor the Open Brush API over standard Lua library functions.

Core Syntax Rules:

  • Constructors: ClassName:New(...) (capital N, always use colon)
  • Properties: object.property (dot notation)
  • Methods: object:method() (colon notation)
  • API classes start with capital letters (e.g., Vector3, Transform, Path)
  • Methods do NOT return self - no method chaining
  • Use Math (capital M) library, not lua's math

Plugin Structure: All plugins define:

  • Main() - called every frame (required)
  • Start() - called when plugin begins (optional)
  • End() - called when plugin ends (optional)
  • Settings table - plugin metadata (optional)
  • Parameters table - UI sliders for user input (optional)
Settings = {
  description = "Plugin description",
  space = "pointer" -- or "canvas", "world", etc.
}

Parameters = {
  speed = {label = "Speed", type = "float", min = 1, max = 100, default = 50},
  count = {label = "Count", type = "int", min = 1, max = 10, default = 5},
  color = {label = "Color", type = "color", default = Color.red},
  enabled = {label = "Enabled", type = "toggle", default = true},
  name = {label = "Name", type = "text", default = "Untitled"},
  mode = {label = "Mode", type = "list", items = {"A", "B", "C"}, default = "A"},
}
-- Access as: Parameters.speed, Parameters.count, etc.

Four Plugin Types:

  1. Pointer Plugin - Returns single Transform

    • Modifies the user's primary brush pointer position while user draws
  2. Symmetry Plugin - Returns Path or list of Transform

    • Controls multiple brush pointers while the user draws
    • Each transform generates one additional stroke
    • Important to understand its special use of coordinate spaces (especially the symmetry widget)
    • Can be combined with Pointer plugins
    • Overrides and replaces mirror or multimirror symmetry modes
  3. Tool Plugin - Returns Path or PathList

    • Generates a complete stroke or strokes in one action based on the users actions
    • Return the stroke data as Path or PathList in Main() - do not use Path:Draw() etc directly
    • Typically triggered on button press/release
    • Active mirror, multimirror or symmetry plugin modes are automatically applied to the output
  4. Background Plugin - Returns nothing

    • Runs autonomously every frame
    • Draws strokes using explicit Draw() methods

Important Constraints:

  • Brush type cannot change during a stroke - only between strokes
  • Brush size cannot change during a stroke but modifying pressure within a stroke often affects size
  • Brush color cannot change during a stroke but color overrides can be applied within a stroke.
  • Understand coordinate spaces - default varies by plugin type (check Settings.space)
  • Transform scale component affects stroke width/thickness

For complete details, examples, and edge cases, read references/instructions.md

Common Gotchas

  1. Coordinate Spaces: By default, Pointer/Tool plugins use space="pointer" (relative to brush hand) while Symmetry plugins use the symmetry widget as origin. Override with Settings.space="canvas" or Settings.space="pointer".

  2. Path Smoothing: Open Brush smooths paths for hand-drawn strokes. For geometric shapes, add extra points with Path:SubdivideSegments(n) to prevent rounding.

  3. Multiple Active Plugins: You can run multiple Background plugins simultaneously, but only one of each other type (Pointer/Symmetry/Tool). You can combine the effects of Pointer and Symmetry. Or Symmetry and Tool.

Plugin Development Workflow

When helping users with Open Brush Lua plugins:

  1. Check example plugins for similar functionality - Consult both references/examples/ (actual code) and references/guides/example-plugins/ (explanations). The examples demonstrate working patterns.
  2. Verify API calls - Check references/lua-modules/__autocomplete.lua before using any API methods or properties
  3. Ask clarifying questions about what the plugin should do before writing code
  4. Provide complete, working examples that users can copy and test
  5. Consider performance - Warn if operations might be slow (e.g., processing thousands of strokes every frame)

Example Plugin Templates

Simple Stroke Counter (Background Plugin)

Settings = {
  description = "Counts total strokes in sketch"
}

local hasCountedOnce = false

function Main()
  if not hasCountedOnce then
    local sketch = App.sketch()
    local strokes = sketch:strokes()
    local count = strokes:count()
    print("Total strokes: " .. count)
    hasCountedOnce = true
  end
end

Position Logger (Background Plugin)

Settings = {
  description = "Logs user position every 2 seconds"
}

local timer = Timer:New()

function Start()
  timer:Start()
end

function Main()
  if timer:Elapsed() > 2.0 then
    local pos = User.position()
    print(string.format("User at: %.2f, %.2f, %.2f", pos.x, pos.y, pos.z))
    timer:Reset()
  end
end

Additional Resources

  • API Documentation Repository: https://github.com/icosa-foundation/open-brush-plugin-scripting-docs
  • Main Documentation Repository: https://github.com/icosa-foundation/open-brush-docs
  • Example Plugins: Browse the LuaScriptExamples directory in the API docs repo for real-world plugin examples

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/open-brush-lua-plugin-development-mm78nodj/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/open-brush-lua-plugin-development-mm78nodj' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/open-brush-lua-plugin-development-mm78nodj/download' --output '.skill-downloads/open-brush-lua-plugin-development-mm78nodj/SKILL.md.part' && mv '.skill-downloads/open-brush-lua-plugin-development-mm78nodj/SKILL.md.part' '.skill-downloads/open-brush-lua-plugin-development-mm78nodj/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/open-brush-lua-plugin-development-mm78nodj/SKILL.md' && test -s '.skill-downloads/open-brush-lua-plugin-development-mm78nodj/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/open-brush-plugin-skill' && cp -R '.skill-downloads/open-brush-lua-plugin-development-mm78nodj' '.claude/skills/open-brush-plugin-skill'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/open-brush-lua-plugin-development-mm78nodj'

openskills read 'open-brush-lua-plugin-development-mm78nodj'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/open-brush-lua-plugin-development-mm78nodj/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills