From grasshopper
Convert GHX files to LLM-readable format and generate RAG summaries. Use when users mention GHX, Grasshopper definition, .ghx files, convert for LLM, document Grasshopper, or RAG context for parametric workflows.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grasshopper:ghx-to-llmThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert Grasshopper `.ghx` files into two complementary outputs for LLM understanding and RAG retrieval.
Convert Grasshopper .ghx files into two complementary outputs for LLM understanding and RAG retrieval.
.ghx file{name}_Definition.md{name}_Summary.md/ghx-to-llm [path]| Script | Purpose | Usage |
|---|---|---|
scripts/ghx_to_llm.py | Convert .ghx to LLM-readable markdown | python scripts/ghx_to_llm.py input.ghx [-o output.md] |
Script options:
input - Path to .ghx file (required)-o, --output - Custom output path (default: {input}_Definition.md)--stdout - Print to console instead of file| Input | Output 1 (Phase 1) | Output 2 (Phase 2) |
|---|---|---|
Task_01.ghx | Task_01_Definition.md | Task_01_Summary.md |
# Phase 1: Convert (from skill folder)
python .claude/skills/ghx-to-llm/scripts/ghx_to_llm.py "path/to/Definition.ghx"
# Output: path/to/Definition_Definition.md
# Phase 2: Summarize (LLM reads conversion, writes summary)
# Read the _Definition.md file
# Create: path/to/Definition_Summary.md
.ghx (XML-based), not binary .ghGH_IO.dll). Without these, clusters still appear as labeled components with I/O, but the ## CLUSTERS section showing internal components is skippedHave a .ghx file to document?
├── Want raw component data? → Phase 1 only (run script)
└── Want semantic summary? → Full workflow (both phases)
Have a .gh (binary) file?
└── Save as .ghx in Grasshopper first (File → Save As)
The converter produces structured markdown with:
## GROUP sections5.1 = component 5, output 1)Cluster"Name"[I/O] with descriptions## CLUSTERS section showing internal components of each cluster (requires .NET + Rhino 8)After reading the _Definition.md file, create a semantic summary:
# {Filename} - Grasshopper Definition Summary
## Purpose
[What this definition calculates or produces - 1-2 sentences]
## Required Setup
- **Rhino Layers:** [List layers with expected geometry types]
- **Plugins:** [List required Grasshopper plugins]
## Workflow Logic
[Plain language description of how data flows through the definition]
1. **[Stage Name]**: [What happens and why]
2. **[Stage Name]**: [What happens and why]
...
## Key Parameters
| Parameter | Default | Effect |
|-----------|---------|--------|
| [Name] | [Value] | [What changing it does] |
## Key Calculations
[Any important formulas or operations, explained in context]
## Output
[What the definition produces and how to interpret results]
When creating the Phase 2 summary:
| Symptom | Cause | Solution |
|---|---|---|
| "File not found" | Wrong path | Use absolute path or verify relative path |
| Empty output | No components in file | Verify .ghx has content in Grasshopper |
| Missing connections | Unnamed groups | Add descriptive group names in Grasshopper |
| XML parse error | Corrupted or binary file | Re-save as .ghx from Grasshopper |
| Plugin components show as unknown | Third-party plugins | Component type name still captured; note plugin in summary |
| Encoding errors on Windows | Console encoding | Script handles this automatically |
This skill should NOT:
.ghx fileGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub bauhaus-infau/infau-skill-base --plugin grasshopper