pyfit

pyfit is a skill for Claude Code, Codex from badass-data-science/pyFit-agentic-polygon-nesting. It costs 74 tokens per session (959 once invoked), scanned A, original, MIT.

A tool for arranging irregular 2D shapes on rectangular sheets of material while reducing unused space. It can read DXF outlines and export DXF files ready for cutting, along with a placement report; DXF is a common CAD drawing format.

In plain words
What is it for?
Use it to nest parts on plywood, acrylic, sheet metal, or similar stock for a laser cutter or CNC router, and to produce cut-ready files.
Why use it?
It helps plan material usage and determine how many parts fit on a sheet before cutting.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to nest parts on plywood, acrylic, sheet metal, or similar stock for a laser cutter or CNC router, and to produce cut-ready files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/badass-data-science/pyfit-agentic-polygon-nesting/pyfit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add badass-data-science/pyFit-agentic-polygon-nesting --skill pyfit
Clone the repo
git clone --depth 1 https://github.com/badass-data-science/pyFit-agentic-polygon-nesting

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pyfit

README.md
[![agentmods](https://agentmods.dev/badge/skills/badass-data-science/pyfit-agentic-polygon-nesting/pyfit/github.svg)](https://agentmods.dev/skills/badass-data-science/pyfit-agentic-polygon-nesting/pyfit)
Your own site
<a href="https://agentmods.dev/skills/badass-data-science/pyfit-agentic-polygon-nesting/pyfit"><img src="https://agentmods.dev/badge/skills/badass-data-science/pyfit-agentic-polygon-nesting/pyfit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pyfit

Your own site · 80×15
<a href="https://agentmods.dev/skills/badass-data-science/pyfit-agentic-polygon-nesting/pyfit"><img src="https://agentmods.dev/badge/skills/badass-data-science/pyfit-agentic-polygon-nesting/pyfit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.00959
Opus 5 $0.00037 $0.00479
Sonnet 5 $0.00015 $0.00192
Haiku 4.5 $0.00007 $0.00096

Measured 8d ago against content hash cf561658fb19, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pyfit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pyfit/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pyfit is a general-purpose 2D irregular-polygon nesting (bin-packing) tool: given a set of 2D shapes and how many of each are needed, it arranges them onto rectangular sheet stock with minimal wasted material, via a no-fit-polygon bottom-left-fill heuristic. It reads part outlines from DXF files or inline polygons and writes one ready-to-cut DXF file per sheet used, plus a JSON placement report.

Not installed as a bundled OpenClaw skill dependency — install it first:

pip install pyfit-agentic-polygon-nesting

(The distribution name is pyfit-agentic-polygon-nesting; the installed command is pyfit.)

When to use this

Reach for pyfit whenever the user wants to:

  • Figure out how to arrange/pack/nest a set of 2D shapes onto sheet stock with minimal wasted material.
  • Know how many copies of a shape fit on a sheet of a given size.
  • Produce cut-ready DXF files for a laser cutter or CNC router from a list of part outlines.

Running a job

  1. Write a job spec JSON file describing the sheet size and the parts to nest:

    {
      "sheet": {"width": 96, "height": 48},
      "parts": [
        {"name": "shapeA", "dxf": "facetype1.dxf", "quantity": 120, "allow_mirror": true},
        {"name": "shapeB", "polygon": [[0, 0], [1, 0], [0, 1]], "quantity": 10, "allow_mirror": false}
      ]
    }
    

    Each part gives its outline either as "dxf" (a path to a DXF file containing exactly one closed loop) or "polygon" (an inline list of [x, y] points), a "quantity", and optionally "allow_mirror" (default true; set false for chirality-sensitive material, e.g. wood grain or a printed pattern, where a mirror-image placement isn't interchangeable with the original).

  2. Run it:

    pyfit -j job.json -o output/nest
    

    Writes output/nest_sheet1.dxf, output/nest_sheet2.dxf, ... (one file per sheet actually used) plus output/nest_report.json, and prints the same report as JSON to stdout. Add -P/--preview to also write a quick 2D preview PNG per sheet (output/nest_sheet1.png, ...) for a fast sanity check without opening a DXF viewer.

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 91 lines · 74 tokens per session scan A cf561658fb19

Subscribe to this mod's changes

pyfit is a skill published in the GitHub repository badass-data-science/pyFit-agentic-polygon-nesting (0 stars, last pushed 1mo ago), licensed MIT. It adds 74 tokens to every session and 959 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

archlang

Use when the user wants to create, edit, or inspect an architectural floor plan / building layout as code — e.g. "draw a 2-bedroom apartment", "add a bathroom to this plan", "make the bedroom 1 m wider", "lay out an office floor". ArchLang is a tiny text language that compiles a .arch file to a professional floor-plan…

ChanMeng666/archlang · 104 tokens

continuum-fea

Run the continuum (tier-3) FEA on a part a beam model can't capture — bracket, fitting, lug, hull bottom panel, pressure shell, sponson root — with gmsh + CalculiX (ccx). Use when an audit's analytic check or the in-house beam FEA is too coarse and you need a real 3-D stress/displacement or buckling field. Drives the…

JMMonte/agentic-digital-twin · 136 tokens

add-scored-audit

Add a new executable scored check (PASS/WARN/FAIL) for a requirement to a hardware-as-code project's audit harness. Use when a requirement, clearance, mass budget, margin, or anchor needs to be verified automatically. Enforces the rules: read the build's exported JSON artifacts, never duplicate a geometry constant…

JMMonte/agentic-digital-twin · 88 tokens

import-cad

Bring an EXISTING CAD file (STEP/.stp, or STL/OBJ/GLB/PLY mesh) into the hardware-as-code pipeline so it can be verified and simulated — the "I already have the CAD" path, as opposed to authoring geometry as code. Use when the user provides a CAD/mesh file and wants audits, FEA, CFD, mass/CG, clearances, or rerun viz…

JMMonte/agentic-digital-twin · 155 tokens

manufacturability-loop

Drive the automation-agent manufacturability/packaging loop for a hardware-as-code project: an agent authors engineering judgment (decomposition into fabricated vs COTS, placements, harness, sourcing) and automation scores it (skin containment, envelope collisions, mass closure, CG, retrieval corridors), looping until…

JMMonte/agentic-digital-twin · 89 tokens

add-material

Add or edit a material in a hardware-as-code project's cited material source-of-truth (design/materials.json). Use whenever an analysis needs a material property (density, modulus, Poisson, yield/ultimate strength, composite lamina properties) — instead of letting the model invent one. Enforces: NEVER hallucinate…

JMMonte/agentic-digital-twin · 131 tokens