agentleFS
hathachhathach/agentrc/skills/read-pcb/SKILL.md

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.

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
  1. Distinctive:

    Use the revision the question names.

    line 34

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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_SOURCES lists the source repos as owner/repo, separated like PATH, in place of that default. On the user's PC it adds their other board repos; a session without it sees hathach/pcb only.
  • 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

  1. 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.
  2. Query. nets SCH PATTERN to discover a net's name, net SCH NAME for what sits on it, part SCH REF for 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, then net SCH NEOPIX shows the MCU pin.
  3. Cite. Quote the source: line with the refdes and net names. @ sha is the commit the bytes read were compared with; working tree clean means they match it. modified, untracked or not in HEAD means the answer includes uncommitted edits, and provenance unavailable means git could not tell, so say which. An inputs note 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, so net GND lists 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.