By caidish
Control KLayout via natural language or AI agents for semiconductor chip and mask layout design. Automate geometry creation, microscope image overlay, GDS file management, and nanodevice fabrication workflows including flake detection, material segmentation, and contact routing.
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", "show only mesa", "turn off layer 3", or wants to isolate layers for inspection.
Run 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.
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.
Load 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.
Import 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.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Drive KLayout from any AI agent — chip & nanodevice layout over MCP.
KlayoutClaw plugs KLayout into the Model Context Protocol so Claude, Codex, Cline, or your own agent can create layouts, run pya scripts, autoroute pins, and drive full nanodevice fabrication pipelines — all in your existing KLayout GUI.
macOS only for now. Linux / Windows are on the roadmap.

git clone https://github.com/caidish/KlayoutClaw.git
cd KlayoutClaw
python install.py # copies plugin into ~/.klayout/pymacros
open /Applications/klayout.app # KLayout starts the MCP server on :8765
python tests/test_connection.py # verify
Point any MCP client at http://127.0.0.1:8765/mcp:
claude mcp add --transport http klayoutclaw http://127.0.0.1:8765/mcp
Then just ask:
"Create a Hall bar with a 100×25 µm graphene channel, 6 side probes, and bonding pads. Save as hallbar.gds."
| Layer | Purpose |
|---|---|
MCP Server (plugin/) | KLayout autorun macro. 19 JSON-RPC tools on 127.0.0.1:8765: layout I/O, execute_script, screenshot, autoroute, design evaluation, plus 9 vc_* version-control tools. Zero external deps. |
Skills (skills/) | Claude Code plugin with 9 skills — geometry, display, visual, image, GDS import, and 4 nanodevice pipelines (flakedetect, gdsalign, routing, e2e design). Loaded automatically. |
Qlaybot (agent/) | Standalone TypeScript agent (v0.4.4) built on Pi-Agent SDK. Ink/React TUI, 10 slash commands, planning sandbox, categorized memory with FTS5 + vector search, 3-phase context compaction, JSON-RPC mode. Auto-launches KLayout. |
Tools (tools/) | Subprocess helpers: GDS→PNG, ordered-loop routing engine (numpy/scikit-image/klayout), nanodevice DRC + metric evaluator (gdstk/shapely). |
Any MCP client KLayout GUI
(Claude / Codex / Qlaybot / …) + KlayoutClaw plugin
┌──────────────────┐ HTTP/JSON-RPC ┌──────────────────┐
│ │ ◄──────────────► │ pya.QTcpServer │
│ agent + skills │ :8765/mcp │ (Qt main thread)│
└──────────────────┘ └──────────────────┘
An autonomous run of the full vdW heterostructure pipeline — load a GDS template, overlay flake-detection results, generate a Hall bar, route every pin to bonding pads — from a single prompt.
https://github.com/user-attachments/assets/f51d5649-e69b-4885-b17f-f849277a05a6
Video not rendering? Uncompressed copy at docs/Demo.mp4.
cd agent
npm install && npm run build
export ANTHROPIC_API_KEY=...
npm start # interactive TUI
Qlaybot ships its own MCP client and auto-launches KLayout. First run creates ~/.qlaybot/. After npm link, the qlaybot command is available globally. See agent/README.md for the full CLI, RPC mode, subagents, and 697-test suite.
The MCP server itself uses only Python stdlib + KLayout's pya. Subprocess tools (auto_route, evaluate_design) and nanodevice skills need a scientific Python stack — we recommend a conda env named instrMCPdev:
conda create -n instrMCPdev python=3.11 -y && conda activate instrMCPdev
pip install numpy scipy scikit-image scikit-learn opencv-python-headless \
gdstk shapely matplotlib klayout==0.30.3
Pass python_path= to override the env per-call.
docs/tools.md — MCP tool reference (all 19)docs/skills.md — skill catalogdocs/ui-plugin.md — UI panel + status bardocs/plans/ — architecture design notesCONTRIBUTING.md — how to helpThe auto-routing engine borrows algorithmic techniques from Klayout-Router by Legendrexial (MIT).
MIT — see LICENSE. Questions or collaboration: [email protected].
Skills for scientific instrument control, data analysis, and paper review
Collection of useful prompted subagents for code review, API docs, QA, and more
macOS integration - speak, send iMessages, emails, manage calendar, and display stickies
Pushover notification hooks - get notified when tasks complete or permissions are needed. Requires: python3 and psutil. Install: pip install psutil. Verify: python3 -c 'import psutil; print(psutil.__version__)'
Skills for interacting with other AI tools - Codex, Gemini CLI, and collaboration fixes
npx claudepluginhub caidish/klayoutclaw --plugin klayoutclawRTL-to-GDS skill: drives an open-source EDA flow (Yosys + OpenROAD-flow-scripts + KLayout + Magic + Netgen + OpenRCX) from a natural-language spec or RTL to GDSII with DRC, LVS, and RCX signoff.
AI-powered hardware development platform — design, verify, synthesize, and deploy working RTL with natural language. 18 agents, 25 skills, 8 IP blocks.
Agentic KiCad PCB design workflow using SKiDL — architect, source, code, and verify circuits with AI agents.
97-agent RTL design pipeline with 97 skills for 6-Phase hardware design automation (Research → Architecture → μArch → RTL → Verify → Design Note)
KiCad electronics design skills. Analyze schematics, review PCB layouts, download datasheets, source components, and prep boards for fabrication.
Generate JLCPCB-ready KiCad PCB projects from descriptions, BOMs, or existing projects. Sources LCSC parts (basic-tier preferred), generates schematics, and packages routed boards into Gerber/drill/CPL/BOM zips ready to upload to JLCPCB.