Skip to content
Back to skills

Gridfinity Workshop

ASecurity

Design and generate 3D-printable Gridfinity storage — bins, divided bins, baseplates, item holders — and custom tool bins traced from a phone photo of the user's tools on a printable tracing mat. Uses OpenSCAD with the gridfinity_extended_openscad library, remembers the user's printer and Gridfinity preferences (foot style, stacking lip, magnets, bed size, paper size) across sessions, and exports STL files, preview renders and reusable tool outlines (SVG/DXF). Use this skill whenever the user...

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
ai-agentspythongobashspringawsgit

Security analysis

A100/100

Pro scans all 17 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add aaldrich29/gridfinity-workshop --skill gridfinity-workshop --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gridfinity Workshop?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gridfinity Workshop
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aaldrich29-gridfinity-workshop/badge)](https://www.skillsdirectory.com/skills/aaldrich29-gridfinity-workshop)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gridfinity-workshop
description: Design and generate 3D-printable Gridfinity storage — bins, divided bins, baseplates, item holders — and custom tool bins traced from a phone photo of the user's tools on a printable tracing mat. Uses OpenSCAD with the gridfinity_extended_openscad library, remembers the user's printer and Gridfinity preferences (foot style, stacking lip, magnets, bed size, paper size) across sessions, and exports STL files, preview renders and reusable tool outlines (SVG/DXF). Use this skill whenever the user mentions Gridfinity, gridfinity bins or baseplates, organizing a drawer or tool chest with printed bins, a shadow board or foam-style tool cutout, tracing a tool from a photo, or sends a photo of tools on a tracing mat — even if they don't say "Gridfinity" by name.
license: MIT
compatibility: Needs code execution with Python 3 and one-time internet access to openscad.org and github.com. Setup is automatic on Linux x86_64; elsewhere install the OpenSCAD development snapshot and set OPENSCAD.
---

# Gridfinity Workshop

Generate Gridfinity parts with OpenSCAD and turn photos of tools into custom-fit tool bins.

The scripts do the heavy lifting; your job is to understand what the user wants, apply their saved
defaults, run the right script, look at the result before handing it over, and keep their preferences.

## 0. Every time: load the user's defaults

Look for saved defaults **before** asking the user anything:

1. **Persistent memory (preferred).** Look for a memory file named `gridfinity` — for example
   `/topics/gridfinity.md`. If your memory system confines writes to a sub-folder (some project
   sessions do), use the same relative path inside it, and check both places when reading.
   The file holds a short note plus one ```json block of defaults.
2. **No memory tools?** Look for `gridfinity_defaults.json` in the user's working/output folder.
3. Write the JSON to a local `gridfinity_defaults.json` and pass `--defaults` to every script.

The JSON uses the keys of `BUILTIN` in `scripts/gf_common.py` (only store keys that differ from it):

```json
{
  "foot_style": "half",
  "stacking_lip": false,
  "magnets": false,
  "screws": false,
  "printer_bed_mm": [220, 220],
  "paper": "letter",
  "max_height_units": 13,
  "output_folder": "3D Printing/Gridfinity",
  "tool_bins": {"height_units": 3, "pocket_depth_mm": 10, "clearance_mm": 1.5},
  "notes": ["Symmetric tools must sit symmetrically in the bin"]
}
```

`notes` is free text for standing rules the user gives you ("all bare-tool bins the same height",
"no magnets ever"). Read them and follow them.

### First use: introduce the skill and ask setup questions

If no defaults exist, introduce yourself in a few lines — the user may not know what is possible:

> I can make Gridfinity bins (any size, dividers, labels, scoops), baseplates sized to your drawer,
> holders for batteries/bits/cards, and **custom tool bins from a photo**: print a tracing mat, lay your
> tools on it, snap a picture, and I'll trace them and cut a pocket for each one. First, a few quick
> questions so every part matches your setup — I'll remember the answers.

Then ask (use a multiple-choice question tool if you have one, otherwise plain text; skip anything the
user already told you):

1. **Feet** — standard full-grid feet (one per 42 mm cell) or **half-grid** feet (21 mm; bins can sit at half offsets)? Match what their baseplate supports; default full.
2. **Stacking lip** — yes (bins stack) or no (lower profile, good for drawers)? Default yes.
3. **Magnets/screws in the feet** — none / magnets / magnets + screws? Default none.
4. **Printer bed size** — e.g. 220×220 (Ender/AD5X), 256×256 (Bambu X1/P1/A1), 180×180 (A1 mini), 350×350, other.

Ask these only when the user first wants to trace tools (no need to front-load them):

5. **Paper size for the tracing mat** — Letter / A4 (Legal, A3, Tabloid for long tools).
6. **Fit** — normal 1.5 mm (default) / snug 0.75 mm / loose 2 mm clearance around each tool. Rule of
   thumb: a little loose is fine, too tight ruins the bin — only go below 1.5 mm when the user
   specifically wants a tight fit, and suggest the paper fit check first.
7. **Height limit** — is there a drawer or shelf height to stay under? (store as `max_height_units`; a
   drawer with H mm of clearance fits floor(H/7) units, one less if bins have a lip).

Save the answers right away (memory file, or `gridfinity_defaults.json` + tell the user where), then
mention they can say "change my Gridfinity defaults" any time. When the user later states a new
standing preference, update the same file — don't start a second one.

## 1. Set up the tools (once per session)

```bash
bash <skill-dir>/scripts/setup_env.sh        # prints OPENSCAD=... and GRIDFINITY_LIB=... at the end
export OPENSCAD=... GRIDFINITY_LIB=...       # use the printed values in later commands
```

It installs the Python packages, the **OpenSCAD development snapshot** (the library needs it — the
2021.01 release in most package managers fails with a parser error) and clones
`github.com/ostat/gridfinity_extended_openscad`, then renders a test bin. Linux x86_64 is automatic;
elsewhere, ask the user to install the snapshot from openscad.org/downloads.html#snapshots and set
`OPENSCAD`. If the download is blocked by the network, say so plainly rather than retrying in loops.

## 2. Standard parts — `scripts/make_bin.py`

```bash
python3 scripts/make_bin.py cup --width 2 --depth 1 --height 6 --dividers 3x1 --label \
        --defaults gridfinity_defaults.json --out out/ --name "Screws 2x1x6"
python3 scripts/make_bin.py baseplate --width 5 --depth 4 --split --defaults ... --out out/
python3 scripts/make_bin.py baseplate --set 'outer_Width=[0,385]' --set 'outer_Depth=[0,290]' --split ...   # fill a drawer
python3 scripts/make_bin.py script gridfinity_item_holder.scad --set 'itemholder_known_batteries="aa"' \
        --set 'width=[2,0]' --set 'depth=[1,0]' --out out/ --name "AA holder"
```

Sizes are grid units (42 mm; 0.5 steps work), heights 7 mm units. `--foot`, `--lip/--no-lip`,
`--magnets` override the defaults for one part. Anything else goes through `--set` — see
`references/openscad-params.md` for the variables worth knowing and the other generators.

Translate everyday requests: "a bin for my 30 mm wide sticky notes" → pick the smallest units that fit
(30 mm + walls fits 1 unit); "a baseplate for my 15 × 11 inch drawer" → convert to mm and use
`outer_Width/outer_Depth` so the plate fills the drawer.

The script prints JSON with the STL path, a render PNG, size, `watertight`, and `warnings` (bed fit,
height limit). Read the warnings and look at the render before you deliver.

## 3. Tool bins from a photo — you are the tracer

This is what makes the skill better than a tracing website: **you look at the photo and understand the
tools.** The scripts are your measuring instruments (perspective correction, millimetre-accurate edges,
OpenSCAD geometry); every decision about *what* the tool is, what the outline should be, how the tool
should sit and where fingers go is yours, made by looking. Never hand over a bin you haven't looked at.

### 3a. Give the user a tracing mat
Send `assets/mats/tool_tracing_mat_<paper>.pdf` (letter, a4, legal, a3, tabloid; regenerate any with
`scripts/make_mat.py --paper <name>`). Tell them:
- Print at **100% / Actual size** (not "Fit to page"); the 100 mm bar should measure 100 mm.
- Lay tools flat inside the dashed box, not touching each other or the box edge, in the pose they
  should sit in the bin (pliers closed or open, etc.).
- Photograph straight down, all four corner squares visible, soft even light (no hard shadows). A darker
  table under the sheet lets the script verify the print scale. Step back and zoom 2×.
- Tools longer than the box need the bigger paper (Legal/A3/Tabloid).

### 3b. Look before you trace
Open the photo and study it. For each tool, work out:
- **What it is** — "8-inch lineman pliers", "Phillips #2 screwdriver", "10 mm combination wrench". Use
  this to name the tool and to sanity-check the measured size later (lineman pliers are ~160–240 mm;
  if the trace says 90 mm, something is wrong).
- **Is it mirror-symmetric as it lies?** Pliers, cutters, screwdrivers, files, chisels: yes. Scissors
  (blades overlap), combination and adjustable wrenches (angled heads), utility knives: no. Your call
  beats the measured mirror score — a slightly uneven handle spread doesn't make pliers asymmetric, and a
  near-symmetric wrench still isn't.
- **Which end is the working end** (jaws, tip, blade, head).
- **Thickness** — from what the tool is (pliers ~12–18 mm at the joint, flat wrenches 4–8 mm,
  screwdriver handles 25–35 mm round). Ask the user only if it matters and you can't tell.
- **Trouble spots** — chrome that matches the paper, black parts in shadow, a lanyard or price sticker,
  a tool touching another.

Tell the user briefly what you see ("lineman pliers, about 7.5 in, and a 13 mm combination wrench") —
it's reassuring and catches misunderstandings early.

**Tools with more than one position or setting.** If the tool's shape changes — locking pliers open or
clamped shut, groove-joint/slip-joint pliers, adjustable wrenches, spring clamps and cutters, scissors,
folding tools — ask whether they want the pocket to take it in more than one position. If yes, ask for one
photo at each extreme they actually use (e.g. fully closed and opened as far as they open it; separate
photos, or side by side on one mat with names like `--names "Vise grip closed,Vise grip open"`), trace each,
then combine them:
```bash
python3 scripts/range_outline.py traced/Vise_grip_closed_outline.json traced/Vise_grip_open_outline.json \
        --name "Vise grip (closed to open)" --out traced/        # [--fixed 2=dx,dy,deg] [--flip-search]
```
Each pose is placed on the first by rotation and translation only — never a mirror; the tool lies the same
side up in every photo — choosing the placement that makes the combined shape smallest, so the parts that
don't move overlap. That's a heuristic: **open `<name>_poses.png`, check that the pose overlap matches how
the tool really moves** (pivot on pivot; for locking pliers, the fixed handle and jaw stay together), and
show it to the user. If it lined up the wrong parts, place the pose yourself with `--fixed INPUT=dx,dy,deg`
(1-based input order; mm and degrees CCW in the outline frame). Poses should all have the working end up
before you combine — fix an upside-down one with `trace_tool.py --flip`.
Build with `tool_bin.py ... --fill-gaps "<name>=14"` so the settings in between fit too. The result is a
normal outline (use it in `fit_sheet.py` too); keep the per-pose outlines as well. Place finger scoops where
they work for every pose.

### 3c. Trace, then inspect and correct
```bash
python3 scripts/trace_tool.py photo.jpg --out traced/ --names "Lineman pliers,13mm wrench" \
        --sym "13mm wrench=no" [--flip NAME] [--include "x,y x,y ..."] [--exclude "x,y x,y ..."]
```
Names are assigned left-to-right as the tools lie on the mat. Outputs per tool: the true outline
(no clearance, no scoops; mm, centred, long axis vertical) as `<name>_outline.svg/.dxf/.csv/.json`, a
`<name>_outline.png` picture of it on a grid in its own coordinates, a `_symmetric` version for symmetric
tools, and a `<name>_check.jpg` close-up of the trace over the photo with a 5 mm grid in mat coordinates.
Plus `trace_overview.jpg` (all close-ups side by side — the one to show the user), `trace_check.jpg`,
`trace_grid.jpg` (whole page, 10 mm grid) and `trace_report.json`.

Now inspect, the way a careful person would:
1. **`<name>_check.jpg` for every tool** — does the line hug the real edge all the way round? Look
   closely at jaws, tips, the pivot, chrome, dark rubber, and the shadow side. If something is wrong,
   read the coordinates off the grid and rerun with `--include` (add a missed region — polygon in mat mm)
   or `--exclude` (cut away a shadow, sticker or lanyard). Repeat until it's right; usually 0–2 passes.
   Prefer better segmentation over hand polygons: light silver/chrome is handled by the paper flattening and
   metal-texture detection (on by default; `--texture N` sets the grain threshold, lower finds more,
   `--no-flatten` turns it off); then `--dark`/`--chroma`. When you do use `--include`, read coordinates off
   the labelled grid *lines*, not where the label text sits (a polygon placed by eye from a scaled crop once
   landed 6 mm off), then re-open the close-up and confirm it covers the part without spilling into a jaw mouth.
2. **`<name>_outline.png`** — is the working end up (+y)? If not, `--flip NAME`. Is the shape what the
   tool looks like? Does the symmetric decision match your judgment (`--sym NAME=yes|no`)?
3. **`trace_report.json`** — measured length vs. what you expect for that tool; warnings:
   print scale off >1.5% → reprint at 100%; tool touching the box edge (a straight cut across the tool in
   the check image, and it measures short) → rerun with the `--zone x0,y0,x1,y1` the warning suggests rather
   than asking for a new photo;
   tool missing → `--dark 60 --chroma 12` or `--include`; two tools merged → retake with a gap, or split
   them with an `--exclude` line between them; one tool split in two → `--include` a bridge.

**Always show the user `trace_overview.jpg` — send the image itself, not a description — before you
build any bin, and again after any retrace.** It puts every tool's close-up (photo, outline, 5 mm grid) side
by side. Also send a zoomed crop of anything you corrected or are unsure of (jaws, tips, chrome). Give the
measured sizes and ask them to confirm; their eye on the overlay catches errors you won't.

**Offer a paper fit check** (always offer it the first time someone makes a tool bin, or when they're unsure
about the fit). It costs a sheet of paper instead of an hour of printing:
```bash
python3 scripts/fit_sheet.py traced/Lineman_pliers_outline.json traced/13mm_wrench_outline.json         --defaults gridfinity_defaults.json --out traced/      # [--clearances 0.75,1.5,2] [--paper a4]
```
One PDF page per tool, at true size: the traced silhouette in grey, plus one coloured pocket line per
clearance (snug 0.75 / their saved clearance / loose 2 mm by default), using exactly the pocket shape
`tool_bin.py` will cut. Tell them to print at 100% (check the 100 mm bar), lay the tool on the grey shape,
and tell you which line leaves a small, even gap all round. Use that as `--clearance` and save it as
`clearance_mm` if it's a general preference. If a tool overhangs the grey shape somewhere, the trace is off
there — fix it with `--include` before building.

### 3d. Design the bin
Decide, from what the tools are and how the user will use them (ask only what you can't infer):
- **Grouping** — one bin per tool by default; group tools that are used together or that the user asked
  to keep together. Several outlines in one call share a bin, stacked side by side; to nest them
  head-to-tail or turn one, lay them out yourself with `--place NAME=ROT,X,Y`.
- **Adjustable / springy tools** — `--fill-gaps NAME=R` fills the jaw mouth and the space between handles
  (gaps up to ~2R mm), so the tool still drops in at other settings. Small islands of bin material left
  inside a pocket are removed (`--min-island`, default 150 mm²).
- **Pocket depth** — the tool only has to be held in place, not buried. Default 10 mm. Thin tools: about
  70% of thickness (`--thickness NAME=MM`). Round handles: about half the diameter (`--depth-for NAME=MM`).
  Keep the floors flat — that's what prints well and holds best.
- **Finger scoops** — place them where a hand actually grabs this tool, looking at `<name>_outline.png`
  and reading coordinates in that frame: `--scoop-at "NAME=x,y;x,y"` (scoop centres, usually just
  outside the outline edge). Pliers/cutters: both sides of the head. Screwdrivers, files: both sides of
  the handle. Wrenches: at the shaft middle. Scissors: through a finger loop. A scoop should let a finger
  get under the tool's edge — not sit next to a part that's flush. Use `--scoops auto` only for quick drafts.
```bash
python3 scripts/tool_bin.py traced/Lineman_pliers_outline.json --name "Lineman pliers" \
        --defaults gridfinity_defaults.json --out bins/ --scoops none \
        --scoop-at "Lineman pliers=-16,45;16,45" --fit-test
```
What the script handles: solid bin from the library with the user's feet/lip/magnet settings, pockets =
outline + clearance with a small top chamfer, slivers narrower than 5 mm removed, symmetric tools
aligned on their mirror axis with a perfectly symmetric pocket (people notice a tilted tool instantly),
and the smallest footprint with `wall_mm` of material all round. A bin too long for the bed is split into
side-by-side bins at the grid line where the pocket is narrowest (`--no-split` to turn off).

**Long tools near the bed limit:** scoops at a pocket's ends can push it over (a 182 mm pliers pocket on a
220 mm bed became 5.5 units and split into a useless 0.5-unit sliver plus a 5-unit bin). If the report shows a
split like that, move the scoops to the sides of the handles, or trim any `--include` overreach at the tips,
and rebuild before accepting a split.

### 3e. Check, then deliver
Look at `<name>_bin_render.png` (grey = pocket floor): is every pocket there, are the scoops where you
meant them, does the layout look sensible? Read the report: `watertight`, `warnings` (bed size, height
limit), bin size. Fix and rebuild if anything is off. Stacking-lip bins show the library's anti-slide
notches above dividers — they look like defects in renders; explain them rather than removing them. When a
rebuild changes the footprint (5×3 → 5×3.5), the old STL keeps its old name beside the new one; tell the
user which file is superseded. Then give the user:
- the bin STL, plus the fit-test STL (the top 3 mm of the bin — a 10-minute print to try the fit; offer
  it alongside the paper fit check, it's the next step up),
- the render,
- the outline files (SVG/DXF/CSV/JSON). **Always keep the outlines** — they let the user drop the tool
  into any other bin, layout or program later, and re-tracing a tool is a hassle.

If the user has a place they keep files, save everything per tool (e.g. `<output_folder>/<Tool>/`)
including the photo and `trace_overview.jpg`. The `.scad` file next to the STL references the base STL
beside it, so keep them together; anyone can open it in OpenSCAD and tweak.

### When the print comes back
Ask how it fit, and look at their photo of it if they send one.
- Too tight/loose → adjust `clearance_mm` (save it if it's a general preference). Err loose: an extra
  0.5 mm of slop is barely noticed, a pocket that's too tight is a reprint. To loosen an existing bin
  without retracing, wrap each pocket module in its `.scad` with `offset(r=EXTRA)` — e.g.
  `module cut0() { offset(r=0.75) polygon(...); }` — and re-render (render the bin before its fit-test
  `.scad`, which imports the bin STL).
- Tool sits tilted → symmetric tool not treated as symmetric; rerun with `--sym NAME=yes`.
- Hard to grab → move or add scoops.
Record lessons that apply to all future bins in the defaults `notes`.

## Scripts
| Script | Purpose |
|---|---|
| `setup_env.sh` | install OpenSCAD dev snapshot, library, Python deps; smoke test |
| `make_bin.py` | bins, baseplates, any library generator, with saved defaults applied |
| `make_mat.py` | printable tracing mats (`--paper all`); prebuilt copies in `assets/mats/` |
| `trace_tool.py` | photo → outlines (SVG/DXF/CSV/JSON/PNG) + check images + `trace_overview.jpg`; your corrections via --sym/--flip/--include/--exclude/--zone |
| `range_outline.py` | traces of one tool in several positions/settings → one outline whose pocket takes all of them |
| `fit_sheet.py` | outlines → printable 1:1 PDF with pocket lines at several clearances, to test the fit on paper |
| `tool_bin.py` | outlines → tool bin STL + .scad + render (+ fit test); your scoop spots, depths and layout via --scoop-at/--depth-for/--place/--fill-gaps; splits bins too long for the bed |
| `render_stl.py` | shaded PNG preview of any STL (no GPU needed) |
| `gf_common.py`, `mat_layouts.py` | shared defaults, OpenSCAD runner, mat geometry |

Each script's `--help` has the full option list.

Files in this skill

  • SKILL.md20.1 KB
  • assets/mats/tool_tracing_mat_a3.pdf2.9 KB
  • assets/mats/tool_tracing_mat_a4.pdf2.9 KB
  • assets/mats/tool_tracing_mat_legal.pdf2.9 KB
  • assets/mats/tool_tracing_mat_letter.pdf2.9 KB
  • assets/mats/tool_tracing_mat_tabloid.pdf2.9 KB
  • references/openscad-params.md4.5 KB
  • scripts/fit_sheet.py6.5 KB
  • scripts/gf_common.py4.3 KB
  • scripts/make_bin.py5.1 KB
  • scripts/make_mat.py3 KB
  • scripts/mat_layouts.py1.3 KB
  • scripts/range_outline.py6.2 KB
  • scripts/render_stl.py2.8 KB
  • scripts/setup_env.sh2.8 KB
  • scripts/tool_bin.py15.7 KB
  • scripts/trace_tool.py20.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.