klayoutclaw:geometry
/klayoutclaw:geometry
Create geometry in KLayout via MCP — rectangles, polygons, paths, cells, and cell instances. Use this skill whenever the user wants to draw, add, or create shapes/geometry/structures in KLayout, even if they don't say "geometry" explicitly. Trigger on phrases like "draw a rectangle", "add a polygon", "create a cell", "place an instance", "make a shape", or any layout/chip/mask design geometry task.
- Author
- caidish ↗
- Repository
- klayoutclaw ↗
- Licence
- MIT
- Last repository change
- 02.08.2026
Assessment and security
- Files in this package
- 6
- Scripts
- 5
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 02.08.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 5 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/add_instance.py, scripts/add_path.py, scripts/add_polygon.py, scripts/add_rect.py, scripts/create_cell.py
What it does and when to use it
Create geometry in KLayout via MCP — rectangles, polygons, paths, cells, and cell instances. Use this skill whenever the user wants to draw, add, or create shapes/geometry/structures in KLayout, even if they don't say "geometry" explicitly. Trigger on phrases like "draw a rectangle", "add a polygon", "create a cell", "place an instance", "make a shape", or any layout/chip/mask design geometry task.
Triggers from the description
Original author description
Create geometry in KLayout via MCP — rectangles, polygons, paths, cells, and cell instances. Use this skill whenever the user wants to draw, add, or create shapes/geometry/structures in KLayout, even if they don't say "geometry" explicitly. Trigger on phrases like "draw a rectangle", "add a polygon", "create a cell", "place an instance", "make a shape", or any layout/chip/mask design geometry task.
How it works
- Prerequisites
- Scripts
- Workflow
SKILL.md preview
---
name: klayoutclaw:geometry
description: Create geometry in KLayout via MCP — rectangles, polygons, paths, cells, and cell instances. Use this skill whenever the user wants to draw, add, or create shapes/geometry/structures in KLayout, even if they don't say "geometry" explicitly. Trigger on phrases like "draw a rectangle", "add a polygon", "create a cell", "place an instance", "make a shape", or any layout/chip/mask design geometry task.
---
# KLayout Geometry Skills
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.
## Prerequisites
- KLayout running with KlayoutClaw plugin (v0.3+)
- A layout must be open (use `create_layout` tool first)
## Scripts
All scripts live in `scripts/` relative to this skill. Coordinates are in **microns**.
### add_rect.py — Add a rectangle
```bash
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`
### add_polygon.py — Add a polygon
```bash
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`
### add_path.py — Add a path with width
```bash
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`
### create_cell.py — Create a new cell
```bash
python scripts/create_cell.py <cell_name>
```
Example: `python scripts/create_cell.py CONTACT_PAD`
### add_instance.py — Place a cell instance
```bash
python scripts/add_instance.py <parent> <child> [x] [y]
```
Example: `python scripts/add_instance.py TOP CONTACT_PAD 100 200`
## Workflow
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.
```python
# 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)))
""")
```
Files in this package (6)
- SKILL.md 2 KB
- scripts/add_instance.py 1 KB
- scripts/add_path.py 1 KB
- scripts/add_polygon.py 1 KB
- scripts/add_rect.py 1 KB
- scripts/create_cell.py 1 KB
Versions
The database has no other skills named klayoutclaw:geometry.
Database snapshot: 13.11.2026 · package version b1d55ead4d7a (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90klayoutclaw:visual
Capture the current KLayout layout as a PNG image for visual inspection. Use this skill whenever the user wants to see, view, screenshot, preview, or visually inspect the current layout. Also trigger when the user asks "what does it look like", "show me the layout", "take a… - 90klayoutclaw:display
Toggle 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",… - 100close-layout-incrementally
Close analog, mixed-signal, custom-digital, or top-level IC layout through small visually reviewed increments with fresh DRC, LVS, extraction, and performance evidence. Use when editing or debugging GDS, OASIS, Magic, KLayout, or custom-cell layout; placing matched or… - 100geometry-and-math
Use this skill when using Phaser 4 math and geometry utilities. Covers vectors, rectangles, circles, triangles, polygons, random number generation, angles, distance, interpolation, and snapping. Triggers on: Vector2, Rectangle, Circle, math, distance, angle, random, lerp. - 100graphics-and-shapes
Use this skill when drawing shapes and graphics in Phaser 4. Covers the Graphics game object, lines, rectangles, circles, arcs, polygons, gradients, fill, stroke, and generated textures. Triggers on: Graphics, draw shape, fillRect, lineStyle, polygon, arc. - 100drc-fix
Diagnose and fix Design Rule Check (DRC) violations in a layout or GDS. Use when the user says "fix DRC", "DRC clean", "resolve spacing errors", "my layout fails DRC", or shares a DRC report from Calibre, Klayout, or Magic.