2d-bin-packing
When the user wants to pack 2D rectangular items into bins, optimize 2D cutting patterns, or minimize material waste in 2D packing. Also use when the user mentions "2D packing," "rectangular packing," "sheet packing," "2D bin packing problem," "guillotine cutting," "two-dimensional packing," or "rectangle packing optimization." For 1D problems, see 1d-cutting-stock. For 3D problems, see 3d-bin-packing.
npx skills add majiayu000/claude-skill-registry --skill 2d-bin-packing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
The skill acts as an expert in 2D bin packing and rectangular packing optimization, guiding the packing of rectangular items into 2D bins or sheets to minimize waste, number of bins used, or maximize space utilization.
How it works
- It conducts an Initial Assessment to identify problem type, item characteristics, bin/sheet specifications, cutting constraints, and optimization objective.
- It classifies problems into: 2D Bin Packing Problem, 2D Strip Packing Problem, 2D Cutting Stock Problem, Rectangle Packing Problem, or Two-Dimensional Knapsack.
- It provides a Mathematical Formulation for a Basic 2D Bin Packing Model, including decision variables (x_i, y_i, b_i, w_j, r_i), an objective to minimize total bins, and constraints for assignment, fitting, and non-overlap (noting that the non-overlap constraint is described as simplified).
- It offers Algorithms and Solution Methods with both exact methods (Branch and Bound; Integer Programming Formulation) and heuristic methods (FFDH, NFDH, BFDH, and a Guillotine Algorithm). The content includes code snippets for an IP approach and several heuristic implementations, detailing their approach (sorting by height, shelf concepts, best-fit shelf selection, and guillotine cut strategies).
- It presents an Example-like structure for an IP solver function solve_2d_bin_packing_ip and heuristic functions first_fit_decreasing_height, best_fit_decreasing_height, and guillotine_algorithm, including supporting utility functions like calculate_utilization.
When to use it
- Use when packing 2D rectangular items into bins, optimizing cutting patterns, or minimizing material waste. The description enumerates scenarios and keywords such as "2D packing," "rectangular packing," "sheet packing," "2D bin packing problem," "guillotine cutting," "two-dimensional packing," or "rectangle packing optimization." For 1D or 3D problems it points to other skills.
What it can touch
- The skill references tools under declared tools: claude-code. It includes code blocks and function definitions for IP-based solving and heuristics, including Python code samples and class definitions used in guillotine-based methods.
Caveats
- It notes the problem is NP-hard and that certain formulations are simplified (non-overlap constraints noted as simplified). It mentions practical limits for exact methods (e.g., Branch and Bound is practical for small problems). The license is MIT, and the repository origin is majiayu000/claude-skill-registry.
# 2D Bin Packing You are an expert in 2D bin packing and rectangular packing optimization. Your goal is to help pack rectangular items into 2D bins or sheets while minimizing waste, number of bins used, or maximizing space utilization. ## Initial Assessment Before solving 2D bin packing problems, understand: 1. **Problem Type** - Pack into fixed-size bins (minimize bins used)? - Pack into variable-size bins (minimize total area)? - Single large bin (maximize utilization)? - Cutting from sheets (minimize waste)? 2. **Item Characteristics** - How many items to pack? (10s, 100s, 1000s) - Item dimensions: width x height - Can items be rotated? (90-degree rotation allowed?) - Are items all different or some identical? - Any item priorities or grouping requirements? 3. **Bin/Sheet Specifications** - Bin dimensions: width x height - Fixed or variable bin sizes? - Unlimited bins or limited quantity? - Any margin/spacing requirements between items? 4. **Cutting Constraints** - Guillotine cuts only? (straight cuts across entire sheet) - Free-form packing allowed? - Maximum number of cutting stages? - Trim loss acceptable? 5. **Optimization Objective** - Minimize number of bins used? - Minimi
- Initial Assessment
- 2D Bin Packing Framework
- Problem Classification
- Mathematical Formulation
- Basic 2D Bin Packing Model
- Algorithms and Solution Methods
- Exact Methods
- Heuristic Methods
- Metaheuristic Methods
- Complete 2D Bin Packing Solver
- Tools & Libraries
- Python Libraries
- Commercial Software
- Common Challenges & Solutions
What does the 2d-bin-packing skill do?
When the user wants to pack 2D rectangular items into bins, optimize 2D cutting patterns, or minimize material waste in 2D packing. Also use when the user mentions "2D packing," "rectangular packing," "sheet packing," "2D bin packing problem," "guillotine cutting," "two-dimensional packing," or "rectangle packing optimization." For 1D problems, see 1d-cutting-stock. For 3D problems, see 3d-bin-packing.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill 2d-bin-packing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
