Skill站外收录 @skilllib/skill-2117939930272415846
pcb
支持基于 Zener 语言的 PCB 设计全流程,涵盖原理图构建、模块化电路定义与组件检索。通过命令行工具实现工程创建、代码格式化、设计验证及 BOM 生成,集成部件搜索与远程依赖管理,可动态匹配通用元件至优选型号并提供供应链数据支持。
文档处理 AI 技能
Skills.MD
# PCB
Zener is a Starlark-based HDL for PCB design. `.zen` files define components, nets, interfaces, and modules. Key concepts:
- **Net**: electrical connection between pins
- **Component**: physical part with symbol, footprint, pins
- **Interface**: reusable grouped connection pattern (e.g., `Spi`, `I2c`, `Uart`)
- **Module**: hierarchical subcircuit, instantiated with `Module("path.zen")`
**IMPORTANT: Before writing or modifying .zen code, run `pcb doc spec` to read the language specification.** The spec covers syntax, built-in functions, type system, and common patterns. For specific topics: `pcb doc spec --list` shows all sections, `pcb doc spec/<section>` reads one section.
**Prefer stdlib generics** (`@stdlib/generics/`) over specific components when possible. Generics like `Resistor`, `Capacitor`, `Led` are parameterized by value/package and resolved to real parts at build time.
**Common imports**: `load("@stdlib/interfaces.zen", "Power", "Ground", "Spi", "I2c", ...)` for standard net types and interfaces.
## CLI Commands
```bash
# scaffolding
pcb new --workspace <NAME> # Create new workspace with git init
pcb new --board <NAME> # Add board to existing workspace (boards/<NAME>/)
pcb new --package <PATH> # Create package at path (modules, etc.)
pcb new --component # Interactive TUI (use search_component + add_component MCP tools instead)
```
```bash
pcb build [PATH] # Build and validate (default: cwd)
pcb fmt [PATH] # Format .zen files (default: cwd)
pcb bom <FILE> -f json # Generate BOM as JSON with availability data
pcb fork add <URL> # Fork dependency for local dev
pcb fork remove <URL> # Remove fork
```
```bash
# JavaScript scripting with MCP tools
pcb mcp eval 'tools.search_registry({query: "buck"})' # Search registry
pcb mcp eval -f script.js # Run from file
```
Use `pcb mcp eval` to chain multiple tool calls. Tools available via `tools.name({...})`, metadata at `tools._meta`.
## MCP Tools
| Tool | Use |
|------|-----|
| `search_registry` | Find modules/components in Zener registry (try FIRST). Returns pricing and availability data. |
| `search_component` | Search Diode online database (fallback). Returns pricing and availability data. |
| `add_component` | Download component to workspace |
## Documentation
```bash
pcb doc spec # Full language specification
pcb doc spec --list # List all spec sections
pcb doc spec/<section> # Read specific section (e.g., spec/io, spec/module)
pcb doc packages # Dependency management docs
```
Package docs (stdlib, registry packages):
```bash
pcb doc --package @stdlib # Standard library docs
pcb doc --package @stdlib --list # List files as tree
pcb doc --package @stdlib/generics # Filter to subdirectory
pcb doc --package github.com/diodeinc/registry/module/<xyz>@0.1.0 # Remote package
```
## Part Sourcing & BOM Matching
Generic components are matched to "house parts" (pre-qualified, good availability). Warnings like `No house cap found for ...` or `No house resistor found for ...` mean no house part matches the spec—adjust the spec or specify `mpn` + `manufacturer` to use a specific part.
`pcb bom <FILE> -f json` outputs sourcing data with `availability_tier` (`"plenty"` | `"limited"` | `"insufficient"`) and distributor `offers` by region.
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「pcb」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次