Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

package-fit-optimization

БесплатноБез исполняемых скриптовНе проверен

Select right-sized cartons or mailers for ecommerce orders using package dimensions, constraints, and packing heuristics

finsilabsот finsilabs★ 69 звёзд на GitHub

Об этом скилле

Package Fit Optimization

Overview

Package fit optimization helps merchants choose the smallest safe carton, mailer, or poly bag for each order before rate shopping or label creation. A good implementation reduces dimensional-weight surprises, packing waste, and warehouse exceptions without promising that every order can be optimally packed in real time. Use platform data first, then fall back to conservative defaults and human review when dimensions or fragility rules are incomplete.

When to Use This Skill

  • When adding carton or mailer recommendations to a shipping workflow
  • When dimensional weight is increasing shipping cost for bulky but light SKUs
  • When a warehouse needs packer-facing package suggestions before label purchase
  • When comparing boxes, rigid mailers, padded mailers, and poly bags for ecommerce orders
  • When building batch analysis for catalog cleanup or packaging-cost reduction

Core Instructions

Step 1: Normalize product and package dimensions

Collect dimensions, weight, and handling constraints in one internal unit system before scoring packages.

Input Required? Notes
Product length, width, height Yes for fit scoring Use inches or centimeters consistently; sort dimensions when orientation is flexible
Product weight Yes for rate impact Round up according to the carrier's weight rules before quoting
Fragility / crush risk Recommended Exclude mailers or require padding for fragile items
Nesting / foldability Recommended Apparel, soft goods, and poly bags need different logic from rigid boxes
Available package library Yes Include internal dimensions, max weight, packaging material cost, and allowed formats

For Shopify, use product or variant metafields for dimensions when the theme or shipping app does not already store them. For WooCommerce, use the product shipping fields and custom attributes for fragility or packability. For custom stacks, store normalized dimensions on the SKU and version the package library so recommendations are auditable.

Step 2: Filter impossible packages first

Reject packages before scoring if any hard constraint fails:

  1. The item or order does not fit within the package's internal dimensions after orientation checks.
  2. The total packed weight exceeds the package or fulfillment-process limit.
  3. The package format is disallowed by item rules, such as rigid-only, no-poly, no-envelope, or hazmat separation.
  4. Required void fill, dunnage, or clearance cannot fit.
  5. Multi-item orders require separation or cannot be packed in a single container safely.

Use conservative clearance values when the item dimensions came from a supplier feed or manual import. Missing dimensions should trigger a review state, not a confident recommendation.

Step 3: Score feasible packages by total operational cost

Do not choose the smallest box blindly. Score feasible packages on shipping cost, material cost, packer effort, and exception risk.

type PackageOption = {
  id: string;
  format: 'box' | 'rigid-mailer' | 'padded-mailer' | 'poly-bag';
  innerLengthIn: number;
  innerWidthIn: number;
  innerHeightIn: number;
  emptyWeightOz: number;
  materialCostCents: number;
  maxWeightOz: number;
};

type PackedItem = {
  sku: string;
  lengthIn: number;
  widthIn: number;
  heightIn: number;
  weightOz: number;
  fragile?: boolean;
  allowMailer?: boolean;
};

function dimensionalWeightLb(pkg: PackageOption, divisor = 139): number {
  return Math.ceil((pkg.innerLengthIn * pkg.innerWidthIn * pkg.innerHeightIn) / divisor);
}

function itemFits(item: PackedItem, pkg: PackageOption, clearanceIn = 0.25): boolean {
  const itemDims = [item.lengthIn, item.widthIn, item.heightIn].sort((a, b) => b - a);
  const packageDims = [pkg.innerLengthIn, pkg.innerWidthIn, pkg.innerHeightIn].sort((a, b) => b - a);

  return itemDims.every((dimension, index) => dimension + clearanceIn <= packageDims[index]);
}

function scorePackage(params: {
  item: PackedItem;
  pkg: PackageOption;
  estimatedZoneRateCents: number;
  exceptionPenaltyCents?: number;
}): number {
  const billableWeightLb = Math.max(
    Math.ceil((params.item.weightOz + params.pkg.emptyWeightOz) / 16),
    dimensionalWeightLb(params.pkg)
  );

  return (
    params.estimatedZoneRateCents * billableWeightLb +
    params.pkg.materialCostCents +
    (params.exceptionPenaltyCents ?? 0)
  );
}

function recommendPackage(item: PackedItem, packages: PackageOption[]): PackageOption | null {
  const candidates = packages
    .filter(pkg => itemFits(item, pkg))
    .filter(pkg => item.weightOz + pkg.emptyWeightOz <= pkg.maxWeightOz)
    .filter(pkg => item.allowMailer || pkg.format === 'box')
    .filter(pkg => !item.fragile || pkg.format === 'box');

  return candidates
    .map(pkg => ({
      pkg,
      score: scorePackage({ item, pkg, estimatedZoneRateCents: 95 }),
    }))
    .sort((a, b) => a.score - b.score)[0]?.pkg ?? n
Полный SKILL.md на GitHub

Установить package-fit-optimization в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

claude-code
cursor
gemini-cli
copilot
codex-cli
kiro
opencode

Вложенные файлы

tile.json

FAQ

Что делает скилл package-fit-optimization?

Select right-sized cartons or mailers for ecommerce orders using package dimensions, constraints, and packing heuristics

Как установить скилл package-fit-optimization?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл package-fit-optimization запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить package-fit-optimization с