From klayoutclaw
Adds rectangles, polygons, paths, cells, and instances to KLayout layouts via Python CLI scripts and MCP execute_script tool. Use for drawing shapes or chip geometry.
npx claudepluginhub caidish/klayoutclaw --plugin klayoutclawThis skill uses the workspace's default tool permissions.
CLI scripts for creating geometry in KLayout via the MCP server's `execute_script` tool.
Toggles KLayout layer visibility on/off or shows only specific layers (e.g., metal, mesa) for visualization during design review. Includes toggle_layer.py and show_only.py scripts.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Share bugs, ideas, or general feedback.
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)))
""")