[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77W1K3T93QTF88TKHJ2720N":3,"skill-same:01M77W1K3T93QTF88TKHJ2720N":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77W1K3T93QTF88TKHJ2720N","rhino3d-scripts",null,"Authoring and debugging scripts for Rhinoceros 3D (Rhino 8 and later). Use when asked to write RhinoScript (VBScript \u002F .rvb \u002F .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 Editor. Covers `rhinoscriptsyntax`, `scriptcontext`, the `Rhino.*` RhinoCommon namespaces (`Rhino.Geometry`, `Rhino.DocObjects`, `Rhino.Input`, `Rhino.UI`, `Rhino.Display`, `Rhino.FileIO`), and the Rhino 8 unified Script Editor.","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frhino3d-scripts\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Authoring and debugging scripts for Rhinoceros 3D (Rhino 8 and later). Use when asked to write RhinoScript (VBScript \u002F .rvb \u002F .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 Editor. Covers `rhinoscriptsyntax`, `scriptcontext`, the `Rhino.*` RhinoCommon namespaces (`Rhino.Geometry`, `Rhino.DocObjects`, `Rhino.Input`, `Rhino.UI`, `Rhino.Display`, `Rhino.FileIO`), and the Rhino 8 unified Script Editor.\"\n---\n# Rhino 3D Scripting Skill\n\nWrite production-quality scripts for Rhinoceros 3D. Covers the three scripting surfaces (RhinoScript\u002FVBScript, RhinoPython, direct RhinoCommon .NET) and the Rhino 8+ Script Editor.\n\n## When to Use This Skill\n\n- User asks to write, edit, or debug a `.rvb`, `.vbs`, or `.py` Rhino script\n- User wants a Rhino **command macro** or wants to automate a sequence of Rhino commands\n- User wants to manipulate geometry, layers, blocks, materials, viewports, or annotations from code\n- User mentions `rhinoscriptsyntax`, `scriptcontext`, `RhinoCommon`, `Rhino.Geometry`, `RhinoDoc`, or the Script Editor\n- User wants to pick objects, prompt for input, or build a small UI inside Rhino\n- User asks how to load, run, or distribute a script (startup scripts, aliases, toolbar buttons)\n\n## Choosing a Scripting Surface\n\nPick the surface based on the task, not preference. Recommend Python by default for new work.\n\n| Surface | When to choose | File ext |\n|---|---|---|\n| **RhinoPython** (`rhinoscriptsyntax` + RhinoCommon) | Default for new scripts. Best ecosystem, readable, full RhinoCommon access. | `.py` |\n| **RhinoScript** (VBScript) | Maintaining legacy `.rvb`\u002F`.vbs` files; integrating with VBA\u002FCOM. | `.rvb`, `.vbs` |\n| **RhinoCommon (C#\u002F.NET) via Script Editor** | Performance-critical loops, complex geometry, leveraging .NET libraries. | `.cs` |\n| **Command macro** | Pure sequence of existing Rhino commands; no logic. | toolbar\u002Falias |\n\nA 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.\n\n## Prerequisites\n\n- Rhino 7 or later (Rhino 8 strongly recommended — unified Script Editor supports Python 3, VB, and C# in one window).\n- Script Editor: type `_ScriptEditor` (Rhino 8) or `_EditPythonScript` \u002F `_EditScript` (older).\n- Run a saved file from the command line with `_-RunPythonScript` or `_LoadScript` + `_RunScript`.\n\n## Core Patterns\n\n### Python: minimal scaffold\n\n```python\nimport rhinoscriptsyntax as rs\nimport scriptcontext as sc\nimport Rhino\n\ndef main():\n    obj_id = rs.GetObject(\"Select a curve\", filter=rs.filter.curve, preselect=True)\n    if not obj_id:\n        return\n    length = rs.CurveLength(obj_id)\n    print(\"Length: {0:.4f}\".format(length))\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Python: working with RhinoCommon directly\n\n```python\nimport Rhino\nimport scriptcontext as sc\n\ndoc = sc.doc  # Rhino.RhinoDoc.ActiveDoc\ntol = doc.ModelAbsoluteTolerance\n\ncircle = Rhino.Geometry.Circle(Rhino.Geometry.Point3d(0, 0, 0), 5.0)\ncurve_id = doc.Objects.AddCircle(circle)\ndoc.Views.Redraw()\n```\n\n### VBScript: minimal scaffold\n\n```vbscript\nOption Explicit\n\nCall Main()\n\nSub Main()\n    Dim strObject\n    strObject = Rhino.GetObject(\"Select a curve\", 4)  ' 4 = curve filter\n    If IsNull(strObject) Then Exit Sub\n    Rhino.Print \"Length: \" & Rhino.CurveLength(strObject)\nEnd Sub\n```\n\n### Picking objects with a custom filter (Python, RhinoCommon)\n\n```python\nimport Rhino\nimport scriptcontext as sc\n\ngo = Rhino.Input.Custom.GetObject()\ngo.SetCommandPrompt(\"Select breps\")\ngo.GeometryFilter = Rhino.DocObjects.ObjectType.Brep\ngo.SubObjectSelect = False\ngo.GetMultiple(1, 0)\nif go.CommandResult() != Rhino.Commands.Result.Success:\n    pass\nelse:\n    ids = [go.Object(i).ObjectId for i in range(go.ObjectCount)]\n```\n\n## Step-by-Step Workflows\n\n### Bulk-modify many objects fast\n\n1. Disable redraw: `rs.EnableRedraw(False)`.\n2. Wrap mutations in a single undo record: `undo = doc.BeginUndoRecord(\"My Op\")` … `doc.EndUndoRecord(undo)`.\n3. Use RhinoCommon directly inside the loop (skip `rhinoscriptsyntax` overhead).\n4. Re-enable redraw and call `doc.Views.Redraw()` in a `try`\u002F`finally` so a crash never leaves the viewport frozen.\n\n### Distribute a script to a teammate\n\n1. Save the `.py` \u002F `.rvb` somewhere on disk.\n2. Add the folder to `Options → Files → Search paths` so Rhino can find it by name.\n3. Create a toolbar button or alias whose macro is:\n   - Python: `! _-RunPythonScript \"MyScript.py\"`\n   - RhinoScript: `! _-LoadScript \"MyScript.rvb\" _-RunScript MySubName`\n4. The leading `!` cancels any running command; `-` runs the command in script (no-dialog) mode.\n\n### Run code at Rhino startup\n\n1. Place a `.rvb`\u002F`.py` in a search path.\n2. `Tools → Options → RhinoScript` (or `Python`) → add to **Startup** list. The file executes once per session.\n\n## Gotchas\n\n- **`rhinoscriptsyntax` returns GUIDs, RhinoCommon returns objects.** Mixing them is fine, but `doc.Objects.Find(guid)` is the bridge from a `rs.*` id to a `RhinoObject`.\n- **Coordinates differ by surface.** Python uses `(x, y, z)` tuples *or* `Rhino.Geometry.Point3d`; VBScript uses 3-element `Array(x, y, z)`. Never pass a Python list to a VBScript helper through COM.\n- **`Option Explicit` is off by default in VBScript.** Typos silently create new variables. Always add `Option Explicit` at the top of `.rvb` files.\n- **VBScript has no block scope.** All `Dim`s inside a `Sub` are hoisted to the top of the procedure. Loop counters leak.\n- **`Nothing`, `Empty`, and `Null` are different** in VBScript. Use `IsNull` for `Rhino.GetObject` failure, `IsEmpty` for uninitialized `Variant`, `Is Nothing` for object refs.\n- **Parentheses change calling semantics in VBScript.** `Call Foo(a, b)` and `Foo a, b` are valid; `Foo(a, b)` (no `Call`, with parens) is **not** a call to a Sub — it’s a syntax error for multi-arg subs and a forced `ByVal` for single-arg.\n- **Tolerance is per-document.** Always read `doc.ModelAbsoluteTolerance` rather than hardcoding `0.001`; users work in mm, m, inches, etc.\n- **Long loops should poll `Rhino.RhinoApp.EscapeKeyPressed`** so the user can cancel. Otherwise Rhino appears frozen.\n- **GUID strings vs `System.Guid`.** `rhinoscriptsyntax` accepts either; RhinoCommon wants `System.Guid`. Convert with `System.Guid(str_id)` if needed.\n- **Don’t call `doc.Views.Redraw()` inside a tight loop.** Toggle redraw once outside the loop.\n- **`.rvb` is just `.vbs` renamed** with a Rhino-specific extension so Rhino’s `LoadScript` recognizes it. Same VBScript engine.\n- **`Rhino.RhinoApp.IsHeadless` may not exist on older Rhino 8 builds.** Use `getattr(Rhino.RhinoApp, \"IsHeadless\", None)` and check for `None` before using. Fall back to a heuristic (e.g. `sc.doc.Views.Count == 0`) or assume GUI present.\n- **`RhinoMath` is at `Rhino.RhinoMath`, not `Rhino.DocObjects.RhinoMath`.** Accessing `Rhino.DocObjects.RhinoMath` raises `AttributeError`.\n- **`doc.Objects.AddBrep()` returns `System.Guid.Empty` on failure.** In Rhino 8 CPython the `System` namespace may not be directly importable; check the return value as a string: `str(obj_id) == \"00000000-0000-0000-0000-000000000000\"`.\n- **`rhinoscriptsyntax` has no type stubs.** Static analysers (Pylance\u002FPyright) flag `import rhinoscriptsyntax as rs` as unresolvable. Suppress with `# type: ignore` on the import line; the module is always available at Rhino runtime.\n- **Never name a script after a Python standard-library module** (e.g. `random.py`, `math.py`, `os.py`). IronPython 2.7 (`_-RunPythonScript`) resolves the script directory before stdlib, so any `import random` inside the stdlib (e.g. `tempfile` imports `random` internally) will find your file instead and fail with `Cannot import name \u003CX>`. CPython 3 (`rhinocode`) is unaffected because it resolves stdlib first. Rename the script or avoid importing modules that pull in the shadowed name.\n- **Em dashes and other non-ASCII characters silently break `_-RunPythonScript` (IronPython 2.7).** `rhinocode script` uses CPython 3 (UTF-8 by default) so the same file works there, making the failure non-obvious. IronPython 2.7 raises `SyntaxError: Non-ASCII character '\\xe2'` at the first offending byte. The most common culprit is the **em dash** (`--` auto-converted to `--` by many editors). Add `# -*- coding: utf-8 -*-` as line 1 of every script that must run under both runtimes, and replace typographic characters with ASCII equivalents: em dash `--`, arrow `->`, multiplication `x`.\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---|---|\n| `rs.GetObject` returns `None` immediately | The user pressed Escape, or your `filter` excludes everything. Re-check `rs.filter.*` flags. |\n| “Unable to find script” when running by name | The folder isn’t in `Options → Files → Search paths`. |\n| VBScript `Type mismatch` on coordinates | You passed a 2-element array. Rhino requires 3-element `Array(x, y, z)`. |\n| Python `ImportError: No module named Rhino` | You’re running CPython outside Rhino. RhinoCommon is only available in Rhino’s embedded Python (or via `rhino3dm` for read-only file work). |\n| Created geometry doesn’t appear | You forgot `doc.Views.Redraw()`, or `rs.EnableRedraw(False)` was never re-enabled. |\n| Undo undoes only the last object of a batch | Wrap the batch in `BeginUndoRecord` \u002F `EndUndoRecord`. |\n| Script works alone but fails as a startup script | Startup runs before any document is open — return early or skip document-dependent work when `sc.doc is None`. |\n| `rs.Command(\"...\")` returns `False` | The macro string is malformed. Prefix with `!` and `-`, end every prompt with `_Enter` or a value. |\n| `AttributeError: type object 'RhinoApp' has no attribute 'IsHeadless'` | Property added in a later Rhino 8 build. Use `getattr(Rhino.RhinoApp, \"IsHeadless\", None)` and guard against `None`. |\n| `rhinocode script` ignores arguments after the script path | rhinocode concatenates extra tokens onto the file URI. Pass data via a temp file or a Rhino dialog instead. See `references\u002Fmacros-and-loading.md`. |\n| `Cannot import name \u003CX>` inside stdlib (e.g. `tempfile`, `os`) when using `_-RunPythonScript` | Script filename shadows a stdlib module (e.g. `random.py` shadows `random`). IronPython 2.7 searches the script directory before stdlib. Rename the script, or remove the `import` that pulls in the shadowed module and replace it with a direct alternative (e.g. read `%TEMP%` via `os.environ` instead of `import tempfile`). |\n| `SyntaxError: Non-ASCII character '\\xe2' ... but no encoding declared` | IronPython 2.7 (`_-RunPythonScript`) hit an em dash or similar character. Add `# -*- coding: utf-8 -*-` as line 1, or replace the character: em dash `--`, arrow `->`. The same file runs fine under `rhinocode` (CPython 3), which hides the problem. |\n\n## References\n\n- [references\u002Frhinoscriptsyntax-cheatsheet.md](references\u002Frhinoscriptsyntax-cheatsheet.md) — most-used `rs.*` functions by category.\n- [references\u002Frhinocommon-map.md](references\u002Frhinocommon-map.md) — which namespace to import for which task.\n- [references\u002Fmacros-and-loading.md](references\u002Fmacros-and-loading.md) — command-line macro syntax, `LoadScript` \u002F `RunScript`, search paths.\n- [references\u002Fvbscript-quirks.md](references\u002Fvbscript-quirks.md) — VBScript-only traps relevant to RhinoScript.\n\n### Upstream docs\n\n- RhinoScript landing: \u003Chttps:\u002F\u002Fdocs.mcneel.com\u002Frhino\u002F8\u002Fhelp\u002Fen-us\u002Finformation\u002Frhinoscripting.htm>\n- Developer hub: \u003Chttps:\u002F\u002Fdeveloper.rhino3d.com\u002F>\n- RhinoCommon API index: \u003Chttps:\u002F\u002Fmcneel.github.io\u002Frhinocommon-api-docs\u002Fapi\u002FRhinoCommon\u002Fhtml\u002FR_Project_RhinoCommon.htm>\n- Example scripts repo: \u003Chttps:\u002F\u002Fgithub.com\u002Fmcneel\u002Frhino-developer-samples\u002Ftree\u002F8\u002Frhinoscript>\n","# Rhino 3D Scripting Skill\n\nWrite production-quality scripts for Rhinoceros 3D. Covers the three scripting surfaces (RhinoScript\u002FVBScript, RhinoPython, direct RhinoCommon .NET) and the Rhino 8+ Script Editor.\n\n## When to Use This Skill\n\n- User asks to write, edit, or debug a `.rvb`, `.vbs`, or `.py` Rhino script\n- User wants a Rhino **command macro** or wants to automate a sequence of Rhino commands\n- User wants to manipulate geometry, layers, blocks, materials, viewports, or annotations from code\n- User mentions `rhinoscriptsyntax`, `scriptcontext`, `RhinoCommon`, `Rhino.Geometry`, `RhinoDoc`, or the Script Editor\n- User wants to pick objects, prompt for input, or build a small UI inside Rhino\n- User asks how to load, run, or distribute a script (startup scripts, aliases, toolbar buttons)\n\n## Choosing a Scripting Surface\n\nPick the surface based on the task, not preference. Recommend Python by default for new work.\n\n| Surface | When to choose | File ext |\n|---|---|---|\n| **RhinoPython** (`rhinoscriptsyntax` + RhinoCommon) | Default for new scripts. Best ecosystem, readable, full RhinoCommon access. | `.py` |\n| **RhinoScript** (VBScript) | Maintaining legacy `.rvb`\u002F`.vbs` files; integrating with VBA\u002FCOM. | `.rvb`, `.vbs` |\n| **RhinoCommon (C#\u002F.NET) via Script Editor** | Performance-critical loops, complex geometry, leveraging .NET libraries. | `.cs` |\n| **Command macro** | Pure sequence of existing Rhino commands; no logic. | toolbar\u002Falias |\n\nA 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.\n\n## Prerequisites\n\n- Rhino 7 or later (Rhino 8 strongly recommended — unified Script Editor supports Python 3, VB, and C# in one window).\n- Script Editor: type `_ScriptEditor` (Rhino 8) or `_EditPythonScript` \u002F `_EditScript` (older).\n- Run a saved file from the command line with `_-RunPythonScript` or `_LoadScript` + `_RunScript`.\n\n## Core Patterns\n\n### Python: minimal scaffold\n\n```python\nimport rhinoscriptsyntax as rs\nimport scriptcontext as sc\nimport Rhino\n\ndef main():\n    obj_id = rs.GetObject(\"Select a curve\", filter=rs.filter.curve, preselect=True)\n    if not obj_id:\n        return\n    length = rs.CurveLength(obj_id)\n    print(\"Length: {0:.4f}\".format(length))\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Python: working with RhinoCommon directly\n\n```python\nimport Rhino\nimport scriptcontext as sc\n\ndoc = sc.doc  # Rhino.RhinoDoc.ActiveDoc\ntol = doc.ModelAbsoluteTolerance\n\ncircle = Rhino.Geometry.Circle(Rhino.Geometry.Point3d(0, 0, 0), 5.0)\ncurve_id = doc.Objects.AddCircle(circle)\ndoc.Views.Redraw()\n```\n\n### VBScript: minimal scaffold\n\n```vbscript\nOption Explicit\n\nCall Main()\n\nSub Main()\n    Dim strObject\n    strObject = Rhino.GetObject(\"Select a curve\", 4)  ' 4 = curve filter\n    If IsNull(strObject) Then Exit Sub\n    Rhino.Print \"Length: \" & Rhino.CurveLength(strObject)\nEnd Sub\n```\n\n### Picking objects with a custom filter (Python, RhinoCommon)\n\n```python\nimport Rhino\nimport scriptcontext as sc\n\ngo = Rhino.Input.Custom.GetObject()\ngo.SetCommandPrompt(\"Select breps\")\ngo.GeometryFilter = Rhino.DocObjects.ObjectType.Brep\ngo.SubObjectSelect = False\ngo.GetMultiple(1, 0)\nif go.CommandResult() != Rhino.Commands.Result.Success:\n    pass\nelse:\n    ids = [go.Object(i).ObjectId for i in range(go.ObjectCount)]\n```\n\n## Step-by-Step Workflows\n\n### Bulk-modify many objects fast\n\n1. Disable redraw: `rs.EnableRedraw(False)`.\n2. Wrap mutations in a single undo record: `undo = doc.BeginUndoRecord(\"My Op\")` … `doc.EndUndoRecord(undo)`.\n3. Use RhinoCommon directly inside the loop (skip `rhinoscriptsyntax` overhead).\n4. Re-enable redraw and call `doc.Views.Redraw()` in a `try`\u002F`finally` so a crash never leaves the viewport frozen.\n\n### Distribute a script to a teammate\n\n1. Save the `.py` \u002F `.rvb` somewhere on disk.\n2. Add the folder to `Options → Files → Search paths` so Rhino can find it by name.\n3. Create a toolbar button or alias whose macro is:\n   - Python: `! _-RunPythonScript \"MyScript.py\"`\n   - RhinoScript: `! _-LoadScript \"MyScript.rvb\" _-RunScript MySubName`\n4. The leading `!` cancels any running command; `-` runs the command in script (no-dialog) mode.\n\n### Run code at Rhino startup\n\n1. Place a `.rvb`\u002F`.py` in a search path.\n2. `Tools → Options → RhinoScript` (or `Python`) → add to **Startup** list. The file executes once per session.\n\n## Gotchas\n\n- **`rhinoscriptsyntax` returns GUIDs, RhinoCommon returns objects.** Mixing them is fine, but `doc.Objects.Find(guid)` is the bridge from a `rs.*` id to a `RhinoObject`.\n- **Coordinates differ by surface.** Python uses `(x, y, z)` tuples *or* `Rhino.Geometry.Point3d`; VBScript uses 3-element `Array(x, y, z)`. Never pass a Python list to a VBScript helper through COM.\n- **`Option Explicit` is off by default in VBScript.** Typos silently create new variables. Always add `Option Explicit` at the top of `.rvb` files.\n- **VBScript has no block scope.** All `Dim`s inside a `Sub` are hoisted to the top of the procedure. Loop counters leak.\n- **`Nothing`, `Empty`, and `Null` are different** in VBScript. Use `IsNull` for `Rhino.GetObject` failure, `IsEmpty` for uninitialized `Variant`, `Is Nothing` for object refs.\n- **Parentheses change calling semantics in VBScript.** `Call Foo(a, b)` and `Foo a, b` are valid; `Foo(a, b)` (no `Call`, with parens) is **not** a call to a Sub — it’s a syntax error for multi-arg subs and a forced `ByVal` for single-arg.\n- **Tolerance is per-document.** Always read `doc.ModelAbsoluteTolerance` rather than hardcoding `0.001`; users work in mm, m, inches, etc.\n- **Long loops should poll `Rhino.RhinoApp.EscapeKeyPressed`** so the user can cancel. Otherwise Rhino appears frozen.\n- **GUID strings vs `System.Guid`.** `rhinoscriptsyntax` accepts either; RhinoCommon wants `System.Guid`. Convert with `System.Guid(str_id)` if needed.\n- **Don’t call `doc.Views.Redraw()` inside a tight loop.** Toggle redraw once outside the loop.\n- **`.rvb` is just `.vbs` renamed** with a Rhino-specific extension so Rhino’s `LoadScript` recognizes it. Same VBScript engine.\n- **`Rhino.RhinoApp.IsHeadless` may not exist on older Rhino 8 builds.** Use `getattr(Rhino.RhinoApp, \"IsHeadless\", None)` and check for `None` before using. Fall back to a heuristic (e.g. `sc.doc.Views.Count == 0`) or assume GUI present.\n- **`RhinoMath` is at `Rhino.RhinoMath`, not `Rhino.DocObjects.RhinoMath`.** Accessing `Rhino.DocObjects.RhinoMath` raises `AttributeError`.\n- **`doc.Objects.AddBrep()` returns `System.Guid.Empty` on failure.** In Rhino 8 CPython the `System` namespace may not be directly importable; check the return value as a string: `str(obj_id) == \"00000000-0000-0000-0000-000000000000\"`.\n- **`rhinoscriptsyntax` has no type stubs.** Static analysers (Pylance\u002FPyright) flag `import rhinoscriptsyntax as rs` as unresolvable. Suppress with `# type: ignore` on the import line; the module is always available at Rhino runtime.\n- **Never name a script after a Python standard-library module** (e.g. `random.py`, `math.py`, `os.py`). IronPython 2.7 (`_-RunPythonScript`) resolves the script directory before stdlib, so any `import random` inside the stdlib (e.g. `tempfile` imports `random` internally) will find your file instead and fail with `Cannot import name \u003CX>`. CPython 3 (`rhinocode`) is unaffected because it resolves stdlib first. Rename the script or avoid importing modules that pull in the shadowed name.\n- **Em dashes and other non-ASCII characters silently break `_-RunPythonScript` (IronPython 2.7).** `rhinocode script` uses CPython 3 (UTF-8 by default) so the same file works there, making the failure non-obvious. IronPython 2.7 raises `SyntaxError: Non-ASCII character '\\xe2'` at the first offending byte. The most common culprit is the **em dash** (`--` auto-converted to `--` by many editors). Add `# -*- coding: utf-8 -*-` as line 1 of every script that must run under both runtimes, and replace typographic characters with ASCII equivalents: em dash `--`, arrow `->`, multiplication `x`.\n\n## Troubleshooting\n\n| Symptom | Fix |\n|---|---|\n| `rs.GetObject` returns `None` immediately | The user pressed Escape, or your `filter` excludes everything. Re-check `rs.filter.*` flags. |\n| “Unable to find script” when running by name | The folder isn’t in `Options → Files → Search paths`. |\n| VBScript `Type mismatch` on coordinates | You passed a 2-element array. Rhino requires 3-element `Array(x, y, z)`. |\n| Python `ImportError: No module named Rhino` | You’re running CPython outside Rhino. RhinoCommon is only available in Rhino’s embedded Python (or via `rhino3dm` for read-only file work). |\n| Created geometry doesn’t appear | You forgot `doc.Views.Redraw()`, or `rs.EnableRedraw(False)` was never re-enabled. |\n| Undo undoes only the last object of a batch | Wrap the batch in `BeginUndoRecord` \u002F `EndUndoRecord`. |\n| Script works alone but fails as a startup script | Startup runs before any document is open — return early or skip document-dependent work when `sc.doc is None`. |\n| `rs.Command(\"...\")` returns `False` | The macro string is malformed. Prefix with `!` and `-`, end every prompt with `_Enter` or a value. |\n| `AttributeError: type object 'RhinoApp' has no attribute 'IsHeadless'` | Property added in a later Rhino 8 build. Use `getattr(Rhino.RhinoApp, \"IsHeadless\", None)` and guard against `None`. |\n| `rhinocode script` ignores arguments after the script path | rhinocode concatenates extra tokens onto the file URI. Pass data via a temp file or a Rhino dialog instead. See `references\u002Fmacros-and-loading.md`. |\n| `Cannot import name \u003CX>` inside stdlib (e.g. `tempfile`, `os`) when using `_-RunPythonScript` | Script filename shadows a stdlib module (e.g. `random.py` shadows `random`). IronPython 2.7 searches the script directory before stdlib. Rename the script, or remove the `import` that pulls in the shadowed module and replace it with a direct alternative (e.g. read `%TEMP%` via `os.environ` instead of `import tempfile`). |\n| `SyntaxError: Non-ASCII character '\\xe2' ... but no encoding declared` | IronPython 2.7 (`_-RunPythonScript`) hit an em dash or similar character. Add `# -*- coding: utf-8 -*-` as line 1, or replace the character: em dash `--`, arrow `->`. The same file runs fine under `rhinocode` (CPython 3), which hides the problem. |\n\n## References\n\n- [references\u002Frhinoscriptsyntax-cheatsheet.md](references\u002Frhinoscriptsyntax-cheatsheet.md) — most-used `rs.*` functions by category.\n- [references\u002Frhinocommon-map.md](references\u002Frhinocommon-map.md) — which namespace to import for which task.\n- [references\u002Fmacros-and-loading.md](references\u002Fmacros-and-loading.md) — command-line macro syntax, `LoadScript` \u002F `RunScript`, search paths.\n- [references\u002Fvbscript-quirks.md](references\u002Fvbscript-quirks.md) — VBScript-only traps relevant to RhinoScript.\n\n### Upstream docs\n\n- RhinoScript landing: \u003Chttps:\u002F\u002Fdocs.mcneel.com\u002Frhino\u002F8\u002Fhelp\u002Fen-us\u002Finformation\u002Frhinoscripting.htm>\n- Developer hub: \u003Chttps:\u002F\u002Fdeveloper.rhino3d.com\u002F>\n- RhinoCommon API index: \u003Chttps:\u002F\u002Fmcneel.github.io\u002Frhinocommon-api-docs\u002Fapi\u002FRhinoCommon\u002Fhtml\u002FR_Project_RhinoCommon.htm>\n- Example scripts repo: \u003Chttps:\u002F\u002Fgithub.com\u002Fmcneel\u002Frhino-developer-samples\u002Ftree\u002F8\u002Frhinoscript>\n",{"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92","agent\u002Fskills\u002Frhino3d-scripts",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill rhino3d-scripts",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill rhino3d-scripts",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill rhino3d-scripts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frhino3d-scripts\u002FSKILL.md",true,[46,52,56,60],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Fmacros-and-loading.md","REFERENCE","参考文档",5129,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frhino3d-scripts\u002Freferences\u002Fmacros-and-loading.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Frhinocommon-map.md",3832,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frhino3d-scripts\u002Freferences\u002Frhinocommon-map.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Frhinoscriptsyntax-cheatsheet.md",3402,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frhino3d-scripts\u002Freferences\u002Frhinoscriptsyntax-cheatsheet.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fvbscript-quirks.md",3326,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Frhino3d-scripts\u002Freferences\u002Fvbscript-quirks.md",[65,72,79,86,93,100],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]