rhino3d-scripts
Creates and debugs scripts for the Rhinoceros 3D program. It helps automate modeling tasks and manipulate objects within the program.
What it does
This agent helps create and fix code (scripts) for the Rhinoceros 3D modeling program. It understands different scripting languages used within the software.
When to use it
- ✓When you want to automate repetitive tasks in Rhino.
- ✓If you need to create a new script or fix an existing one.
- ✓To make Rhino interact with objects programmatically.
Example of what to ask your AI
“Write a Python script to draw a circle with a 5-unit radius at the center of the scene.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The agent understands the scripting languages that Rhino 3D uses, such as RhinoPython and RhinoScript. It can generate code to manipulate geometry, layers, and other program elements.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add github/awesome-copilot --skill rhino3d-scriptsOr download just the file:
curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/rhino3d-scripts/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Rhino 3D Scripting Skill
Write production-quality scripts for Rhinoceros 3D. Covers the three scripting surfaces (RhinoScript/VBScript, RhinoPython, direct RhinoCommon .NET) and the Rhino 8+ Script Editor.
When to Use This Skill
- User asks to write, edit, or debug a
.rvb,.vbs, or.pyRhino script - User wants a Rhino command macro or wants to automate a sequence of Rhino commands
- User wants to manipulate geometry, layers, blocks, materials, viewports, or annotations from code
- User mentions
rhinoscriptsyntax,scriptcontext,RhinoCommon,Rhino.Geometry,RhinoDoc, or the Script Editor - User wants to pick objects, prompt for input, or build a small UI inside Rhino
- User asks how to load, run, or distribute a script (startup scripts, aliases, toolbar buttons)
Choosing a Scripting Surface
Pick the surface based on the task, not preference. Recommend Python by default for new work.
| Surface | When to choose | File ext |
|---|---|---|
RhinoPython (rhinoscriptsyntax + RhinoCommon) |
Default for new scripts. Best ecosystem, readable, full RhinoCommon access. | .py |
| RhinoScript (VBScript) | Maintaining legacy .rvb/.vbs files; integrating with VBA/COM. |
.rvb, .vbs |
| RhinoCommon (C#/.NET) via Script Editor | Performance-critical loops, complex geometry, leveraging .NET libraries. | .cs |
| Command macro | Pure sequence of existing Rhino commands; no logic. | toolbar/alias |
A macro is not a script — it is a string of command-line input (e.g. ! _-Line 0,0,0 10,0,0 _Enter). Use a script the moment you need a variable, loop, or conditional.
Prerequisites
- Rhino 7 or later (Rhino 8 strongly recommended — unified Script Editor supports Python 3, VB, and C# in one window).
- Script Editor: type
_ScriptEditor(Rhino 8) or_EditPythonScript/_EditScript(older). - Run a saved file from the command line with
_-RunPythonScriptor_LoadScript+_RunScript.
Core Patterns
Python: minimal scaffold
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
def main():
obj_id = rs.GetObject("Select a curve", filter=rs.filter.curve, preselect=True)
if not obj_id:
return
length = rs.CurveLength(obj_id)
print("Length: {0:.4f}".format(length))
if __name__ == "__main__":
main()
Python: working with RhinoCommon directly
import Rhino
import scriptcontext as sc
doc = sc.doc # Rhino.RhinoDoc.ActiveDoc
tol = doc.ModelAbsoluteTolerance
circle = Rhino.Geometry.Circle(Rhino.Geometry.Point3d(0, 0, 0), 5.0)
curve_id = doc.Objects.AddCircle(circle)
doc.Views.Redraw()
VBScript: minimal scaffold
Option Explicit
Call Main()
Sub Main()
Dim strObject
strObject = Rhino.GetObject("Select a curve", 4) ' 4 = curve filter
If IsNull(strObject) Then Exit Sub
Rhino.Print "Length: " & Rhino.CurveLength(strObject)
End Sub
Picking objects with a custom filter (Python, RhinoCommon)
import Rhino
import scriptcontext as sc
go = Rhino.Input.Custom.GetObject()
go.SetCommandPrompt("Select breps")
go.GeometryFilter = Rhino.DocObjects.ObjectType.Brep
go.SubObjectSelect = False
go.GetMultiple(1, 0)
if go.CommandResult() != Rhino.Commands.Result.Success:
pass
else:
ids = [go.Object(i).ObjectId for i in range(go.ObjectCount)]
Step-by-Step Workflows
Bulk-modify many objects fast
- Disable redraw:
rs.EnableRedraw(False). - Wrap mutations in a single undo record:
undo = doc.BeginUndoRecord("My Op")…doc.EndUndoRecord(undo). - Use RhinoCommon directly inside the loop (skip
rhinoscriptsyntaxoverhead). - Re-enable redraw and call
doc.Views.Redraw()in atry/finallyso a crash never leaves the viewport frozen.
Distribute a script to a teammate
- Save the
.py/.rvbsomewhere on disk. - Add the folder to
Options → Files → Search pathsso Rhino can find it by name. - Create a toolbar button or alias whose macro is:
- Python:
! _-RunPythonScript "MyScript.py" - RhinoScript:
! _-LoadScript "MyScript.rvb" _-RunScript MySubName
- Python:
- The leading
!cancels any running command;-runs the command in script (no-dialog) mode.
Run code at Rhino startup
- Place a
.rvb/.pyin a search path. Tools → Options → RhinoScript(orPython) → add to Startup list. The file executes once per session.
Gotchas
…
FAQ
What's the difference between a script and a macro?
A macro is a simple sequence of commands, while a script is more complex code that can have logic, variables, and loops.
Which scripting language should I use?
For new projects, Python is generally recommended as it's more modern and has more features. RhinoScript is used for older code.
How do I run a script in Rhino?
You can use the '_ScriptEditor' command to open an editor, paste your code, and run it, or save the script and use commands like '_RunPythonScript' or '_LoadScript'.
Details
Original description by the author
Authoring and debugging scripts for Rhinoceros 3D (Rhino 8 and later). Use when asked to write RhinoScript (VBScript / .rvb / .vbs), RhinoPython, or RhinoCommon-based scripts; automate Rhino modeling tasks; build command macros; manipulate Rhino geometry, layers, blocks, or document objects; pick objects from the viewport; control redraw and undo; or load and run scripts from the Rhino Script Edit
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #5348
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
acquire-codebase-knowledge
Helps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
github/awesome-copilot
acreadiness-assess
Enables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
github/awesome-copilot
acreadiness-generate-instructions
Helps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
github/awesome-copilot
acreadiness-policy
Enables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
github/awesome-copilot
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC