kicad-sch-api: Command for Claude Code

.claude/commands/dev/dev.md

dev is a command for Claude Code from circuit-synth/kicad-sch-api. It costs 13 tokens per session (10,083 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is circuit-synth/kicad-sch-api's own configuration. It tells Claude Code how to work on kicad-sch-api itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kicad-sch-api configures →

Reuse

Borrowing it

Nothing to install: this file belongs to circuit-synth/kicad-sch-api. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/circuit-synth/kicad-sch-api/main/.claude/commands/dev/dev.md
Clone the repo
git clone --depth 1 https://github.com/circuit-synth/kicad-sch-api

Made for: Claude Code.

Wrote 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.

agentmods badge for dev

README.md
[![agentmods](https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/dev/github.svg)](https://agentmods.dev/commands/circuit-synth/kicad-sch-api/dev)
Your own site
<a href="https://agentmods.dev/commands/circuit-synth/kicad-sch-api/dev"><img src="https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/dev/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dev

Your own site · 80×15
<a href="https://agentmods.dev/commands/circuit-synth/kicad-sch-api/dev"><img src="https://agentmods.dev/badge/commands/circuit-synth/kicad-sch-api/dev.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00013 $0.10083
Opus 5.5 $0.00005 $0.04033
Sonnet 5.5 $0.00003 $0.02017
Haiku 4.5 $0.00001 $0.01008

Measured 2mo ago against content hash 73023d9c1270, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (57 stars, last pushed 10mo ago), licensed MIT. It adds 13 tokens to every session and 10,083 once invoked, about $0.0001 per session on Opus 5.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.