Skip to content

Commit bf3749a

Browse files
aklofasclaude
andcommitted
v1.1 release prep: plugin marketplace, NC improvements, README overhaul
Add marketplace.json for plugin install, split GitHub Action docs to github-action.md, add NC downstream improvements (unconnected pin type, single_pin_nets filtering, reset pin skip), fix PDN citation, and overhaul README with v1.1 section and showcase improvements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7d9fbf0 commit bf3749a

7 files changed

Lines changed: 205 additions & 116 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "kicad-happy",
3+
"owner": {
4+
"name": "aklofas"
5+
},
6+
"metadata": {
7+
"description": "AI-powered KiCad electronics design skills — schematic analysis, PCB review, component sourcing, BOM management, and manufacturing prep."
8+
},
9+
"plugins": [
10+
{
11+
"name": "kicad-happy",
12+
"source": "./",
13+
"description": "KiCad electronics design skills for Claude Code. Analyze schematics, review PCB layouts, download datasheets, source components, manage BOMs, and prep boards for fabrication.",
14+
"version": "1.1.0",
15+
"author": { "name": "aklofas" }
16+
}
17+
]
18+
}

README.md

Lines changed: 65 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ These skills turn your AI coding agent into a full-fledged electronics design as
88

99
## 🔬 What it looks like in practice
1010

11+
Point your agent at a KiCad project and it does the rest — parses every schematic and PCB file, traces every net, computes every voltage, and tells you what's wrong before you spend money on boards.
12+
1113
> "Analyze my KiCad project at `hardware/rev2/`"
1214
13-
The agent runs the analysis scripts, reads datasheets, and produces a full design review. Here's a condensed example from a real project — a 6-layer BLDC motor controller (187 components):
15+
Here's a condensed example from a real 6-layer BLDC motor controller (187 components). The agent found all of this automatically:
1416

15-
**Power tree** — every regulator traced from input to output, feedback dividers identified, output voltage computed:
17+
**It builds your power tree**tracing every regulator from input to load, computing output voltages from feedback dividers, and flagging when the math doesn't match:
1618

1719
```
1820
V+ (10-54V motor bus, TVS protected)
19-
├── MAX17760 buck → +12V (feedback: 226k/16.2k, Vref=1.0V → Vout=14.95V)
21+
├── MAX17760 buck → +12V (feedback: 226k/16.2k, Vref=1.0V → Vout=14.95V) ⚠️
2022
│ └── TPS629203 → +5V → TPS629203 → +3.3V
2123
├── DRV8353 gate driver (PVDD = V+ direct)
2224
└── 3-Phase Bridge: 6x FDMT80080DC (80V/80A)
2325
└── 36x 4.7uF 100V bulk caps = 169.2uF
2426
```
2527

26-
**Detected subcircuits**found automatically from the schematic:
28+
**It identifies every subcircuit**not just passives, but the functional blocks and how they connect:
2729

2830
| Subcircuit | Details |
2931
|-------------|---------|
@@ -32,7 +34,7 @@ V+ (10-54V motor bus, TVS protected)
3234
| Protection | TVS on V+ input (51V standoff matches bus spec), ground domain separation with net ties |
3335
| Sensing | Battery voltage divider (100k/4.7k → 54V max reads as 2.43V), FET temp NTC |
3436

35-
**PCB cross-reference**the review covers layout too:
37+
**It cross-references the PCB**checking that the layout actually supports what the schematic promises:
3638

3739
```
3840
Board: 56.0 x 56.0 mm, 6-layer, 1.55mm stackup
@@ -44,7 +46,7 @@ Thermal pad vias:
4446
Inductor L2: 4 vias — INSUFFICIENT (recommended: 9)
4547
```
4648

47-
**Issues found:**
49+
**It tells you what needs attention** — and what doesn't:
4850

4951
| Severity | Issue |
5052
|------------|-------|
@@ -55,16 +57,48 @@ Thermal pad vias:
5557

5658
**What looks good:** 170µF bus capacitance across 38 caps, proper GND/GNDPWR domain separation, CAN bus termination verified, 100% MPN coverage across all components, zero DFM violations, JLCPCB standard tier compatible.
5759

60+
**It maps your protection coverage** — finds every TVS, ESD suppressor, and fuse, then tells you which interfaces are unprotected:
61+
62+
```
63+
Protection devices:
64+
D1 (PESD5V0S2UT): USB_DP, USB_DM → GND [dual-channel ESD] ✓
65+
D3 (SMBJ51A): V+ motor bus → GND [TVS, 51V standoff] ✓
66+
F1 (1A): V+ input [fuse] ✓
67+
⚠️ CAN_H / CAN_L — no TVS protection (exposed on connector J3)
68+
⚠️ I2C_SDA / I2C_SCL — no ESD protection (exposed on header J5)
69+
```
70+
71+
**It estimates your sleep current** — traces every always-on path and totals the quiescent draw per rail:
72+
73+
```
74+
+3.3V sleep current breakdown:
75+
U3 (TPS629203) quiescent: ~15 µA
76+
R5/R6 feedback divider (226k/16.2k): 13.6 µA
77+
R12 pull-up (100k to +3.3V): 33 µA
78+
Total estimated: ~62 µA
79+
```
80+
5881
For a complete example, see the [full design review](example-report.md) of an ESP32-S3 board — 52 components, 2-layer, dual boost converters, USB host, touch sensing. For the end-to-end walkthrough from S-expression parsing through signal detection and datasheet cross-referencing, see [How It Works](how-it-works.md).
5982

6083
## 🚀 Install
6184

62-
Ask your agent:
85+
We're excited to release kicad-happy as a **Claude Code plugin** — you can now install it with two commands from the `/plugin` menu. For OpenAI Codex, the manual install and agent prompt methods still work as before.
6386

64-
> Clone https://github.com/aklofas/kicad-happy and install all the skills
87+
**Claude Code plugin** (recommended):
88+
89+
```
90+
/plugin marketplace add aklofas/kicad-happy
91+
/plugin install kicad-happy@kicad-happy
92+
```
6593

6694
<details>
67-
<summary><strong>Claude Code (manual)</strong></summary>
95+
<summary><strong>Other install methods</strong></summary>
96+
97+
**Ask your agent:**
98+
99+
> Clone https://github.com/aklofas/kicad-happy and install all the skills
100+
101+
**Claude Code (manual):**
68102

69103
```bash
70104
git clone https://github.com/aklofas/kicad-happy.git
@@ -73,10 +107,8 @@ for skill in kicad spice emc bom digikey mouser lcsc element14 jlcpcb pcbway; do
73107
ln -sf "$(pwd)/kicad-happy/skills/$skill" ~/.claude/skills/$skill
74108
done
75109
```
76-
</details>
77110

78-
<details>
79-
<summary><strong>OpenAI Codex (manual)</strong></summary>
111+
**OpenAI Codex (manual):**
80112

81113
```bash
82114
git clone https://github.com/aklofas/kicad-happy.git
@@ -85,110 +117,16 @@ for skill in kicad spice emc bom digikey mouser lcsc element14 jlcpcb pcbway; do
85117
ln -sf "$(pwd)/kicad-happy/skills/$skill" ~/.codex/skills/$skill
86118
done
87119
```
120+
88121
</details>
89122

90123
The analysis scripts are **pure Python 3.8+** with zero required dependencies. No pip install, no Docker, no KiCad installation needed.
91124

92125
## ⚙️ GitHub Action
93126

94-
Add automated design review to any KiCad project. No account needed — just add the workflow file:
95-
96-
```yaml
97-
# .github/workflows/kicad-review.yml
98-
name: KiCad Design Review
99-
on:
100-
push:
101-
paths: ['**/*.kicad_sch', '**/*.kicad_pcb']
102-
pull_request:
103-
paths: ['**/*.kicad_sch', '**/*.kicad_pcb']
104-
105-
permissions:
106-
contents: read
107-
pull-requests: write
108-
statuses: write
109-
110-
jobs:
111-
review:
112-
runs-on: ubuntu-latest
113-
steps:
114-
- uses: actions/checkout@v6
115-
- run: sudo apt-get install -y ngspice poppler-utils
116-
- uses: aklofas/kicad-happy@v1
117-
id: analysis
118-
- uses: thollander/actions-comment-pull-request@v3
119-
if: github.event_name == 'pull_request'
120-
with:
121-
file-path: ${{ steps.analysis.outputs.report-path }}
122-
comment-tag: kicad-happy-review
123-
mode: upsert
124-
```
125-
126-
Every push and PR that touches KiCad files gets a **commit status check** (green/red with findings summary). On PRs, a structured review comment is also posted — power tree, protocol compliance, voltage derating, SPICE results, EMC risk analysis, thermal analysis, component health, and PCB stats. The comment updates on re-pushes. A [full report](skills/kicad/references/report-generation.md) is available on the Actions run page.
127-
128-
Enable `diff-base: true` to show only what changed between the PR and the base branch — component additions/removals, signal parameter shifts, new/resolved EMC findings, and SPICE status transitions.
129-
130-
<details>
131-
<summary><strong>Add AI-powered review (optional — needs Anthropic API key)</strong></summary>
132-
133-
Chain with [`anthropics/claude-code-action`](https://github.com/anthropics/claude-code-action) for Claude to read the analysis + datasheets and write a natural-language design review. The cost estimates below apply only when using the Anthropic API (`ANTHROPIC_API_KEY`) for CI — there's no additional cost when reviewing locally with a Claude Code or OpenAI Codex subscription. Two options:
134-
135-
**Quick review** (~$1-3 per PR via API, 5-10 min):
136-
137-
```yaml
138-
- uses: anthropics/claude-code-action@v1
139-
if: github.event_name == 'pull_request' && env.ANTHROPIC_API_KEY != ''
140-
env:
141-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
142-
with:
143-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
144-
github_token: ${{ secrets.GITHUB_TOKEN }}
145-
prompt: |
146-
The kicad-happy deterministic analysis has already been run.
147-
Read the markdown report at ${{ steps.analysis.outputs.report-path }}.
148-
149-
Do NOT re-run analysis scripts. Review the findings and:
150-
1. Verify the top 3-5 IC pinouts against datasheets
151-
2. Check WARNING findings for accuracy
152-
3. Note anything the analysis may have missed
153-
154-
Post a concise summary (under 2000 chars) as a PR comment.
155-
Focus on actionable findings only.
156-
claude_args: '--model claude-sonnet-4-6 --max-turns 25'
157-
```
158-
159-
**Thorough review** (~$5-15 per PR via API, 10-20 min):
160-
161-
```yaml
162-
- uses: anthropics/claude-code-action@v1
163-
if: github.event_name == 'pull_request' && env.ANTHROPIC_API_KEY != ''
164-
env:
165-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
166-
with:
167-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
168-
github_token: ${{ secrets.GITHUB_TOKEN }}
169-
prompt: |
170-
The kicad-happy deterministic analysis has already been run.
171-
Read the JSON at ${{ steps.analysis.outputs.schematic-json }}
172-
and the report at ${{ steps.analysis.outputs.report-path }}.
173-
174-
Do NOT re-run analysis scripts. Perform a thorough review:
175-
1. Read datasheets for every IC and verify pinouts
176-
2. Check voltage divider/feedback calculations against datasheets
177-
3. Verify application circuit compliance for regulators
178-
4. Check power sequencing and enable chain logic
179-
5. Review protection device coverage on external interfaces
180-
6. Note any design concerns the analysis missed
181-
182-
Post your review as a PR comment. Include specific datasheet
183-
page references for each finding.
184-
claude_args: '--model claude-sonnet-4-6 --max-turns 50'
185-
```
186-
187-
**Setup:** Get an API key from [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys), then add it as a repository secret named `ANTHROPIC_API_KEY` in Settings → Secrets → Actions. Cost depends on design complexity — see [Anthropic pricing](https://www.anthropic.com/pricing).
188-
189-
</details>
127+
Also available as a **GitHub Action** for automated PR reviews. Every push and PR that touches KiCad files gets a commit status check and a structured review comment — power tree, SPICE results, EMC risk, thermal analysis, and more. Optionally chain with Claude for AI-powered natural-language reviews.
190128

191-
See [`action/examples/`](action/examples/) for fork-safe workflows, distributor API keys for datasheet download, and advanced configuration.
129+
See the **[GitHub Action setup guide](github-action.md)** for workflow examples, diff-based PR reviews, and AI-powered review configuration.
192130

193131
## 📦 Skills
194132

@@ -378,6 +316,23 @@ Or just set up the GitHub Action and get automated reviews on every PR.
378316
| KiCad 6 | Full | Full | Full |
379317
| KiCad 5 | Full (legacy `.sch` + `.lib`) | Full | Full |
380318

319+
## 🎯 v1.1 — EMC Pre-Compliance + Analysis Toolkit
320+
321+
New skill: **EMC pre-compliance risk analysis** — predicts the most common causes of EMC test failures from your KiCad schematic and PCB layout. Plus four new analysis tools for tolerance, diffing, thermal, and what-if exploration.
322+
323+
**What's in v1.1:**
324+
325+
| Category | Capabilities |
326+
|----------|-------------|
327+
| **EMC pre-compliance** | 42 rule checks across ground plane integrity, decoupling, I/O filtering, switching harmonics, diff pair skew, PDN impedance, ESD paths, crosstalk, board edge radiation, thermal-EMC, shielding. SPICE-enhanced when ngspice is available. FCC/CISPR/automotive/military. |
328+
| **Plugin install** | Available as a Claude Code plugin marketplace — `/plugin marketplace add aklofas/kicad-happy`. |
329+
| **Monte Carlo tolerance** | `--monte-carlo N` runs N simulations with randomized component values within tolerance bands. Reports 3σ bounds and per-component sensitivity analysis. |
330+
| **Design diff** | Compares two analysis JSONs — component changes, signal parameter shifts, EMC finding deltas. GitHub Action `diff-base: true` for automatic PR comparison. |
331+
| **Thermal hotspots** | Junction temperature estimation for LDOs, switching regulators, shunt resistors. Package Rθ_JA lookup, thermal via correction, proximity warnings. |
332+
| **No-connect detection** | Correctly identifies NC markers, library-defined NC pins, and KiCad `unconnected` pin types. Eliminates false floating-pin warnings across 2,253 files. |
333+
| **Code audit** | 22 bug fixes (trace inductance 25x overestimate, PDN target impedance, regulator voltage suffix parser, inner-layer reference planes, and more). Full AnalysisContext migration for cleaner internals. |
334+
| **Validation** | 6,853 EMC analyses across 1,035 repos (zero crashes), 96 equations verified against primary sources, 404K+ regression assertions at 100% pass rate. |
335+
381336
## 🎯 v1.0 — First Stable Release
382337

383338
This is the first stable release of kicad-happy. It marks the point where every piece of the analysis pipeline — schematic parsing, PCB layout review, Gerber verification, SPICE simulation, datasheet cross-referencing, BOM sourcing, and manufacturing prep — has been built, tested against 1,035 real-world KiCad projects, and validated with 294K+ regression assertions. Zero analyzer crashes across the full corpus.
@@ -419,7 +374,7 @@ Everything above was validated against a [corpus of 1,035 open-source KiCad proj
419374
| SPICE subcircuit simulations | 30,646 across 17 types |
420375
| SPICE-verified EMC findings | 169 (PDN impedance via ngspice) |
421376
| Regression assertions | 520K+ at 100% pass rate |
422-
| Equations tracked & verified | 88 with source citations |
377+
| Equations tracked & verified | 96 with source citations |
423378
| Bugfix regression guards | 77 (100% pass — no fixed bugs have returned) |
424379
| Closed analyzer issues | 191 |
425380

github-action.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# GitHub Action — Automated KiCad Design Review
2+
3+
Add automated design review to any KiCad project. Every push and PR that touches KiCad files gets a **commit status check** (green/red with findings summary). On PRs, a structured review comment is posted covering power tree, protocol compliance, voltage derating, SPICE results, EMC risk analysis, thermal analysis, component health, and PCB stats.
4+
5+
No account needed — just add the workflow file.
6+
7+
## Basic setup
8+
9+
```yaml
10+
# .github/workflows/kicad-review.yml
11+
name: KiCad Design Review
12+
on:
13+
push:
14+
paths: ['**/*.kicad_sch', '**/*.kicad_pcb']
15+
pull_request:
16+
paths: ['**/*.kicad_sch', '**/*.kicad_pcb']
17+
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
statuses: write
22+
23+
jobs:
24+
review:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
- run: sudo apt-get install -y ngspice poppler-utils
29+
- uses: aklofas/kicad-happy@v1
30+
id: analysis
31+
- uses: thollander/actions-comment-pull-request@v3
32+
if: github.event_name == 'pull_request'
33+
with:
34+
file-path: ${{ steps.analysis.outputs.report-path }}
35+
comment-tag: kicad-happy-review
36+
mode: upsert
37+
```
38+
39+
The PR comment updates on re-pushes. A [full report](skills/kicad/references/report-generation.md) is available on the Actions run page. SPICE-enhanced mode activates automatically when ngspice is installed. EMC and thermal analysis run automatically after schematic/PCB analysis.
40+
41+
## Diff-based PR reviews
42+
43+
Enable `diff-base: true` to show only what changed between the PR and the base branch — component additions/removals, signal parameter shifts, new/resolved EMC findings, and SPICE status transitions. The PR comment includes a "Changes from Base" section.
44+
45+
```yaml
46+
- uses: aklofas/kicad-happy@v1
47+
id: analysis
48+
with:
49+
diff-base: true
50+
```
51+
52+
## AI-powered review (optional)
53+
54+
Chain with [`anthropics/claude-code-action`](https://github.com/anthropics/claude-code-action) for Claude to read the analysis + datasheets and write a natural-language design review. The deterministic analysis (schematic, PCB, EMC, thermal) is always free. The cost estimates below come from Anthropic API calls made by `claude-code-action` — there's no additional cost when reviewing locally with a Claude Code or OpenAI Codex subscription.
55+
56+
### Quick review (~$1-3 per PR via API, 5-10 min)
57+
58+
```yaml
59+
- uses: anthropics/claude-code-action@v1
60+
if: github.event_name == 'pull_request' && env.ANTHROPIC_API_KEY != ''
61+
env:
62+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
63+
with:
64+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
65+
github_token: ${{ secrets.GITHUB_TOKEN }}
66+
prompt: |
67+
The kicad-happy deterministic analysis has already been run.
68+
Read the markdown report at ${{ steps.analysis.outputs.report-path }}.
69+
70+
Do NOT re-run analysis scripts. Review the findings and:
71+
1. Verify the top 3-5 IC pinouts against datasheets
72+
2. Check WARNING findings for accuracy
73+
3. Note anything the analysis may have missed
74+
75+
Post a concise summary (under 2000 chars) as a PR comment.
76+
Focus on actionable findings only.
77+
claude_args: '--model claude-sonnet-4-6 --max-turns 25'
78+
```
79+
80+
### Thorough review (~$5-15 per PR via API, 10-20 min)
81+
82+
```yaml
83+
- uses: anthropics/claude-code-action@v1
84+
if: github.event_name == 'pull_request' && env.ANTHROPIC_API_KEY != ''
85+
env:
86+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
87+
with:
88+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
89+
github_token: ${{ secrets.GITHUB_TOKEN }}
90+
prompt: |
91+
The kicad-happy deterministic analysis has already been run.
92+
Read the JSON at ${{ steps.analysis.outputs.schematic-json }}
93+
and the report at ${{ steps.analysis.outputs.report-path }}.
94+
95+
Do NOT re-run analysis scripts. Perform a thorough review:
96+
1. Read datasheets for every IC and verify pinouts
97+
2. Check voltage divider/feedback calculations against datasheets
98+
3. Verify application circuit compliance for regulators
99+
4. Check power sequencing and enable chain logic
100+
5. Review protection device coverage on external interfaces
101+
6. Note any design concerns the analysis missed
102+
103+
Post your review as a PR comment. Include specific datasheet
104+
page references for each finding.
105+
claude_args: '--model claude-sonnet-4-6 --max-turns 50'
106+
```
107+
108+
### Setup
109+
110+
Get an API key from [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys), then add it as a repository secret named `ANTHROPIC_API_KEY` in Settings → Secrets → Actions. Cost depends on design complexity — see [Anthropic pricing](https://www.anthropic.com/pricing).
111+
112+
## More examples
113+
114+
See [`action/examples/`](action/examples/) for fork-safe workflows, distributor API keys for datasheet download, and advanced configuration.

0 commit comments

Comments
 (0)