grasshopper-component

grasshopper-component is a skill for Claude Code from bcshih/rhino-dev-skills. It costs 128 tokens per session (2,508 once invoked), scanned A, original, MIT.

A guide to building custom components for Grasshopper, a visual programming tool used with the Rhino 3D design application. It explains how to write these components in C# and package them as .gha files.

In plain words
What is it for?
Use it to create or debug Grasshopper components that process geometry, points, numbers, and structured collections of data.
Why use it?
It gives developers the structure needed for inputs, outputs, data trees, errors, and packaging, reducing guesswork when a component does not work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rhino-dev-skills plugin — 5 skills shipped together

Good fit Use it to create or debug Grasshopper components that process geometry, points, numbers, and structured collections of data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bcshih/rhino-dev-skills/grasshopper-component
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bcshih/rhino-dev-skills --skill grasshopper-component
Clone the repo
git clone --depth 1 https://github.com/bcshih/rhino-dev-skills

Made for: Claude Code.

Or install rhino-dev-skills, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grasshopper-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/bcshih/rhino-dev-skills/grasshopper-component/github.svg)](https://agentmods.dev/skills/bcshih/rhino-dev-skills/grasshopper-component)
Your own site
<a href="https://agentmods.dev/skills/bcshih/rhino-dev-skills/grasshopper-component"><img src="https://agentmods.dev/badge/skills/bcshih/rhino-dev-skills/grasshopper-component/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for grasshopper-component

Your own site · 80×15
<a href="https://agentmods.dev/skills/bcshih/rhino-dev-skills/grasshopper-component"><img src="https://agentmods.dev/badge/skills/bcshih/rhino-dev-skills/grasshopper-component.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,508 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00128 $0.02508
Opus 5 $0.00064 $0.01254
Sonnet 5 $0.00026 $0.00502
Haiku 4.5 $0.00013 $0.00251

Measured 8d ago against content hash 93b148adfdd5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

grasshopper-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/grasshopper-component/SKILL.md · 307 lines

How it starts

The opening of the file, as written. The whole thing — 307 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Grasshopper Component Development

Component Class Template

using System;
using System.Collections.Generic;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Types;
using Rhino.Geometry;

namespace MyGHPlugin
{
    public class MyComponent : GH_Component
    {
        // Constructor: (name, nickname, description, category, subcategory)
        public MyComponent()
            : base("My Component", "MyCmp",
                   "Description of what this component does",
                   "MyPlugin", "Operations")
        { }

        // Unique GUID — generate once and never change
        public override Guid ComponentGuid => new Guid("PUT-YOUR-GUID-HERE");

        // Optional: 24x24 icon
        protected override System.Drawing.Bitmap Icon => null;

        // Optional: component exposure in the ribbon
        public override GH_Exposure Exposure => GH_Exposure.primary;

        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            // Add inputs (index order matters — matches DA.GetData calls)
            pManager.AddPointParameter("Point", "P", "Input point", GH_ParamAccess.item);
            pManager.AddNumberParameter("Distance", "D", "Distance value", GH_ParamAccess.item, 1.0); // default value
            pManager.AddCurveParameter("Curves", "C", "Input curves", GH_ParamAccess.list);
            pManager.AddBrepParameter("Brep", "B", "Input brep", GH_ParamAccess.item);
            pManager.AddGenericParameter("Any", "A", "Any type", GH_ParamAccess.item);
            
            // Make a parameter optional
            pManager[1].Optional = true;
        }

        protected override void RegisterOutputParams(GH_OutputParamManager pManager)
        {
            pManager.AddPointParameter("Result", "R", "Output point", GH_ParamAccess.item);
            pManager.AddCurveParameter("Curves", "C", "Output curves", GH_ParamAccess.list);
            pManager.AddNumberParameter("Values", "V", "Computed values", GH_ParamAccess.tree);
        }

        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // 1. Collect inputs
            Point3d point = Point3d.Unset;
            if (!DA.GetData(0, ref point)) return; // required — abort if missing
            
            double distance = 1.0;
            DA.GetData(1, ref distance); // optional — don't abort on failure

            List<Curve> curves = new List<Curve>();
            if (!DA.GetDataList(2, curves)) return;

            Brep brep = null;
            DA.GetData(3, ref brep);

            // 2. Validate
            if (point == Point3d.Unset)
            {
                AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Invalid point.");
                return;
            }
            if (distance <= 0)
            {
                AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "Distance should be positive.");
                distance = Math.Abs(distance);
            }

            // 3. Compute
            Point3d result = point + new Vector3d(distance, 0, 0);

            // 4. Set outputs
            DA.SetData(0, result);
            DA.SetDataList(1, curves);
            // DA.SetDataTree(2, someTree); -- see DataTree section
        }
    }
}

Read the full file on GitHub · 307 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 307 lines · 128 tokens per session scan A 93b148adfdd5

Subscribe to this mod's changes

grasshopper-component is a skill published in the GitHub repository bcshih/rhino-dev-skills (1 stars, last pushed 2mo ago), licensed MIT. It adds 128 tokens to every session and 2,508 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

opengis-skills

Use when AI coding assistant needs GIS/CAD/C#/AI/IoT/3D domain expertise for 73+ open-source projects. One-stop skill index with tag-based search and on-demand loading for GDAL, GeoServer, QGIS, PostGIS, JTS, CesiumJS, FreeCAD, OpenSCAD, OCCT, NPOI, SqlSugar, Furion, Dify, SuperSplat, Go and more.

znlgis/opengis-skills · 97 tokens

rider-search

Routing rules for code search in JetBrains Rider projects — use the Rider MCP symbol/reference/file tools instead of Bash grep. Use whenever searching for a symbol, definition, function, variable, type, or finding usages/references in a C#/.NET or Unreal C++ codebase open in Rider.

JSungMin/rider-mcp-enforcer · 60 tokens

dotnet-review

Use when the user asks to review C#/.NET code, check a PR/diff, look for naming or styling issues, assess performance or concurrency, find dead code/duplication, review XML documentation, check test coverage, or do a security review. ALSO use it for a convention or consistency audit across existing code — "are all our…

Attemainio/dotnet-toolkit · 221 tokens

dotnet-explore

Use before changing C#/.NET code when the set of symbols the task touches is not already known — surveying an unfamiliar subsystem, assessing how a new feature lands in the existing codebase, or finding out what a change would break. Delegates the wide searchindex/getreferences sweep to the plugin's dotnet-explore…

Attemainio/dotnet-toolkit · 104 tokens

autocad-dotnet

Comprehensive AutoCAD .NET API reference for plugin development. Use when writing AutoCAD .NET plugins, working with ObjectARX managed wrappers, creating commands, manipulating entities, or needing exact API signatures. Covers AutoCAD 2025 and 2026 (both net8.0) with patterns, gotchas, and full API index. TRIGGER…

joseguiaCES/autocad-dotnet-claude-skill · 115 tokens

dotnet-analyzer-code-intelligence

Navigate and understand C# code through symbol queries, type hierarchies, call graphs, and semantic analysis using Roslyn-powered MCP tools. Use when the user asks to find references, go to definition, understand type inheritance, explore call hierarchies, get symbol info, analyze code metrics, or traverse syntax…

CartapenaBark/DotNetAnalyzer · 226 tokens