grasshopper-workflow
Grasshopper 參數化建模工作流程工具。當需要通過 MCP 協議與 Grasshopper 交互、創建和管理組件、建立連接、設置參數、執行完整建模工作流程時使用。適用於:(1) 從 MMD 文件創建 Grasshopper 定義, (2) 執行 placement_info.json 工作流程, (3) 批量管理組件和連接, (4) 參數化建模的自動化流程, (5) 解析 component_info.mmd 和 part_info.mmd 文件
Best use case
grasshopper-workflow is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Grasshopper 參數化建模工作流程工具。當需要通過 MCP 協議與 Grasshopper 交互、創建和管理組件、建立連接、設置參數、執行完整建模工作流程時使用。適用於:(1) 從 MMD 文件創建 Grasshopper 定義, (2) 執行 placement_info.json 工作流程, (3) 批量管理組件和連接, (4) 參數化建模的自動化流程, (5) 解析 component_info.mmd 和 part_info.mmd 文件
Grasshopper 參數化建模工作流程工具。當需要通過 MCP 協議與 Grasshopper 交互、創建和管理組件、建立連接、設置參數、執行完整建模工作流程時使用。適用於:(1) 從 MMD 文件創建 Grasshopper 定義, (2) 執行 placement_info.json 工作流程, (3) 批量管理組件和連接, (4) 參數化建模的自動化流程, (5) 解析 component_info.mmd 和 part_info.mmd 文件
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "grasshopper-workflow" skill to help with this workflow task. Context: Grasshopper 參數化建模工作流程工具。當需要通過 MCP 協議與 Grasshopper 交互、創建和管理組件、建立連接、設置參數、執行完整建模工作流程時使用。適用於:(1) 從 MMD 文件創建 Grasshopper 定義, (2) 執行 placement_info.json 工作流程, (3) 批量管理組件和連接, (4) 參數化建模的自動化流程, (5) 解析 component_info.mmd 和 part_info.mmd 文件
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/grasshopper-workflow/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How grasshopper-workflow Compares
| Feature / Agent | grasshopper-workflow | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Grasshopper 參數化建模工作流程工具。當需要通過 MCP 協議與 Grasshopper 交互、創建和管理組件、建立連接、設置參數、執行完整建模工作流程時使用。適用於:(1) 從 MMD 文件創建 Grasshopper 定義, (2) 執行 placement_info.json 工作流程, (3) 批量管理組件和連接, (4) 參數化建模的自動化流程, (5) 解析 component_info.mmd 和 part_info.mmd 文件
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Grasshopper Workflow Skill
## 概述
此技能提供完整的 Grasshopper 參數化建模工作流程,包括組件管理、連接管理、參數設置、群組管理和工作流程執行。整合了從需求分析到最終執行的完整流程。
## 核心功能
### 1. 組件管理
- 創建、查詢、刪除組件
- 並行創建多個組件
- 組件 ID 映射管理
- 組件 GUID 查詢
### 2. 連接管理
- 建立組件之間的連接
- 並行連接多個組件
- 連接錯誤檢查和修正
- 文檔錯誤診斷
### 3. 參數設置
- 設置 Number Slider 屬性
- 設置 Vector XYZ 組件
- 批量參數設置
- 自動範圍確定
### 4. 群組管理
- 創建組件群組
- 批量創建群組
- 自定義群組顏色和名稱
### 5. 工作流程執行
- 解析 MMD 文件(component_info.mmd, part_info.mmd)
- 生成 placement_info.json
- 執行完整建模流程
- 自動化腳本執行
## 快速開始
### 基本使用
```python
from scripts.client import GrasshopperClient
from scripts.component_manager import ComponentManager
from scripts.connection_manager import ConnectionManager
from scripts.parameter_setter import ParameterSetter
from scripts.group_manager import GroupManager
# 創建客戶端
client = GrasshopperClient(host="localhost", port=8080)
# 創建組件管理器
comp_mgr = ComponentManager(client)
# 創建組件
component_id = comp_mgr.add_component(
guid="e2bb9b8d-0d80-44e7-aa2d-2e446f5c61da",
x=100,
y=200,
component_id="SLIDER_WIDTH"
)
```
### 完整工作流程
```python
from scripts.parser_utils import MMDParser, JSONGenerator
from scripts.placement_executor import PlacementExecutor
# 1. 解析 MMD 文件
parser = MMDParser()
components, connections = parser.parse_component_info_mmd("component_info.mmd")
# 2. 生成 placement_info.json
generator = JSONGenerator()
placement_info = generator.generate_placement_info(components, connections)
generator.save_placement_info(placement_info, "placement_info.json")
# 3. 執行
executor = PlacementExecutor()
result = executor.execute_placement_info("placement_info.json")
```
## 工作流程步驟
Grasshopper 建模工作流程包含 6 個主要步驟:
1. **釐清設計需求與規格** - 參見 [references/workflow_steps.md](references/workflow_steps.md#step-1-釐清設計需求與規格)
2. **拆分幾何物件創建 part_info.mmd** - 參見 [references/workflow_steps.md](references/workflow_steps.md#step-2-拆分幾何物件)
3. **規劃電池實際連接圖 component_info.mmd** - 參見 [references/workflow_steps.md](references/workflow_steps.md#step-3-規劃電池實際連接圖)
4. **找出所需組件 GUID 並規劃位置** - 參見 [references/workflow_steps.md](references/workflow_steps.md#step-4-找出id規劃位置)
5. **生成執行序列檔案 placement_info.json** - 參見 [references/workflow_steps.md](references/workflow_steps.md#step-5-生成執行序列檔案)
6. **清理 GH_WIP 檔案** - 參見 [references/workflow_steps.md](references/workflow_steps.md#step-6-清理gh_wip檔案)
## 詳細文檔
- **工作流程步驟**: 參見 [references/workflow_steps.md](references/workflow_steps.md) - 完整的 6 步驟工作流程指南
- **API 參考**: 參見 [references/api_reference.md](references/api_reference.md) - 所有模組和方法的詳細說明
- **CLI 使用說明**: 參見 [references/cli_usage.md](references/cli_usage.md) - 命令行工具使用指南
- **工具使用指南**: 參見 [references/tool_guide.md](references/tool_guide.md) - 所有工具的輸入輸出說明
## 腳本工具
所有 Python 腳本位於 `scripts/` 目錄:
- `client.py` - MCP 通信客戶端
- `component_manager.py` - 組件管理
- `connection_manager.py` - 連接管理
- `parameter_setter.py` - 參數設置
- `group_manager.py` - 群組管理
- `parser_utils.py` - MMD/JSON 解析
- `placement_executor.py` - 執行器
- `utils.py` - 工具函數
- `cli.py` - 命令行接口
## 使用腳本
當需要執行特定操作時,可以調用相應的腳本:
```python
# 執行 placement_info.json
from scripts.placement_executor import PlacementExecutor
executor = PlacementExecutor()
result = executor.execute_placement_info("placement_info.json", max_workers=10)
```
## 命令行工具
使用 CLI 工具執行常見任務:
```bash
# 執行 placement_info.json
python scripts/cli.py execute-placement placement_info.json
# 設置所有 slider
python scripts/cli.py set-sliders component_info.mmd
# 群組組件
python scripts/cli.py group-components component_info.mmd
```
詳細的 CLI 使用說明參見 [references/cli_usage.md](references/cli_usage.md)。
## 注意事項
1. **MCP 服務器**: 確保 Grasshopper MCP 服務器正在運行(localhost:8080)
2. **組件 ID 映射**: 組件創建後會自動保存 ID 映射到 `component_id_map.json`
3. **並行執行**: 支持並行執行以提高效率,建議使用 `max_workers=10` 到 `20`
4. **線程安全**: 所有操作都是線程安全的,可以在多線程環境中使用
5. **文件路徑**: 腳本中的相對路徑需要根據實際使用情況調整
## 常見工作流程
### 從 MMD 到完整定義
1. 解析 `component_info.mmd` 獲取組件和連接信息
2. 生成 `placement_info.json` 執行序列
3. 執行 `placement_info.json` 創建組件和連接
4. 設置所有 slider 參數值
5. 創建組件群組
詳細步驟參見 [references/workflow_steps.md](references/workflow_steps.md)。Related Skills
req-change-workflow
Standardize requirement/feature changes in an existing codebase (especially Chrome extensions) by turning "改需求/需求变更/调整交互/改功能/重构流程" into a repeatable loop: clarify acceptance criteria, confirm current behavior from code, assess impact/risk, design the new logic, implement with small diffs, run a fixed regression checklist, and update docs/decision log. Use when the user feels the change process is chaotic, when edits tend to sprawl across files, or when changes touch manifest/service worker/OAuth/storage/UI and need reliable verification + rollback planning.
defou-workflow
将原始想法转化为结构清晰、判断明确、具有长期价值的“得否”风格内容报告。
defou-stanley-workflow
Defou x Stanley 融合工作流:结合深度结构化思考与人性弱点洞察,生成极简、犀利且具有长期价值的爆款内容。
agentic-workflow
Practical AI agent workflows and productivity techniques. Provides optimized patterns for daily development tasks such as commands, shortcuts, Git integration, MCP usage, and session management.
workflow-patterns
Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.
workflow-orchestration-patterns
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
workflow-automation
Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off. This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation. Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility
tdd-workflows-tdd-refactor
Use when working with tdd workflows tdd refactor
tdd-workflows-tdd-red
Generate failing tests for the TDD red phase to define expected behavior and edge cases.
tdd-workflows-tdd-green
Implement the minimal code needed to make failing tests pass in the TDD green phase.
tdd-workflows-tdd-cycle
Use when working with tdd workflows tdd cycle
ml-pipeline-workflow
Build end-to-end MLOps pipelines from data preparation through model training, validation, and production deployment. Use when creating ML pipelines, implementing MLOps practices, or automating model training and deployment workflows.