skills/amemiyalai/grasshopper-workflow/SKILL.md
Grasshopper 參數化建模工作流程工具。當需要通過 MCP 協議與 Grasshopper 交互、創建和管理組件、建立連接、設置參數、執行完整建模工作流程時使用。適用於:(1) 從 MMD 文件創建 Grasshopper 定義, (2) 執行 placement_info.json 工作流程, (3) 批量管理組件和連接, (4) 參數化建模的自動化流程, (5) 解析 component_info.mmd 和 part_info.mmd 文件
npx skillsauth add aiskillstore/marketplace grasshopper-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
此技能提供完整的 Grasshopper 參數化建模工作流程,包括組件管理、連接管理、參數設置、群組管理和工作流程執行。整合了從需求分析到最終執行的完整流程。
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"
)
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 個主要步驟:
所有 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 - 命令行接口當需要執行特定操作時,可以調用相應的腳本:
# 執行 placement_info.json
from scripts.placement_executor import PlacementExecutor
executor = PlacementExecutor()
result = executor.execute_placement_info("placement_info.json", max_workers=10)
使用 CLI 工具執行常見任務:
# 執行 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。
component_id_map.jsonmax_workers=10 到 20component_info.mmd 獲取組件和連接信息placement_info.json 執行序列placement_info.json 創建組件和連接詳細步驟參見 references/workflow_steps.md。
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.