Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/circuit-synth/kicad-sch-api/generate-circuitgit clone --depth 1 https://github.com/circuit-synth/kicad-sch-apiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/circuit-synth/kicad-sch-api/generate-circuit)<a href="https://agentmods.dev/commands/circuit-synth/kicad-sch-api/generate-circuit"><img src="https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/generate-circuit.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.04830 |
| Opus 5 | $0.00023 | $0.02415 |
| Sonnet 5 | $0.00009 | $0.00966 |
| Haiku 4.5 | $0.00005 | $0.00483 |
Grade A, and why
generate-circuit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 550 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate Professional KiCAD Circuit Schematic
You are generating a professional KiCAD schematic using kicad-sch-api with expert-level component placement and routing.
User's Circuit Request
Description: {{arg}}
Your task is to generate a complete, professional Python script that creates this circuit schematically.
⚠️ ULTRA CRITICAL: GRID ALIGNMENT (1.27mm) ⚠️
🔴 THE MOST CRITICAL RULE: ALL POSITIONS MUST BE ON 1.27mm GRID! 🔴
KiCAD uses a 1.27mm (50 mil) grid for schematic components and wires.
EVERY position MUST be a multiple of 1.27mm:
- ✅ Valid: 0, 1.27, 2.54, 3.81, 5.08, 6.35, 7.62, 8.89, 10.16, 11.43, 12.70...
- ✅ Valid: 100.33, 101.60, 102.87, 104.14, 105.41, 106.68, 107.95...
- ❌ Invalid: 100.5, 115.3, 129.540, 184.150 (OFF GRID!)
Why this matters:
- Off-grid components cause crooked wires
- Off-grid wires cause connectivity issues
- Off-grid placement looks unprofessional
- Can cause ERC (Electrical Rule Check) failures
How to ensure grid alignment:
def snap_to_grid(value, grid=1.27):
"""Snap a value to nearest grid point."""
return round(value / grid) * grid
# Use for ALL positions
signal_y = snap_to_grid(130.0) # Ensures exactly on grid
r1_x = snap_to_grid(180.0)
vout_x = snap_to_grid(200.0)
# Verify grid alignment
assert signal_y % 1.27 < 0.01, f"Y position {signal_y} not on 1.27mm grid!"
Pin positions and grid:
- Component centers MUST be on grid
- Pin offsets from component center may cause pins to be off-grid
- Use actual pin positions from
list_component_pins()for wire endpoints (already on correct positions) - Never manually calculate pin positions - always query them!
⚠️ CRITICAL: KiCAD Y-Axis Is INVERTED ⚠️
THE SECOND MOST IMPORTANT THING TO UNDERSTAND:
In KiCAD schematics, the Y-axis is INVERTED compared to normal math coordinates:
- LOWER Y values = HIGHER on screen (TOP of schematic)
- HIGHER Y values = LOWER on screen (BOTTOM of schematic)
- X-axis is normal (increases to the right)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 550 lines · 45 tokens per session scan A ba68ec78ab6d
generate-circuit is a command published in the GitHub repository circuit-synth/kicad-sch-api (52 stars, last pushed 9mo ago), licensed MIT. It adds 45 tokens to every session and 4,830 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
publish-pypi
Command "publish-pypi" from richard-luc/KiCAD-Schematic-Manipulation, covering publish to pypi - mcp kicad schematic api, usage, description, options and implementation.
review-implementation
Command "review-implementation" from richard-luc/KiCAD-Schematic-Manipulation, covering review implementation command - kicad-sch-api, usage, description, parameters and review areas.
type-coverage
Vérification Couverture des Types Python.
update-python-version
Update the minimum Python version requirement across the entire codebase.
execute-pydantic-ai-prp
Implement a Pydantic AI agent using the PRP file.
fastapi
FastAPI application design and implementation conventions. Use this skill when building, updating, or reviewing FastAPI services, routers, dependencies, request/response schemas, streaming endpoints, or API tests. Trigger on FastAPI-specific work such as path operation design, dependency injection, response models…