ben11304/rhino3d_ai2arch/rhino-geometry-api

Claude Code and agent skill by ben11304/rhino3d_ai2arch

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Authoritative RhinoCommon and rhinoscriptsyntax reference for Rhino 8 — covers geometry type selection (NURBS vs Brep vs SubD vs Mesh), tolerance and unit handling, and per-operation failure cheat-sheets for loft, sweep1, revolve, extrude, boolean union/difference/intersection, fillet, offset, and network surface. Use whenever generating or reviewing Rhino python or C# geometry code, or when a geometry op returns null/empty/partial. Prevents hallucinated APIs and silent geometry failures by supplying real function signatures, mandatory pre-flight input checks, and post-operation count/volume guards.

Install

npx vskill@latest install ben11304/rhino3d_ai2arch/rhino-geometry-api

SKILL.md

The same SKILL.md was published earlier as ben11304/rhino3d_ai2arch/rhino-geometry-api.

rhino-geometry-api

Knowledge skill (no user invocation). The brain half of "MCP is hands+eyes, the skill layer is brain+method" for raw geometry code. It does not create objects; it tells the calling skill which RhinoCommon / rhinoscriptsyntax call to emit, how to pre-flight its inputs, and how to prove the result is correct.

The single source of truth for conventions is `../shared/conventions.md`. This skill never restates those rules verbatim — it points at them and adds the per-API detail.


HARD RULE — docs before code

ALWAYS call `get_rhinoscript_docs` / `search_rhinoscript_functions` (for rhinoscriptsyntax) or `gh_get_component_type_info` (for Grasshopper components) BEFORE emitting any `execute_rhinoscript_python_code`, `execute_rhinocommon_csharp_code`, or `gh_add_component`.

The model hallucinates plausible-but-wrong API names (Brep.Loft, rs.Revolve, Surface.Offset(solid=True)). Verify the exact name and signature against the live docs first. For RhinoCommon types not in the rhinoscript docs, confirm the signature against the cheat-sheets in reference/ below before emitting. Never guess an overload — read it.

Prefer typed MCP tools (loft, extrude_curve, sweep1, boolean_union, offset_curve, pipe) over raw execute_*. Fall back to execute_* only for ops with no typed tool: revolve, shell, network surface. The model over-loves writing Python — resist it (token-economy rule §11).


Codegen guard contract (summary)

Every geometry-producing snippet a skill emits MUST honor the contract defined in `../shared/conventions.md` §5. In short:

  1. #! python3 on line 1.
  2. # r: <pkg> comments ONLY for genuine third-party packages — never for

Rhino, rhinoscriptsyntax, scriptcontext, System.

  1. Read tol = sc.doc.ModelAbsoluteTolerance and

ang_tol = sc.doc.ModelAngleToleranceRadians live — never hardcode 0.001.

  1. Pre-flight the INPUTS before any Create* (correction C7) — see

reference/geometry-ops.md.

  1. Null/empty check after every Create*.
  2. IsValid + IsSolid + GetNakedEdges on every resulting Brep.
  3. Post-boolean: EXPECTED-COUNT + TOTAL-VOLUME vs the IR (correction C2) — a

partial boolean returns a valid Brep missing a part; only count+volume catches it.

  1. Name + SetUserString("part_id", ...) + layer assignment at bake

(correction C1 — the GUID ledger).

  1. AddBrep (etc.) returns the GUID; register it; one sc.doc.Views.Redraw()

at the very end; print only the GUID you need into context.

Lint or wrap any generated snippet with the runnable enforcer:

bash
python3 "${CLAUDE_SKILL_DIR}/scripts/codegen_guard.py" --lint /path/to/snippet.py
python3 "${CLAUDE_SKILL_DIR}/scripts/codegen_guard.py" --wrap /path/to/snippet.py

--lint prints a structured PASS/WARN/FAIL report (each contract rule it can check statically). --wrap emits the snippet bracketed by a guard preamble that reads tolerances live and a postamble that redraws once — both to stdout.


Reference files (one level deep)

cheat-sheets: pre-flight inputs (C7) + post-checks (C2/C3) + the real function name and the fix for each failure mode. loft, sweep1, revolve, extrude, boolean, fillet, offset, network surface.

idioms (Brep.CreateBooleanUnion, Brep.CreateFromLoft, RevSurface.Create

  • Brep conversion, Brep.CreateOffset, Curve.CreateInterpolatedCurve,

Transform.PlaneToPlane, ObjectAttributes/SetUserString, sc.doc.Objects.AddBrep), plus when to use rhinoscriptsyntax vs RhinoCommon vs CPython3.

NURBS / Brep / SubD / Mesh selection matrix (when reliable vs fragile) and the conversion functions between them.

ModelAbsoluteTolerance / ModelAngleToleranceRadians rules, setting the unit system before geometry, and sensible tolerances per unit.

Script

linter/wrapper that enforces the codegen contract. Run via ${CLAUDE_SKILL_DIR}; only its stdout enters context.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ben11304/rhino3d_ai2arch/rhino-geometry-api/badge)](https://verified-skill.com/skills/ben11304/rhino3d_ai2arch/rhino-geometry-api)

Something wrong with this skill or its page? Tell us.