From diodeinc-pcb-1
Grows Zener component packages into high-quality, sourceable reusable designs from datasheets, app notes, or eval boards. Checks existing packages, extracts evidence, selects passives, documents in .zen docstring, validates with pcb build.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-3 --plugin diodeinc-pcb-1This skill uses the workspace's default tool permissions.
Grow component packages beyond a generated wrapper when the part benefits from reusable surrounding circuitry. A good component package captures the support circuitry, default mode, key equations, layout-sensitive notes, and evidence needed to use the part confidently.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Grow component packages beyond a generated wrapper when the part benefits from reusable surrounding circuitry. A good component package captures the support circuitry, default mode, key equations, layout-sensitive notes, and evidence needed to use the part confidently.
components/<NAME>/, never in a separate reference/ tree. Legacy reference/ packages in the registry are read-only examples — inspect them for structure and API shape, but don't copy their placement..kicad_sym file is the source of truth for the primitive component interface and pin structure. Keep the .zen API aligned to it..zen docstring is the canonical design document. The README is for usage examples only.pcb build warnings, especially BOM/sourceability warnings such as bom.match_generic.# pcb:sch ... comments (tool-managed schematic layout metadata). When renaming a referenced component, module instance, or net, update the matching # pcb:sch names.component-search.pcb doc --package ... and by reading their source.Do not grow the package yet if:
Strong exemplars usually have most of these traits:
Weak/generated exemplars usually show warning signs such as:
Use weak examples for package API lookup only.
A high-quality component package is electrically faithful, narrowly scoped, reasonably sourceable, and evidence-backed. Treat the .zen file as the design artifact, not just executable code.
Extract at least:
When the datasheet is ambiguous, look for app notes, eval schematics, or nearby validated registry designs before guessing.
Package API rules:
Name the component package from the functional MPN, not the full orderable SKU.
Use these rules:
x: temperature grade, reel/tray packaging, RoHS/Pb-free, and other ordering-only suffixes.x.x.Examples:
DP83867ISRGZR -> DP83867TPS3430WDRCR -> TPS3430WDRCL78L05_TO92Use <NAME> for the resolved package name from the rules above, for example:
components/<NAME>/
├── <NAME>.zen
├── <NAME>.kicad_sym
├── pcb.toml
└── README.md
Scaffold with pcb new package components/<NAME> when creating a fresh package. If the component already exists, evolve the existing components/... package instead of creating a sibling package.
Organize the .zen file in this order:
load()s and helper definitionsio() and config() definitionsGroup support circuitry by electrical function: power, decoupling, feedback, straps, clocks, reset, interface conditioning, protection.
Keep the # pcb:sch ... block intact and in sync with renames. Treat the symbol file as canonical for pins and primitive interface naming.
Include:
Keep this in the .zen file so the code and rationale stay together.
Good comment targets:
Avoid comments that merely restate the code.
Read registry/.pcb/stdlib/bom/match_generics.zen when sourceability choices matter. The stdlib matcher only covers a constrained house catalog, so generic values, packages, dielectric choices, and voltage ratings affect whether parts match.
Use these rules:
pcb build warnings as review items, especially bom.match_generic.Typical fixes are choosing the nearest valid house value above a datasheet minimum, clamping computed values to supported parts, or adjusting package/voltage choices without violating the design. Use pcb bom <path> -f json when you need sourcing detail beyond the matcher.
Build after every major block, not just at the end.
pcb build components/<NAME>
Typical problems:
load()s, bad stdlib assumptions, or ambiguous optional-feature modelingFormat when done:
pcb fmt components/<NAME>
Use it for:
Do not put general feature lists, design notes, or long rationale sections in the README. That belongs in the .zen docstring.
Minimal README shape:
# <NAME>
## Usage
```python
MyRef = Module("github.com/diodeinc/registry/components/<NAME>/<NAME>.zen")
MyRef(
name="U1",
VIN=vin,
VOUT=vout,
GND=gnd,
)
```
## Other Usage Examples
Add additional examples only when they show materially different integration patterns.
Stop and ask or gather more evidence when:
pcb build warnings suggest unresolved correctness or sourceability issuespcb build was run and warnings were reviewed.pcb fmt was run, and the README contains usage examples only.