circuit-design
Skill2 starsChanged 2 months agoMITView on GitHub
Design electrical circuits programmatically — SKiDL netlist generation, custom SVG schematic renderer with 45° routing and IEEE 315 compliance, and raw KiCad S-expression authoring for full control. Covers the full pipeline from text-based circuit description to rendered SVG or KiCad netlist.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ProductOfAmerica/mcp-server-kicadtheir own version, first seen Oct 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ProductOfAmerica/mcp-server-kicad★ 15same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository58 other files it gives its agents.
- ad-hoc-script-verificationSkill
- architecture-diagramSkill
- blocked-page-recoverySkill
- cadquery-enclosure-designSkill
- canonical-thumbnailSkill
- competitor-news-monitorSkill
- component-alternativesSkill
- debugging-hermes-tui-commandsSkill
- docker-container-update-checkSkill
- document-to-action-itemsSkill
- docxSkill
- email-inbox-triageSkill
- embedded-porting-patternsSkill
- ephemeral-file-sharingSkill
- excalidrawSkill
- flash-game-researchSkill
- flutter-android-buildSkill
- flutter-content-renderingSkill
- github-code-reviewSkill
- githubSkill
- goatcounter-analyticsSkill
- google-oauth-file-pollSkill
- grounded-citationsSkill
- hermes-agent-skill-authoringSkill
- hermes-gateway-slash-commandSkill
- hermes-gateway-supervisionSkill
- jellyseerr-watch-suggestionsSkill
- maintained-fork-publishingSkill
- meeting-action-itemsSkill
- native-mcpSkill
- obsidian-mapsSkill
- pdf-flattenSkill
- pdfSkill
- pdf-surgical-editsSkill
- planSkill
- product-price-monitorSkill
- psp-developmentSkill
- psp-homebrew-testingSkill
- psp-prx-plugin-maintenanceSkill
- python-debugpySkill
- python-webapp-patternsSkill
- reddit-readingSkill
- retro-fansiteSkill
- reverse-proxy-websocket-debuggingSkill
- rss-feedsSkill
- simplify-codeSkill
- sketchSkill
- skit-thumbnailSkill
- spikeSkill
- subagent-driven-developmentSkill
- test-driven-developmentSkill
- usb-device-enumerationSkill
- weekly-review-planningSkill
- wiki-media-asset-pipelineSkill
- windows-c-build-toolchainSkill
- windows-crash-forensicsSkill
- writing-plansSkill
- yt-dlp-anti-botSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 123
Place them on distinct grid coordinates.
- Distinctive: line 165
UUIDs: Every symbol and symbol instance needs a unique UUID.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Circuit Design (Programmatic)
Three approaches for generating electrical circuit schematics from code, depending on what you need:
| Method | Output | Best For |
| A: SKiDL Pipeline | KiCad netlist (.kicad_sch) | Full KiCad integration, ERC, BOM |
| B: SVG Renderer | SVG image (.svg) | Quick visualization, documentation, shareable diagrams |
| C: Raw S-Expression | KiCad .kicad_sch | Full control, custom symbols, no library dependency |
Method A: SKiDL Pipeline
SKiDL lets you describe circuits in Python and output KiCad netlists/schematics.
Workflow
from skidl import Net, Part
# Create parts
r = Part('Device', 'R', value='10k', footprint='Resistor_SMD:R_0603_1608Metric')
led = Part('Device', 'LED', value='RED')
gnd = Net('GND')
vcc = Net('VCC')
# Connect
r[1] += vcc
r[2] += led['A']
led['K'] += gnd
# Generate
ERC()
generate_netlist()Key commands
# Generate KiCad schematic
python3 -c "from skidl import generate_schematic; generate_schematic()"
# ERC check
python3 -c "from skidl import ERC; ERC()"Pitfalls
- Pin names vs numbers: SKiDL accepts both. Use
Part['VCC']orPart[1]. - Footprint assignment: Some
Deviceparts lack default footprints — set explicitly for BOM generation. - ERC warnings: Unconnected pins on multi-unit packages (op-amps with unused channels) generate warnings unless you explicitly connect them to NC.
- KiCad version: SKiDL 0.x targets KiCad 6+. For KiCad 7/8, test your output; some symbol library paths changed.
Method B: Custom SVG Renderer
A custom SVG schematic renderer with Manhattan (90°) and 45° diagonal routing, plus a Lee maze autorouter for complex multi-net layouts. Produces IEEE 315-style diagrams.
Usage
from renderer import SchematicRenderer
r = SchematicRenderer(cell_size=110)
r.add_component("U1", "ic", grid_x=0, grid_y=0,
pins_left=[{"num": 6, "name": "GPIO2"}],
pins_right=[{"num": 33, "name": "GND"}],
name="ESP32-C3")
r.add_component("R1", "resistor", grid_x=4, grid_y=2, value="330")
r.add_component("D1", "led", grid_x=7, grid_y=2, value="RED")
r.add_net("GPIO2", [("U1", 6), ("R1", 1)])
r.render("output.svg")Scripts
The scripts/ directory contains:
renderer.py— Core renderer: grid layout, wire routing (Manhattan, 45° diagonal, or maze autorouter), SVG outputsymbols.py— Component symbol drawing (resistor, capacitor, diode, LED, IC, ground, VCC, header)generate_examples.py— Generates horizontal, diagonal, vertical, and complex multi-net example schematicsdemo.py— Quick demo: ESP32-C3 + resistor + LED circuit
Run: python3 scripts/demo.py
Routing modes
| Mode | Quality | Speed | Use When |
| Manhattan | Clean orthogonal | Fast | Simple circuits, no component overlap |
| 45° diagonal | Professional look | Medium | Components at y-offsets |
| Maze (Lee) | Optimal pathfinding | Slow | Dense boards, narrow channels |
Pitfalls
- svgwrite module: Install with
pip install svgwrite - Grid positioning: Components are placed on a grid (default 100px cells). Off-grid positions produce unaligned wire stubs.
- Pin direction: Pins exit the component body in the direction specified ('L', 'R', 'U', 'D'). Wrong direction produces wires through the component.
- Port conflicts: The renderer does not check for overlapping components. Place them on distinct grid coordinates.
Method C: Raw KiCad S-Expression
Directly author .kicad_sch files as S-expressions using the KiCad 10 format.
Gives full control over symbol placement, wire routing, and component definitions
without going through the KiCad GUI or any library middleware.
When to use
- You need custom inline symbols (no external library dependency)
- You're automating schematic generation from a non-Python source
- You need exact control over every coordinate and property
Tools
| Tool | Purpose |
kiutils | Python library for reading/writing KiCad files (S-expr parser) |
kicad-skip | Older library for symbol and footprint editing |
| Raw string templates | Build S-expressions manually via Python f-strings |
Example structure
# Using kiutils to build a schematic
from kiutils.schematic import Schematic
from kiutils.items.sch_items import SchSymbol, SchSymbolPin
sym = SchSymbol(
libId="Device:R",
position=[100.0, 100.0],
reference="R1",
value="10k"
)
# Append to schematic symbols list, write via sch.to_file()See also
references/raw-sexpr-kicad.mdfor a complete indicator-panel example with 6 inline custom symbols and their S-expression definition
Pitfalls
- Coordinate system: KiCad uses mm with Y-up. A 2.54mm grid is standard.
- UUIDs: Every symbol and symbol instance needs a unique UUID.
- Version field: The
(version 20221018)header is required by KiCad 7+. - Lib symbols vs inline: Inline symbols go inside
(lib_symbols ...)in the.kicad_schfile; library-referenced symbols need the library registered.
Verification Checklist
- All component pins are connected to a net
- No unconnected pins (use NC markers for intentional disconnects)
- Each net has exactly one label (no floating labels)
- Power nets (VCC, GND) have PWR_FLAG components
- Wire endpoints snap to grid (standard 2.54mm KiCad grid)
- No overlapping wires across component bodies
- ERC passes with zero errors
- Netlist generation produces valid output
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

