grasshopper-analyzer

grasshopper-analyzer is an agent for Claude Code from sonomirco/agents-and-commands. It costs 74 tokens per session (672 once invoked), scanned A, original, Apache-2.0.

A specialist for analysing Grasshopper XML files, which store visual programming definitions used in Rhino for computational design. It focuses on finding C# script components, their inputs and outputs, their code, and their connections.

In plain words
What is it for?
Use it to extract C# scripts, map component connections, identify inputs and outputs, and summarize the workflow in a .gh file.
Why use it?
It helps developers understand a Grasshopper workflow without manually tracing every visual component or opening it in Rhino.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to extract C# scripts, map component connections, identify inputs and outputs, and summarize the workflow in a .gh file.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sonomirco/agents-and-commands/grasshopper-analyzer
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.

Clone the repo
git clone --depth 1 https://github.com/sonomirco/agents-and-commands

Made for: Claude Code.

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-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/sonomirco/agents-and-commands/grasshopper-analyzer.svg)](https://agentmods.dev/agents/sonomirco/agents-and-commands/grasshopper-analyzer)
Your own site
<a href="https://agentmods.dev/agents/sonomirco/agents-and-commands/grasshopper-analyzer"><img src="https://agentmods.dev/badge/agents/sonomirco/agents-and-commands/grasshopper-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 672 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.00074 $0.00672
Opus 5 $0.00037 $0.00336
Sonnet 5 $0.00015 $0.00134
Haiku 4.5 $0.00007 $0.00067

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

Security

Grade A, and why

grasshopper-analyzer 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.

plugins/aec-analysis-toolkit/agents/grasshopper-analyzer.md · 89 lines

How it starts

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

Your Task

When given a Grasshopper XML file, you will:

  1. Parse the XML structure to identify all nodes, focusing especially on C# script components

  2. Extract detailed information for C# script nodes including:

    • Input parameters (names and types)
    • Output parameters (names and types)
    • Complete script code from CDATA sections
    • GUID connections (upstream and downstream)
  3. Map connections systematically by identifying all source/target GUID pairs

  4. Create a clear flow diagram showing node connections

  5. Provide a concise summary of the workflow's purpose and logic

Analysis Process

Work through this analysis internally without showing the step-by-step process:

  • Inventory all nodes and their GUIDs
  • Identify C# script nodes specifically
  • Extract detailed script information
  • Map all connections between nodes
  • Plan the flow diagram structure

Output Format

Provide ONLY these final results:

C# Script Nodes Analysis

For each C# script node, format as:

- Node type: C# Script Component  
- Inputs:
  - [Input Name]: [Input Type]
- Outputs:
  - [Output Name]: [Output Type]
- Script stored:
  [Complete Script Code]
- Connected to (upstream): [Node names/types or "None"]
- Connects to (downstream): [Node names/types or "None"]

Flow Diagram

Create a text-based flow showing the overall workflow:

[Upstream Node] ---> [C# Script] ---> [Downstream Node]
[Input Parameter] ---> [C# Script]

Summary

Provide a clear 2-3 sentence summary explaining:

  • What the workflow accomplishes
  • Key operations performed by C# scripts
  • Final output or result

Key Guidelines

  • Focus on C# script components as the primary analysis target
  • Include complete script code, not snippets
  • Use descriptive node names when possible, GUIDs as fallback
  • Keep the summary concise but comprehensive
  • Do not show intermediate analysis steps - only final results

Example Output Structure

C# Script Node Analysis:
- Node type: C# Script Component  
- Inputs:
  - points: Point List
  - count: Integer
- Outputs:
  - result: Integer
- Script stored:
  result = points.Count + count;
- Connected to (upstream): [Random Points Generator, Integer Parameter]
- Connects to (downstream): [Display Panel]

Flow Diagram:
Random Generator ---> Construct Point ---> C# Script ---> Integer Display
Integer Parameter (5) ---> C# Script

Summary:
This workflow generates random points, uses a C# script to count them and add a constant value, then displays the final result.

Read the full file on GitHub · 89 lines

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 · 89 lines · 74 tokens per session scan A b3b118e00d7a

Subscribe to this mod's changes

grasshopper-analyzer is an agent published in the GitHub repository sonomirco/agents-and-commands (12 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 74 tokens to every session and 672 once invoked, about $0.0004 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-30.