read-pcb
Skill2 starsChanged 24 days agoMITView on GitHub
Answer board-wiring questions from EAGLE/KiCad schematics — pins/GPIOs, nets, connectors, jumpers/switches, values, MPNs, packages and revisions — including during firmware work, for hathach/pcb, READ_PCB_SOURCES repos or a user-named design directory.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arduinoSkill
- ci-rerunSkill
- code-sizeSkill
- coworkSkill
- debug-probeSkill
- download-docSkill
- followup-issueSkill
- headless-chiefSkill
- hil-farm-setupSkill
- hilSkill
- pr-babysitSkill
- pr-replySkill
- pr-reviewSkill
- read-docSkill
- repo-auditSkill
- rttSkill
- simplify-gateSkill
- target-debugSkill
- usb-kernel-debugSkill
- usb-kernel-recoverSkill
- usb-snifferSkill
- worktree-removeSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Use the revision the question names.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Read PCB
Answer from the design source. scripts/pcb.py owns the mechanics: finding
schematics, reading EAGLE XML, getting KiCad connectivity from kicad-cli,
and printing a source: line to cite. Run it as
python3 <skill dir>/scripts/pcb.py from any checkout; below, pcb.py
stands for that, and pcb.py --help lists the commands.
Sources
hathach/pcb: the user's boards, KiCad, the default source.READ_PCB_SOURCESlists the source repos asowner/repo, separated likePATH, in place of that default. On the user's PC it adds their other board repos; a session without it seeshathach/pcbonly.- Any location the user names, such as
~/code/jtrace/metro_m7_1011_trace:find --in PATH, then query its files by filesystem path. It is not remembered; the user names it again next time.
On the user's PC, READ_PCB_CLONES lists its working trees of those repos,
and answers come from them. Elsewhere, as in a cloud session, answers
come from a cache the script fetches on every command. Where GitHub access is
SSH only, set READ_PCB_REMOTE_BASE=git@github.com: before the first use; an
existing cache keeps its origin, so delete ~/.cache/read-pcb/<owner>/<repo>
to switch.
Steps
- Find the schematic.
pcb.py find WORD...with words of the board name. Use the revision the question names; when it names none and the revisions may differ on the point, ask the user or answer per revision. - Query.
nets SCH PATTERNto discover a net's name,net SCH NAMEfor what sits on it,part SCH REFfor a part's pins and the net on each,parts SCH WORD...to find a part. Follow a signal hop by hop,net->part->net: a resistor, jumper or switch joins two different nets, and a switch's position or off-board wiring needs other evidence. The NeoPixel on a Feather:nets SCH NEO, thennet SCH NEOPIXshows the MCU pin. - Cite. Quote the
source:line with the refdes and net names.@ shais the commit the bytes read were compared with;working tree cleanmeans they match it.modified,untrackedornot in HEADmeans the answer includes uncommitted edits, andprovenance unavailablemeans git could not tell, so say which. Aninputsnote gives the same state for each KiCad sub-sheet that is not clean. A file outside git has no sha: cite its path. Combine answers from several queries when they cite the same sha and each is clean or cached; otherwise re-run them together.
Reading the output
- A terminal is
REF PIN (NAME) pad P value device. An EAGLE pin shows its gate (1.D) when the pin name repeats across the part's gates. - KiCad pins are numbers with the pin name in parentheses; net names carry
sheet paths (
/NEOPIX). KiCad's export leaves power symbols off nets, sonet GNDlists the real parts only. [no-connect]is an explicit no-connect flag.(no net)is a pin wired to nothing.- Values are the schematic's base values.
[DNP](KiCad) marks a part not fitted on the board;[DNP in variant X](EAGLE) one not populated in that named variant only. - A part's own behaviour (registers, electrical limits) comes from its
datasheet through
read-doc, by value or MPN.
Exit codes
pcb.py --help lists them. Report a 3 with its message: the script refused
because the answer would not hold.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

