agentleFS
someboxsomebox/pcb-kit/skills/enclosure-fit/SKILL.md

enclosure-fit

Skill4 starsChanged 28 days agoMITView on GitHub

Turn an off-the-shelf project box into a board outline, mounting holes and keep-outs, and check the fit with paper before ordering. Use when a board has to fit an enclosure, when the user sends a photo or drawing of a box, or when a placement needs checking against the box.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After placement, --parts puts the part outlines on the print for a last check of connectors against the walls.

    line 23
  2. Distinctive:

    Keep the cut at least a few millimetres from a mounting hole, or the self-tapping screw splits the corner.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Fitting a board to an enclosure

Worked example: ~/Documents/Projects/esp32-s3-ha-node (boards/node/enclosure.json, LAYOUT.md, docs/fit-check*.pdf).

Loop

  1. Measure. Best: the manufacturer's drawing, confirmed with calipers. Next: a photo straight down with a ruler in the frame; scale from the millimetre ticks and expect about 0.5 mm accuracy on flat features and over 1 mm error on tall ones (bosses, standoffs) from parallax.
  2. Describe it in boards/<b>/enclosure.json: board size and corner radius, mounting holes (hole and boss diameter; "head", the screw head's diameter, when the screws go in from the top: a courtyard ring and an F.Cu keep-out for tracks, vias and fills under it), keep-outs (lid bosses), cut-outs around bosses (clearance, fillet), and reference drawings (lid inside, plateau, connector zones). Write where each number came from.
  3. Apply: pcbkit outline boards/<b>/<b>.kicad_pcb boards/<b>/enclosure.json --fit-check docs/fit-check.pdf. Rerunnable; it replaces only what it made.
  4. Print and cut. The user prints at 100 %, measures the 50 mm scale bar and a dimension line, cuts along the thick outline and drives the real screws through the holes. Their findings go back into the JSON.
  5. After placement, --parts puts the part outlines on the print for a last check of connectors against the walls.

Lessons

  • The first "doesn't fit" was the printer scaling the page. Hence the scale bar and dimension lines on every print.
  • Board-edge notches around lid bosses: straight in, an arc at boss radius plus clearance, straight out, and a fillet of at least the router radius (1 mm for a 2 mm cutter) on every inside corner.
  • Keep the cut at least a few millimetres from a mounting hole, or the self-tapping screw splits the corner.
  • Note the free height (standoff to lid) early; it decides terminal blocks, electrolytics and bottom-side parts.

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.