agentsclimarketplace

Ghx to llm

Skill Bauhaus-InfAU/infau-skill-base/grasshopper/skills/ghx-to-llm

Install
npx -y skills add Bauhaus-InfAU/infau-skill-base --skill ghx-to-llm

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

5.0 KB, as published. Nobody here has run it

GHX to LLM Converter

Convert Grasshopper .ghx files into two complementary outputs for LLM understanding and RAG retrieval.

How to Use This Skill

  1. User provides path to .ghx file
  2. Run Python converter script → creates {name}_Definition.md
  3. Analyze conversion output → create {name}_Summary.md
  4. Both files saved to same folder as input

When to Use This Skill

  • User invokes /ghx-to-llm [path]
  • User asks to convert/document a Grasshopper file
  • Creating RAG context for GH definitions
  • Preparing GH workflows for LLM analysis

CLI Scripts

ScriptPurposeUsage
scripts/ghx_to_llm.pyConvert .ghx to LLM-readable markdownpython 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

Output Files

InputOutput 1 (Phase 1)Output 2 (Phase 2)
Task_01.ghxTask_01_Definition.mdTask_01_Summary.md

Example Workflow

# 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

Critical Requirements

  • Input format: Must be .ghx (XML-based), not binary .gh
  • Python: 3.8+ with standard library only (no external dependencies)
  • Better output: Groups in Grasshopper improve output structure significantly
  • Cluster internals (optional): Requires .NET 8+ SDK and Rhino 8 installed (for GH_IO.dll). Without these, clusters still appear as labeled components with I/O, but the ## CLUSTERS section showing internal components is skipped

Quick Decision Tree

Have 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)

Phase 1: Conversion Output Format

The converter produces structured markdown with:

  • Component groups as ## GROUP sections
  • Wire connections between components
  • Parameter values (sliders, toggles, panels)
  • Data flow references (e.g., 5.1 = component 5, output 1)
  • Modifiers: F=Flatten, G=Graft, S=Simplify, R=Reverse
  • Clusters labeled as Cluster"Name"[I/O] with descriptions
  • ## CLUSTERS section showing internal components of each cluster (requires .NET + Rhino 8)

Phase 2: Summary Structure Template

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]

Analysis Guidelines

When creating the Phase 2 summary:

  1. Extract Purpose - Look at output groups and final calculations
  2. Trace Data Flow - Follow group sequence and connections
  3. Identify Parameters - Find all Number Sliders, Boolean Toggles, editable Panels
  4. Explain Calculations - Translate mathematical component chains into formulas
  5. Note Dependencies - Identify required Rhino geometry and GH plugins

Troubleshooting

SymptomCauseSolution
"File not found"Wrong pathUse absolute path or verify relative path
Empty outputNo components in fileVerify .ghx has content in Grasshopper
Missing connectionsUnnamed groupsAdd descriptive group names in Grasshopper
XML parse errorCorrupted or binary fileRe-save as .ghx from Grasshopper
Plugin components show as unknownThird-party pluginsComponent type name still captured; note plugin in summary
Encoding errors on WindowsConsole encodingScript handles this automatically

Boundaries

This skill should NOT:

  • Modify the original .ghx file
  • Generate Grasshopper component code
  • Skip either output phase (both files are required for complete documentation)
  • Include excessive technical detail in the summary (focus on intent and usage)

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.