From klayoutclaw
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.
npx claudepluginhub caidish/klayoutclaw --plugin klayoutclawThis skill uses the workspace's default tool permissions.
Toggle layer visibility in KLayout via the MCP server for better visualization during design review.
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.
Renders GateFlow codebase maps as interactive terminal ASCII/Unicode diagrams: module hierarchies, FSM states, detail cards, and overview dashboard with stats/health. Use after /gf-map.
Captures structural snapshots of node trees in Pencil .pen files via snapshot_layout MCP tool, optionally filtering to layout problems like clipping or overlaps. For analyzing page hierarchy and preparing adjustments.
Share bugs, ideas, or general feedback.
Toggle layer visibility in KLayout via the MCP server for better visualization during design review.
python scripts/toggle_layer.py <layer> <datatype> [on|off]
on — make layer visibleoff — make layer invisibleExamples:
python scripts/toggle_layer.py 1 0 off # hide mesa layer
python scripts/toggle_layer.py 2 0 on # show metal layer
python scripts/toggle_layer.py 3 0 # toggle bonding pads
python scripts/show_only.py <layer1/dt1> [<layer2/dt2> ...]
Example:
python scripts/show_only.py 1/0 2/0 # show only mesa + metal, hide pads
The scripts use execute_script to manipulate pya.LayerProperties in the current LayoutView. Each layer properties entry has a visible attribute that controls display.
For custom display manipulation beyond these scripts, use execute_script directly:
tool_call("execute_script", code="""
lp_iter = _layout_view.begin_layers()
while not lp_iter.at_end():
lp = lp_iter.current()
lp.visible = (lp.source_layer == 1) # show only layer 1
_layout_view.set_layer_properties(lp_iter, lp)
lp_iter.next()
""")