/klayoutclaw:geometryfrom klayoutclaw
Creates rectangles, polygons, paths, cells, and instances in KLayout via MCP scripts for automating chip/mask layout design tasks.
Ships in klayoutclaw. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
CLI scripts for creating geometry in KLayout via the MCP server's execute_script tool.
Each script connects to KLayout at 127.0.0.1:8765 and runs pya code to create shapes.
create_layout tool first)All scripts live in scripts/ relative to this skill. Coordinates are in microns.
python scripts/add_rect.py <cell> <layer> <datatype> <x1> <y1> <x2> <y2>
Example: python scripts/add_rect.py TOP 1 0 -50 -12.5 50 12.5
python scripts/add_polygon.py <cell> <layer> <datatype> <x1,y1> <x2,y2> ...
Example: python scripts/add_polygon.py TOP 1 0 0,0 10,0 10,10 0,10
python scripts/add_path.py <cell> <layer> <datatype> <width> <x1,y1> <x2,y2> ...
Example: python scripts/add_path.py TOP 1 0 5 0,0 50,0 50,50
python scripts/create_cell.py <cell_name>
Example: python scripts/create_cell.py CONTACT_PAD
python scripts/add_instance.py <parent> <child> [x] [y]
Example: python scripts/add_instance.py TOP CONTACT_PAD 100 200
For simple shapes, call scripts directly. For complex designs with many shapes, prefer calling execute_script via MCP with a single Python block — this avoids per-shape HTTP round trips and is much faster.
# Example: batch geometry via execute_script
tool_call("execute_script", code="""
dbu = _layout.dbu
li = _layout.layer(1, 0)
for x in range(0, 100, 10):
_top_cell.shapes(li).insert(pya.Box(int(x/dbu), 0, int((x+5)/dbu), int(5/dbu)))
""")
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub caidish/klayoutclaw --plugin klayoutclaw18 skills in this plugin
/autocadEdit and export layout geometry in the optional AutoCAD for Mac backend when the user selects AutoCAD or requests native DWG editing through its MCP server./displayklayoutclaw:displayToggle KLayout layer visibility on and off for better visualization. Use this skill when the user wants to show/hide layers, toggle layer display, change layer visibility, or focus on specific layers in KLayout. Also trigger when the user says things like "hide the metal layer", "show only mesa", "turn off layer 3", or wants to isolate layers for inspection./e2e-judgeklayoutclaw:e2e-judgeRun agentic E2E tests for KlayoutClaw. Gives Claude Code natural-language tasks, lets it autonomously choose MCP tools, independently verifies layout state via direct MCP calls, and judges outcomes with gpt-5-mini. Use when the user wants to run agentic tests, validate KlayoutClaw, or benchmark agent performance./imageklayoutclaw:imageLoad a reference image (microscope photo, optical image, SEM) into KLayout as a background overlay for design alignment. Use this skill whenever the user wants to load an image, add a background image, overlay a microscope photo, import a reference picture, align to a photo, or trace over an image. Also trigger when the user says "load this image", "use this photo as reference", "overlay the microscope image", or needs to position/scale/remove background images./klayout_gds_importImport a GDS file into the current KLayout layout, flatten hierarchy, and merge into a single top cell. Use this instead of raw Layout.read() which leaves orphaned cell indices and multi-top-cell states./nanodevice_e2e_designOrchestrate end-to-end nanodevice design from user query through optional flake detection, material analysis, device geometry creation, routing, evaluation, and save. Device-agnostic methodology -- the agent derives physics rules from device type and available materials.Other plugins' skills for the same job