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.5 $0.00030 $0.00384
Sonnet 5.5 $0.00015 $0.00192
Haiku 4.5 $0.00007 $0.00096

Measured 1mo ago against content hash cf561658fb19, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 3mo ago), licensed MIT. It adds 74 tokens to every session and 959 once invoked, about $0.0003 per session on Opus 5.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 · 105 tokens

archlang-brief-to-plan

Use when the user gives a written brief for a new floor plan (rooms, areas, how rooms connect, a plot size) and wants the drawing, e.g. "design a two-bedroom flat of about 75 m²" or "lay out a small office with four rooms". Writes an ArchLang .arch file from the brief, checks it against the brief with the archlang…

ChanMeng666/archlang · 115 tokens

archlang-edit-plan

Use when the user wants to change an existing ArchLang .arch floor plan, e.g. "make the bedroom 1 m wider", "add a bathroom next to the hall", "move the front door to the south wall", "merge the kitchen into the living room". Reads the plan's facts with the archlang CLI, makes the smallest edit that does the job, and…

ChanMeng666/archlang · 102 tokens

archlang-export

Use when the user wants an ArchLang .arch floor plan delivered as files, e.g. "export this plan as PDF", "give me a DXF for CAD", "a PNG I can paste into a document", "one sheet per floor", "print it at 1:50 on A3". Covers SVG, PNG, PDF and DXF output, paper size and scale, multi-storey plans and batches, all through…

ChanMeng666/archlang · 106 tokens

archlang-review-plan

Use when the user wants an existing ArchLang .arch floor plan checked rather than changed, e.g. "review this plan", "does this layout meet the brief?", "is every room reachable?", "check it for accessibility", "why does lint complain?". Reads the plan's facts, runs the lint profiles and the intent gate through the…

ChanMeng666/archlang · 90 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