Agent skill

Fragmentation Aware Packing

by benchflow-ai in benchflow-ai/skillsbench

Choose placements that preserve useful residual capacity. An agent skill from benchflow-ai/skillsbench.

Apache-2.0Auto-check passed

Install Fragmentation Aware Packing

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill fragmentation-aware-packing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench fragmentation-aware-packing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks-extra/gpu-cluster-online-scheduling/environment/skills/fragmentation-aware-packing .claude/skills/fragmentation-aware-packing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
fragmentation-aware-packing
GitHub stars
1.8k
Token cost
~983 tokens
SKILL.md length
303 words
Files
1
Skills in repo
189
Repo updated
First seen
Licence
Apache-2.0

At a glance

Choose placements that preserve useful residual capacity. An agent skill from benchflow-ai/skillsbench.

  • Works in 6 steps: Measure current free capacity by… → Copy the target machine or bin state. → Compute fragmentation_before. → …
  • Accelerator placement
  • SKILL.md covers Core Idea, Marginal Fragmentation, Estimating Fragmentation and Intuitive Example, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Fragmentation Aware Packing is an agent skill from benchflow-ai/skillsbench. Choose placements that preserve useful residual capacity. Use for bin packing, GPU sharing, accelerator placement, and multi-resource scheduling where stranded capacity hurts future fit.

Its SKILL.md is about 980 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Accelerator placement
  • Multi-resource scheduling where stranded capacity hurts future fit

Example prompts

  • “/fragmentation-aware-packing”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Measure current free capacity by resource type and slot.
  2. Copy the target machine or bin state.
  3. Compute fragmentation_before.
  4. Apply the candidate placement.
  5. Compute fragmentation_after.
  6. Set marginal_fragmentation = fragmentation_after - fragmentation_before.

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Fragmentation Aware Packing loads about 983 tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 303 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~983

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 303 words, ~983 tokens.

Download SKILL.mdSave it as .claude/skills/fragmentation-aware-packing/SKILL.md (or your agent's skills folder).
name
fragmentation-aware-packing
description
Choose placements that preserve useful residual capacity. Use for bin packing, GPU sharing, accelerator placement, and multi-resource scheduling where stranded capacity hurts future fit.

Fragmentation-Aware Packing

Use this skill when several feasible placements exist and the choice affects future capacity.

Core Idea

A placement is not good just because it fits. Good placements preserve useful residual capacity. With fractional GPUs, this often means packing small compatible jobs together while preserving whole or scarce GPU slots. The same idea applies to any slots, bins, or resources with discrete capacities.

Marginal Fragmentation

For each feasible placement, compute a local before/after estimate:

  1. Measure current free capacity by resource type and slot.
  2. Copy the target machine or bin state.
  3. Compute fragmentation_before.
  4. Apply the candidate placement.
  5. Compute fragmentation_after.
  6. Set marginal_fragmentation = fragmentation_after - fragmentation_before.
text
best = None

for placement in feasible_placements:
  target_before = copy(target_state)
  fragmentation_before = estimate_fragmentation(target_before, workload_types)
  target_after = apply(placement, target_before)
  fragmentation_after = estimate_fragmentation(target_after, workload_types)
  marginal_fragmentation = fragmentation_after - fragmentation_before
  score = weighted_action_score(
    marginal_fragmentation=marginal_fragmentation,
    other_component_deltas=estimate_other_deltas(placement)
  )
  best = lower_score(best, placement, score)

choose best

Respect hard feasibility first. Use marginal_fragmentation as an input to the weighted action score, not as the only decision rule.

Estimating Fragmentation

When workload shape probabilities are available, such as workload_types from cluster_config.json, use them to estimate which free capacity is likely to be useful:

text
fragmentation = 0

for workload_type in workload_types_from_cluster_config:
  if workload_type.gpu_type is incompatible with target.gpu_type:
    continue

  can_fit =
    target.cpu_free >= workload_type.cpu_units
    and target.memory_free >= workload_type.memory_units
    and any(slot.free_gpu_units >= workload_type.gpu_units
            for slot in target.gpu_slots)

  compatible_free_gpu = sum(slot.free_gpu_units for slot in target.gpu_slots)

  if not can_fit:
    fragmentation += workload_type.probability * compatible_free_gpu
  else:
    small_fragments = sum(
      slot.free_gpu_units
      for slot in target.gpu_slots
      if 0 < slot.free_gpu_units < workload_type.gpu_units
    )
    fragmentation += workload_type.probability * small_fragments

Intuitive Example

If two 50-unit GPU jobs can share one 100-unit GPU slot, placing both on the same slot leaves another full slot free. Placing them on two separate slots creates two 50-unit leftovers, which may be harder for future 75- or 100-unit jobs to use.

The same pattern appears outside GPUs: two small tasks may belong in one bin so another bin remains available for a large task. When scores are close, use stable tie-breaks such as urgency, priority, smaller harmless leftovers, and deterministic target order.

Weighted Objective Context

Fragmentation is one objective component. A placement with slightly worse fragmentation may still be better if it substantially improves another weighted component, such as waiting, lateness, resource activation, or unserved-work cost. Conversely, a placement with excellent fragmentation may be bad if it causes a large cost elsewhere.

Use the before/after fragmentation estimate as one delta in a general score:

text
weighted_marginal_score =
  fragmentation_weight * marginal_fragmentation
+ other_weight_1 * delta_other_component_1
+ other_weight_2 * delta_other_component_2
+ deterministic_tie_break

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in tasks-extra/gpu-cluster-online-scheduling/environment/skills/fragmentation-aware-packing of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Fragmentation Aware Packing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Fragmentation Aware Packing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fragmentation Aware Packing this skillbenchflow-ai/skillsbench1.8k—~983Automated safety check: PassApache-2.0
Residuesparcadei/Continuous-Claude-v33.9k1 repos~972Automated safety check: NotesMIT
Capacity Planneralirezarezvani/claude-skills28k—~3kAutomated safety check: PassMIT
Capacity Workload Plannersickn33/agentic-awesome-skills47k1 repos~3.9kAutomated safety check: PassMIT
Esign Field Placementaffaan-m/ECC276k—~2.6kAutomated safety check: PassMIT
Analyzing Packed Malware With Upx Unpackermukul975/Anthropic-Cybersecurity-Skills34k—~3kAutomated safety check: PassApache-2.0

Similar skills

  • Residues

    parcadei/Continuous-Claude-v3

    Problem-solving strategies for residues in complex analysis. An agent skill from parcadei/Continuous-Claude-v3.

    3.9k GitHub starsUsed in 1 repo~972 tokens
    Research & ScienceAuto-check: notes
  • Capacity Planner

    alirezarezvani/claude-skills

    A skill your agent uses when an ops leader (Director of CX, Head of Support, VP Ops, Head of BizOps, Head of IT ops, Head of Finance ops) is sizing ops capacity, building a headcount plan, modeling…

    28k GitHub stars~3k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Capacity Workload Planner

    sickn33/agentic-awesome-skills

    Weekly capacity and workload register: available and allocated hours, utilisation percentage, over-allocation check and leave days.

    47k GitHub starsUsed in 1 repo~3.9k tokens
    Documents & OfficeAuto-check passed
  • Deterministic method for placing signature, date, and text fields in a web e-signature composer through a browser automation session, using a fixed signature page, numeric Location panel coordinates…

    276k GitHub stars~2.6k tokensUpdated 4 days ago
    Productivity & AutomationAuto-check passed
  • Analyzing Packed Malware With Upx Unpacker

    mukul975/Anthropic-Cybersecurity-Skills

    Identifies and unpacks UPX-packed malware samples, including binaries with modified UPX magic bytes or headers that block automated decompression, to recover the original executable for static…

    34k GitHub stars~3k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Preservation Verifier

    conorbronsdon/avoid-ai-writing

    A skill your agent uses when the user provides an original and rewritten version, asks whether a rewrite preserved protected content, or wants a deterministic check for code, frontmatter, quotes…

    4.9k GitHub stars~1.7k tokensUpdated yesterday
    Writing & ContentAuto-check passed

More from benchflow-ai/skillsbench

All 189 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Fragmentation Aware Packing

What does Fragmentation Aware Packing do?

Choose placements that preserve useful residual capacity. An agent skill from benchflow-ai/skillsbench. Fragmentation Aware Packing is an agent skill from benchflow-ai/skillsbench. Choose placements that preserve useful residual capacity.

When should I use Fragmentation Aware Packing?

Fragmentation Aware Packing fits situations like: accelerator placement; multi-resource scheduling where stranded capacity hurts future fit.

How do I install Fragmentation Aware Packing in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill fragmentation-aware-packing -a claude-code`. Or copy the skill folder (tasks-extra/gpu-cluster-online-scheduling/environment/skills/fragmentation-aware-packing in benchflow-ai/skillsbench) into .claude/skills/fragmentation-aware-packing in your project. Claude Code loads it when a task matches its description.

How do I install Fragmentation Aware Packing in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill fragmentation-aware-packing -a codex`. Or copy the skill folder (tasks-extra/gpu-cluster-online-scheduling/environment/skills/fragmentation-aware-packing in benchflow-ai/skillsbench) into .agents/skills/fragmentation-aware-packing in your project. Codex loads it when a task matches its description.

Can I use Fragmentation Aware Packing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill fragmentation-aware-packing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fragmentation-aware-packing, .gemini/skills/fragmentation-aware-packing, .github/skills/fragmentation-aware-packing and .opencode/skills/fragmentation-aware-packing in your project.

What does Fragmentation Aware Packing need to run?

SKILL.md names no scripts, command-line tools or credentials: Fragmentation Aware Packing is instructions for the agent only.

Does Fragmentation Aware Packing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Fragmentation Aware Packing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Fragmentation Aware Packing use?

Fragmentation Aware Packing is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Fragmentation Aware Packing use?

About 983 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Fragmentation Aware Packing?

Skills that share tags, products or a category with Fragmentation Aware Packing: Residues (parcadei/Continuous-Claude-v3, 3.9k stars), Capacity Planner (alirezarezvani/claude-skills, 28k stars), Capacity Workload Planner (sickn33/agentic-awesome-skills, 47k stars) and Esign Field Placement (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fragmentation Aware Packing?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,834 GitHub stars. The repository holds 189 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.