dev

A step-by-step development workflow for adding or fixing KiCAD schematic features. KiCAD is software for designing electronic circuit schematics.

In plain words
What is it for?
Writing a product requirements document, creating a reference schematic, generating tests, implementing the feature, validating it in KiCAD, and preparing the pull request.
Why use it?
It organizes work from the initial problem through testing, manual checking in KiCAD, and a pull request for review. This reduces the chance of missing requirements, format issues, or tests.

Command for Claude Code

Install

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.

agentmods
npx agentmods add commands/circuit-synth/kicad-sch-api/dev
Clone the repo
git clone --depth 1 https://github.com/circuit-synth/kicad-sch-api

Made for: Claude Code.

Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.10083
Opus 5 $0.00006 $0.05042
Sonnet 5 $0.00003 $0.02017
Haiku 4.5 $0.00001 $0.01008

Measured 2d ago against content hash 73023d9c1270, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dev scanned grade A with 1 finding 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 2d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(["open", "/tmp/validation_demo.kicad_sch"])
.claude/commands/dev/dev.md · 1,314 lines

How it starts

The opening of the file, as written. The whole thing — 1,314 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/dev - Development Workflow for KiCAD Schematic API

Purpose: Complete development workflow from problem description to pull request, using KiCAD reference-driven development with comprehensive testing and format preservation validation.

Use when: Building features, fixing bugs, or adding functionality that requires systematic development with PRD, reference schematics, tests, and iterative implementation.


Workflow Overview

/dev (end-to-end development)
  ├─ Phase 1: Generate PRD (research → ask questions → document)
  │   └─ STOP: User reviews PRD
  ├─ Phase 2: Create Reference Schematic (Interactive - agent creates, user refines)
  │   └─ STOP: User edits in KiCAD, says "done"
  ├─ Phase 3: Generate Tests (autonomous - no stop)
  ├─ Phase 4: Implementation (autonomous + communicative - shows progress)
  │   └─ STOP if stuck after 8 iterations
  ├─ Phase 4.5: Manual Validation (Interactive - agent guides, user inspects)
  │   └─ STOP: User validates in KiCAD
  └─ Phase 5: Cleanup & PR (autonomous - no stop)

Time estimate: 1-4 hours depending on complexity


Reviewing and Fixing Existing PRs

If you encounter an existing PR with failing CI, follow these steps to fix it:

Step 1: Checkout the PR branch

gh pr checkout {PR_NUMBER}

Step 2: Fix formatting issues

# Format code
uv run black kicad_sch_api/ tests/
uv run isort kicad_sch_api/ tests/

Step 3: Fix other CI failures

# Run tests to identify failures
uv run pytest tests/ -v

# Fix type errors
uv run mypy kicad_sch_api/

# Fix linting issues
uv run flake8 kicad_sch_api/ tests/

Step 4: Commit and push fixes

git add -A
git commit -m "chore: Fix CI formatting and test failures

Apply black and isort formatting to pass CI checks.
Fix any test failures and type errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>"

git push origin {BRANCH_NAME}

Read the full file on GitHub · 1,314 lines

Changes

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.

  1. 2d ago First seen · 1,314 lines · 13 tokens per session scan A 73023d9c1270

Subscribe to this mod's changes

dev is a command published in the GitHub repository circuit-synth/kicad-sch-api (51 stars, last pushed 9mo ago), licensed MIT. It adds 13 tokens to every session and 10,083 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.