reference-design

diodeinc/pcb · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/diodeinc/pcb --skill reference-design
0 commentsdiscussion
summary

Build reusable application circuits, not generated IC wrappers. A good reference design captures the support circuitry, default mode, key equations, layout-sensitive notes, and evidence needed to use the part confidently.

skill.md

Reference Design

Build reusable application circuits, not generated IC wrappers. A good reference design captures the support circuitry, default mode, key equations, layout-sensitive notes, and evidence needed to use the part confidently.

Hard Rules

  1. Reuse before create. Search existing registry/workspace modules and reference designs first.
  2. Do not create a pin breakout or generated wrapper and call it a reference design.
  3. The .zen docstring is the canonical design document. The README is for usage examples only.
  4. pcb build warnings matter. Review them, especially BOM/sourceability warnings such as bom.match_generic.
  5. Do not guess ambiguous passives, straps, sequencing, or oscillator details. Get evidence or stop and ask.
  6. Imitate only strong exemplars. Weak/generated packages are useful for pin lookup, not authoring style.
  7. Preserve # pcb:sch ... comments. They carry tool-managed schematic layout metadata. Do not delete them. If you rename a referenced component, module instance, or net, update the corresponding # pcb:sch names too.

Reuse Before Create

  1. Search registry modules/reference designs with component-search.
  2. Search registry components or import the IC if it is missing, then inspect close matches with pcb doc --package ... and by reading their source.
  3. If an existing design is close, prefer using it or patching it.
  4. Create a new reference design only when it adds real reusable design judgment.

Do not create a new reference design yet if:

  • the datasheet does not clearly specify the required support circuitry
  • the topology still depends on unresolved system-level choices
  • the result would mostly duplicate an existing package with only minor edits
  • the IC symbol/component quality is too poor to wire confidently

Strong Vs Weak Exemplars

Strong exemplars usually have most of these traits:

  • minimal, integrator-facing IO instead of exposing every raw IC pin
  • typed configs for real design choices
  • passive values traceable to datasheet tables, equations, or app-note guidance
  • optional features modeled cleanly, with evidence notes for non-obvious choices
  • sourceable generic choices or documented house-part compromises
  • useful usage examples, and layout/testbench artifacts when complexity warrants them

Weak/generated exemplars usually show warning signs such as:

  • mostly raw IC pins exposed directly
  • little or no design rationale, or magic values with no evidence
  • no attempt to capture the intended application circuit
  • no sourceability thinking
  • README content that is generic, marketing-like, or duplicated from the code

Use weak examples for package API lookup only.

Quality Bar

A high-quality reference design is electrically faithful, narrowly scoped, reasonably sourceable, and evidence-backed. Treat the .zen file as the design artifact, not just executable code.

Evidence Extraction

Extract at least:

  • the exact typical application circuit or recommended topology
  • supply rails, limits, sequencing, and required external passives
  • strap, mode-select, reset, enable, bias, compensation, and timing networks
  • equations for programmable values and any datasheet-recommended example points
  • oscillator or crystal requirements, sensitive analog/high-speed connections, and thermal/layout guidance
  • any package-specific caveats that change how the design should be exposed

When the datasheet is ambiguous, look for app notes, eval schematics, or nearby validated registry designs before guessing.

Define The Public API First

Reference-design API rules:

  • Expose the application-level interface, not the raw pinout.
  • Keep layout-sensitive or implementation-detail nodes internal unless external access is genuinely required.
  • Expose configs only for choices an integrator should reasonably tune; do not expose every passive.
  • Prefer one narrow, coherent operating mode over a sprawling universal module.
  • If two operating modes materially change topology, consider separate designs instead of config explosion.

Scaffold And Implement

Directory layout and naming

Name the reference design from the functional MPN, not the full orderable SKU.

Use these rules:

  • Start from the manufacturer part number.
  • Keep functional variation in the name: electrical options and package/pinout differences stay.
  • Replace non-functional variation with lowercase x: temperature grade, reel/tray packaging, RoHS/Pb-free, and other ordering-only suffixes.
  • If the only wildcarded characters would be trailing non-functional suffixes, omit the trailing x.
  • If there is only one functional variant, do not add an unnecessary x.
  • If the part exists in multiple footprint or pinout options, make a separate reference design for each one.
  • If multiple manufacturers make footprint-compatible parts with different package suffixes, use the common base name plus a clear package suffix.

Examples:

  • DP83867ISRGZR -> DP83867
  • TPS3430WDRCR -> TPS3430WDRC
  • compatible cross-vendor variants with different package suffixes -> L78L05_TO92

Use <NAME> for the resolved reference-design name from the rules above, for example:

reference/<NAME>/
├── <NAME>.zen
├── pcb.toml
└── README.md

Scaffold with pcb new package reference/<NAME>.

File structure

Organize the .zen file in this order:

  1. Top-of-file docstring
  2. load()s and helper definitions
  3. io() and config() definitions
  4. internal nets and imports
  5. main IC instantiation and supporting circuitry grouped by function
  6. layout / tool-managed metadata

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

Docstring policy

Include:

  • what circuit/application mode this module implements
  • the exact IC/package or family it targets
  • the intended operating envelope, interfaces, configs, and assumptions
  • evidence notes for important choices and non-obvious layout guidance
  • sourceability compromises such as house-part rounding when relevant

Keep this in the .zen file so the code and rationale stay together.

Comment policy

Good comment targets:

  • datasheet section/table/equation references
  • justification for rounded/clamped values
  • optional-feature stuffing strategy or layout-sensitive placement guidance

Avoid comments that merely restate the code.

Sourceability And BOM Quality

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:

  1. Treat pcb build warnings as review items, especially bom.match_generic.
  2. Prefer generic values/package/voltage combinations that match house parts when that does not compromise the design.
  3. If the datasheet value does not match house parts, a nearby house value is acceptable only when the change is technically defensible.
  4. Whenever you round, clamp, or substitute to land on a house-matchable value, document the reason in the docstring or a nearby comment.
  5. If a generic cannot reasonably match, do not silently force a workaround. Ask the user whether they want to specify an explicit part or suppress the warning with justification.

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 Iteratively

Build after every major block, not just at the end.

pcb build reference/<NAME>

Typical problems:

  • wrong interface field names or package wiring
  • missing load()s, bad stdlib assumptions, or ambiguous optional-feature modeling
  • unmatched generics or values that are plausible electrically but not sourceable

Format when done:

pcb fmt reference/<NAME>

README Policy

Use it for:

  • realistic instantiation examples
  • different application contexts when they materially change integration
  • concise consume-the-module notes only

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> Reference Design

## Usage

```python
MyRef = Module("github.com/diodeinc/registry/reference/<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 Conditions

Stop and ask or gather more evidence when:

  • the datasheet is unclear about a required passive, strap, or topology choice
  • the design depends on unresolved system-level requirements
  • the imported component/symbol quality is too poor to wire safely
  • pcb build warnings suggest unresolved correctness or sourceability issues
  • the design is drifting into a generic breakout instead of a reference module

Final Checklist

  1. Existing registry/workspace packages were checked first.
  2. The module implements one coherent application circuit.
  3. The docstring explains the design, evidence, and any sourceability compromises.
  4. pcb build was run and warnings were reviewed.
  5. pcb fmt was run, and the README contains usage examples only.
how to use reference-design

How to use reference-design on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add reference-design
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/diodeinc/pcb --skill reference-design

The skills CLI fetches reference-design from GitHub repository diodeinc/pcb and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/reference-design

Reload or restart Cursor to activate reference-design. Access the skill through slash commands (e.g., /reference-design) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.640 reviews
  • Kiara Lopez· Dec 16, 2024

    reference-design reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Benjamin Flores· Dec 4, 2024

    reference-design has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Benjamin Lopez· Nov 23, 2024

    reference-design fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Min Torres· Nov 19, 2024

    Keeps context tight: reference-design is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • James Taylor· Nov 7, 2024

    I recommend reference-design for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • James Martin· Oct 26, 2024

    Useful defaults in reference-design — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Jin Bansal· Oct 14, 2024

    We added reference-design from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ava Brown· Oct 10, 2024

    reference-design is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Oshnikdeep· Sep 25, 2024

    reference-design is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Benjamin Khanna· Sep 21, 2024

    Useful defaults in reference-design — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

showing 1-10 of 40

1 / 4