Agent skill

Ordered Window Sequencing Mip

by benchflow-ai in benchflow-ai/skillsbench

Permutation and sequencing integer-programming formulations with ordered local-window variables, prefix/suffix continuity, and overlap penalties.

Apache-2.0Auto-check passed

Install Ordered Window Sequencing Mip

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill ordered-window-sequencing-mip -a claude-code

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

GitHub CLI
$ gh skill install benchflow-ai/skillsbench ordered-window-sequencing-mip --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/exam-block-sequencing/environment/skills/ordered-window-sequencing-mip .claude/skills/ordered-window-sequencing-mip && 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
ordered-window-sequencing-mip
GitHub stars
1.8k
Token cost
~2.7k tokens
SKILL.md length
1,227 words
Files
1
Skills in repo
178
Repo updated
First seen
Licence
Apache-2.0

At a glance

Permutation and sequencing integer-programming formulations with ordered local-window variables, prefix/suffix continuity, and overlap penalties.

  • Works in 8 steps: Identify the ordered positions: periods,… → Identify the items to place: jobs,… → Decide which binary variables match the… → …
  • Assigning exams
  • SKILL.md covers Core idea, Modeling workflow, Preserve ordered tuple data and Assignment-linked local windows, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Ordered Window Sequencing Mip is an agent skill from benchflow-ai/skillsbench. Permutation and sequencing integer-programming formulations with ordered local-window variables, prefix/suffix continuity, and overlap penalties. Use when assigning exams, jobs, tasks, visits, blocks, or resources to ordered positions and costs depend on adjacent pairs, sliding triples, n-grams, short-horizon pressure, or overlapping local patterns.

Its SKILL.md is about 2.7k 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

  • Assigning exams
  • Resources to ordered positions and costs depend on adjacent pairs
  • Sliding triples
  • Short-horizon pressure

Example prompts

  • “/ordered-window-sequencing-mip”

Requirements

  • Python 3

Workflow steps

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

  1. Identify the ordered positions: periods, route stops, sequence indices, slots,
  2. Identify the items to place: jobs, exams, blocks, visits, tasks, resources, or
  3. Decide which binary variables match the objective structure
  4. Add hard feasibility constraints before optimizing: each item appears exactly
  5. Add auxiliary variables for adjacent pairs, sliding triples, longer windows,
  6. Link auxiliary variables tightly to the primary sequence representation.
  7. Build named objective components and minimize the weighted sum defined by the
  8. Extract the final sequence and audit the objective independently.

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 (its code samples are python).

    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

Ordered Window Sequencing Mip loads about 2.7k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 1,227 words of instructions outside code blocks.

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

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). 1,227 words, ~2,727 tokens.

Download SKILL.mdSave it as .claude/skills/ordered-window-sequencing-mip/SKILL.md (or your agent's skills folder).
name
ordered-window-sequencing-mip
description
Permutation and sequencing integer-programming formulations with ordered local-window variables, prefix/suffix continuity, and overlap penalties. Use when assigning exams, jobs, tasks, visits, blocks, or resources to ordered positions and costs depend on adjacent pairs, sliding triples, n-grams, short-horizon pressure, or overlapping local patterns.

Ordered-Window Sequencing MIPs

Core idea

When a sequencing objective depends on neighboring ordered patterns, a plain item-position assignment model may be too weak or too easy to linearize incorrectly. Model the local ordered patterns that the objective scores, then link those patterns so they form one consistent sequence.

Use this pattern for schedules, routes, job orders, block sequences, timetables, shift plans, and other ordered assignments where costs depend on adjacent pairs, sliding windows, or overlapping local events.

Modeling workflow

  1. Identify the ordered positions: periods, route stops, sequence indices, slots, machine positions, or service windows.
  2. Identify the items to place: jobs, exams, blocks, visits, tasks, resources, or customer groups.
  3. Decide which binary variables match the objective structure:
    • assignment variables for item-position placement;
    • arc variables for predecessor-successor relationships;
    • ordered-window variables for local patterns of length two or more.
  4. Add hard feasibility constraints before optimizing: each item appears exactly as required, each required position is filled, invalid placements are blocked, and local windows cannot contain repeated items unless repeats are allowed.
  5. Add auxiliary variables for adjacent pairs, sliding triples, longer windows, or overlapping local patterns.
  6. Link auxiliary variables tightly to the primary sequence representation.
  7. Build named objective components and minimize the weighted sum defined by the instance.
  8. Extract the final sequence and audit the objective independently.

Preserve ordered tuple data

Treat tuple-indexed costs or counts as ordered unless the task explicitly says they are unordered. A schedule induces direction through the order of positions.

For a window beginning at position t, use the tuple in sequence order:

python
pair_key = (item_at[t], item_at[next_t])
triple_key = (item_at[t], item_at[next_t], item_at[next_next_t])

Do not sort, canonicalize, symmetrize, or aggregate tuple keys unless the task says the data are unordered:

python
# Wrong for directed or ordered sequence costs unless explicitly allowed.
key = tuple(sorted((a, b, c)))

Sorting tuple keys can turn a directed sequence objective into a different unordered objective.

Before coding the objective, inspect the data schema and write down the tuple semantics you will use:

  • If rows are keyed as (i, j) or (i, j, k), the safe default is ordered.
  • Do not add reverse pairs, sorted triples, or all permutations unless the source explicitly says the table is symmetric or unordered.
  • If the table contains both (i, j) and (j, i), that does not by itself mean both should be summed for one ordered window. It may simply be a complete ordered table.
  • If tuple rows are missing, decide from the task/data whether missing means zero, invalid, or impossible before optimizing.

For each objective component, implement one small evaluator expression that matches the component definition exactly:

python
component = 0
for start in eligible_starts:
    key = tuple(item_at_position(start, offset) for offset in offsets)
    component += weight_table.get(key, 0)

Use this evaluator as the reference for both optimization checks and final metrics.

Assignment-linked local windows

If using assignment variables,

text
assign[i, t] = 1 if item i is assigned to ordered position t

then create a local-window indicator for each ordered tuple and eligible start position. For a length-3 window:

text
window[i, j, k, t] = 1 if i, j, k occupy positions t, next(t), next(next(t))

A standard linearization is:

python
window[i, j, k, t] <= assign[i, t]
window[i, j, k, t] <= assign[j, next_t]
window[i, j, k, t] <= assign[k, next_next_t]
window[i, j, k, t] >= assign[i, t] + assign[j, next_t] + assign[k, next_next_t] - 2

Use the same pattern for adjacent pairs or longer local windows. Create only eligible starts when the task defines a start-position mask.

Direct ordered-window model

Some sequencing problems are cleaner with ordered-window variables as the main sequence representation:

text
W[t, a1, a2, ..., ar] = 1

meaning that the ordered tuple (a1, a2, ..., ar) starts at position t. This is useful when the objective primarily scores sliding windows and their overlaps.

Typical constraint families are:

  • exactly one selected window at each eligible start;
  • each item appears the required number of times in each position role;
  • local windows with repeated items are prohibited when the sequence is a permutation;
  • neighboring windows agree on their shared items.

Prefix/suffix continuity

Adjacent local windows must describe one consistent global sequence. For a length-r window, the suffix of the window at t should match the prefix of the window at next(t).

Generic continuity template:

text
sum over a0 of W[t, a0, q1, ..., q_{r-1}]
=
sum over ar of W[next(t), q1, ..., q_{r-1}, ar]

for each shared ordered suffix/prefix (q1, ..., q_{r-1}).

Use cyclic wraparound only when the source formulation or task definition makes the sequence cyclic. Otherwise handle the first and last positions with explicit boundary logic. Even in a cyclic model, reporting metrics may use only the start positions declared eligible by the instance.

Overlap penalties

If the objective penalizes two or more overlapping local patterns, introduce an overlap indicator or an equivalent linearization. Do not replace an ordered overlap rule with an unordered span count or with all combinations inside a larger window unless the task defines that rule.

For two overlapping local patterns represented by A and B, use:

python
overlap <= A
overlap <= B
overlap >= A + B - 1

Then attach the instance-defined ordered cost to overlap. Keep the overlap term inside the optimized model whenever it is part of the objective. Optimizing a reduced model and adding the omitted high-order penalty afterward usually optimizes a different problem.

When the prose mentions pressure, overlap, or "three in four" behavior, pause and distinguish these common but different definitions:

  • all unordered triples contained in a four-position span;
  • ordered triples whose positions have span at most four;
  • pairs of adjacent active three-position windows sharing positions;
  • explicit auxiliary variables from a source formulation.

These are not interchangeable. Use only the definition implied by the supplied starts, successor rules, variables, or verifier-style wording.

Show full SKILL.md (416 more words)Show less

Active-pattern overlap rule

For overlap penalties, first ask: "What lower-order pattern must be active?" Do not infer an overlap term as "all combinations inside a wider window" unless the task explicitly defines it that way.

Use this workflow:

  1. Build the active set of primitive ordered patterns.
  2. Check overlap through membership in that active set.
  3. Add only the cost specified for that overlapping pattern pair.

Generic template:

python
active = set()
for start in eligible_starts:
    active.add(tuple(item_at_position(start, offset) for offset in primitive_offsets))

overlap_count = 0
for extended_tuple in candidate_extended_tuples:
    left = primitive_left(extended_tuple)
    right = primitive_right(extended_tuple)
    if left in active and right in active:
        overlap_count += overlap_cost(extended_tuple, left, right)

Common wrong shortcut:

python
for window in all_length_4_windows:
    for triple in combinations(window, 3):
        overlap_count += triplet_count[triple]

That shortcut is correct only when the objective explicitly says the overlap term is all triples contained in each length-4 window.

Before implementing any overlap term, write down:

  • primitive pattern;
  • active-start set;
  • overlap membership rule;
  • overlap cost formula.

Start-position masks and boundary rules

Many sequencing objectives score only certain starts, such as same-shift starts, calendar-day starts, route-leg starts, or valid short-horizon starts. Keep these masks separate from the tuple weights.

A reliable pattern is:

python
for start in eligible_starts[component_name]:
    ordered_tuple = tuple(item_at_position(start, offset) for offset in offsets)
    component += weight_table.get(ordered_tuple, 0)

Do not infer additional boundary windows from prose. Use the starts, successor rules, and component definitions supplied by the instance.

If the ordered positions are labeled, do not assume labels are contiguous integers unless the instance says so. Build a successor map from the declared ordered position list:

python
ordered_positions = list(instance["all_positions"])
successor = {
    pos: ordered_positions[idx + 1]
    for idx, pos in enumerate(ordered_positions[:-1])
}

Then evaluate windows by following the successor relation. This avoids mixing up slot labels with zero-based array positions.

Objective semantics audit

Before finalizing a model or heuristic, answer these questions in code comments or the formulation:

  • What is the ordered sequence being produced?
  • Are pair and tuple tables ordered, unordered, or explicitly symmetric?
  • Which start positions are eligible for each component?
  • What successor relation defines "next"?
  • Are overlap terms all subsets, active overlapping windows, or explicit variables?
  • Are missing tuple rows zero or invalid?

Then create a pure evaluate(sequence, data) function before writing outputs. The evaluator must depend only on input data and the final sequence, not solver variables. Use it to audit any solution found by a solver or local search.

Common mistakes

  • Modeling unordered combinations when the objective is ordered.
  • Sorting or symmetrizing tuple keys without permission.
  • Summing both directions of a pair because both rows exist in the input.
  • Summing every permutation of a triplet because the data table is complete.
  • Counting every combination inside a larger horizon instead of the defined sliding or overlapping windows.
  • Confusing position labels with zero-based array indices.
  • Creating window variables but forgetting no-repetition restrictions.
  • Creating auxiliary variables without lower-bound linking constraints.
  • Applying cyclic wraparound to reported metrics when only the model continuity is cyclic.
  • Dropping high-order objective terms to make the model smaller.

© 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/exam-block-sequencing/environment/skills/ordered-window-sequencing-mip of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Ordered Window Sequencing Mip 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.

Ordered Window Sequencing Mip compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ordered Window Sequencing Mip this skillbenchflow-ai/skillsbench1.8k—~2.7kAutomated safety check: PassApache-2.0
Windows Desktop E2Eaffaan-m/ECC275k1 repos~7.6kAutomated safety check: PassMIT
Windows Desktop E2Eaffaan-m/ECC275k—~5.5kAutomated safety check: PassMIT
CSS Orderthedaviddias/Front-End-Checklist74k—~404Automated safety check: PassMIT
Focus Orderthedaviddias/Front-End-Checklist74k—~519Automated safety check: PassMIT
Heading Orderthedaviddias/Front-End-Checklist74k—~452Automated safety check: PassMIT

Similar skills

  • E2E testing for Windows native desktop apps (WPF, WinForms, Win32/MFC, Qt) using pywinauto and Windows UI Automation.

    275k GitHub starsUsed in 1 repo~7.6k tokens
    Testing & QAAuto-check passed
  • E2E testing for Windows native desktop apps (WPF, WinForms, Win32/MFC, Qt) using pywinauto and Windows UI Automation.

    275k GitHub stars~5.5k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • CSS Order

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing stylesheets, component styles, and responsive behavior related to Order CSS files correctly.

    74k GitHub stars~404 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Focus Order

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Ensure logical focus order.

    74k GitHub stars~519 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Heading Order

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing rendered HTML, interactive components, or design-system patterns related to Maintain logical heading order.

    74k GitHub stars~452 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Food Ordering

    asgeirtj/system_prompts_leaks

    Prepare restaurant food orders for delivery or pickup; use for cart, checkout and tracking.

    69k GitHub stars~1.4k tokensUpdated today
    Auto-check passed

More from benchflow-ai/skillsbench

All 178 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 Ordered Window Sequencing Mip

What does Ordered Window Sequencing Mip do?

Permutation and sequencing integer-programming formulations with ordered local-window variables, prefix/suffix continuity, and overlap penalties. Ordered Window Sequencing Mip is an agent skill from benchflow-ai/skillsbench. Permutation and sequencing integer-programming formulations with ordered local-window variables, prefix/suffix continuity, and overlap penalties.

When should I use Ordered Window Sequencing Mip?

Ordered Window Sequencing Mip fits situations like: assigning exams; resources to ordered positions and costs depend on adjacent pairs; sliding triples; short-horizon pressure.

How do I install Ordered Window Sequencing Mip in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill ordered-window-sequencing-mip -a claude-code`. Or copy the skill folder (tasks/exam-block-sequencing/environment/skills/ordered-window-sequencing-mip in benchflow-ai/skillsbench) into .claude/skills/ordered-window-sequencing-mip in your project. Claude Code loads it when a task matches its description.

How do I install Ordered Window Sequencing Mip in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill ordered-window-sequencing-mip -a codex`. Or copy the skill folder (tasks/exam-block-sequencing/environment/skills/ordered-window-sequencing-mip in benchflow-ai/skillsbench) into .agents/skills/ordered-window-sequencing-mip in your project. Codex loads it when a task matches its description.

Can I use Ordered Window Sequencing Mip 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 ordered-window-sequencing-mip -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ordered-window-sequencing-mip, .gemini/skills/ordered-window-sequencing-mip, .github/skills/ordered-window-sequencing-mip and .opencode/skills/ordered-window-sequencing-mip in your project.

What does Ordered Window Sequencing Mip need to run?

SKILL.md names no scripts, command-line tools or credentials: Ordered Window Sequencing Mip is instructions for the agent only. Our summary lists: Python 3.

Does Ordered Window Sequencing Mip 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 Ordered Window Sequencing Mip 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 Ordered Window Sequencing Mip use?

Ordered Window Sequencing Mip 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 Ordered Window Sequencing Mip use?

About 2.7k tokens (SKILL.md is roughly 11k 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 Ordered Window Sequencing Mip?

Skills that share tags, products or a category with Ordered Window Sequencing Mip: Windows Desktop E2E (affaan-m/ECC, 275k stars), Windows Desktop E2E (affaan-m/ECC, 275k stars), CSS Order (thedaviddias/Front-End-Checklist, 74k stars) and Focus Order (thedaviddias/Front-End-Checklist, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ordered Window Sequencing Mip?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 178 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.