Agent skill

Logistics Rules To Optimization

by Raidriar7170 in Raidriar7170/hermes-skilleval

Translate logistics and operations rules into optimization variables and constraints.

MITAuto-check passedWriting & Content

Install Logistics Rules To Optimization

skills CLI
$ npx skills add Raidriar7170/hermes-skilleval --skill logistics-rules-to-optimization -a claude-code

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

GitHub CLI
$ gh skill install Raidriar7170/hermes-skilleval logistics-rules-to-optimization --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/Raidriar7170/hermes-skilleval.git skills-src && mkdir -p .claude/skills && cp -r skills-src/artifacts/v0.3/skillsbench-pilot/v0.3-stage2-input-package-candidate-20260701T010000Z/candidate-data/skill-sources/skillsbench__logistics-rules-to-optimization .claude/skills/logistics-rules-to-optimization && 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
logistics-rules-to-optimization
GitHub stars
125
Used in
1 other repo
Token cost
~2.8k tokens
SKILL.md length
696 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Translate logistics and operations rules into optimization variables and constraints.

  • Works in 5 steps: List the entities. → Choose the decision state. → Convert each business rule into one of… → …
  • An operations problem describes vehicles
  • SKILL.md covers Rule Translation Workflow, Variable Patterns, Common Logistics Rules and Constraint Examples, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Logistics Rules To Optimization is an agent skill from Raidriar7170/hermes-skilleval. Translate logistics and operations rules into optimization variables and constraints. Use when an operations problem describes vehicles, routes, depots, pickups, dropoffs, inventory, capacity, assignments, time windows, service targets, penalties, resource limits, or other business rules that need to become an optimization model.

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

It sits in Writing & Content, covering Translation. The repository describes itself as: Verification-gated skill routing and self-improvement harness for Hermes-style agent skills. The licence is MIT.

When your agent uses it

  • An operations problem describes vehicles
  • Service targets
  • Resource limits
  • Other business rules that need to become an optimization model

Example prompts

  • “/logistics-rules-to-optimization”

Requirements

  • Python 3

Workflow steps

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

  1. List the entities.
  2. Choose the decision state.
  3. Convert each business rule into one of these patterns.
  4. Add the objective last.
  5. Extract and independently validate the answer.

What it can do on your machine

Read from SKILL.md and the folder at commit 8f6a21e. 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

Logistics Rules To Optimization loads about 2.8k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 696 words of instructions outside code blocks.

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

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 Raidriar7170/hermes-skilleval at commit 8f6a21e, republished under its MIT licence (© Raidriar7170). 696 words, ~2,754 tokens.

Download SKILL.mdSave it as .claude/skills/logistics-rules-to-optimization/SKILL.md (or your agent's skills folder).
name
logistics-rules-to-optimization
description
Translate logistics and operations rules into optimization variables and constraints. Use when an operations problem describes vehicles, routes, depots, pickups, dropoffs, inventory, capacity, assignments, time windows, service targets, penalties, resource limits, or other business rules that need to become an optimization model.

Logistics Rules To Optimization

Use this skill when the problem statement gives operational rules in words and the agent must turn them into an optimization model.

The goal is not only routing. The same translation pattern applies to transportation, dispatch, rebalancing, warehouse moves, staffing, scheduling, assignment, capacity planning, production, and service-level problems.

Rule Translation Workflow

  1. List the entities.

    • Examples: vehicles, locations, depots, jobs, workers, machines, products, arcs, time periods.
  2. Choose the decision state.

    • Binary variables for yes/no choices.
    • Integer variables for counts, loads, inventory, units moved.
    • Continuous variables for time, flow, cost, utilization, or fractional quantities.
  3. Convert each business rule into one of these patterns.

    • Conservation: what enters equals what leaves, plus/minus changes.
    • Capacity: quantity cannot exceed a limit.
    • Linking: a quantity is allowed only if a binary decision is active.
    • Assignment: exactly one, at most one, or at least one choice.
    • Sequence: if one action follows another, update load/time/state.
    • Compatibility: prohibit impossible combinations.
    • Soft penalty: add slack for unmet demand or violation cost.
  4. Add the objective last.

    • Keep named components such as travel cost, labor cost, inventory penalty, unmet demand penalty.
  5. Extract and independently validate the answer.

    • Recompute routes, loads, assignments, inventory, penalties, and objective from the output data.

Variable Patterns

Selection and Assignment

Use binary variables when an option is selected.

python
x = {(i, j): model.addVar(vtype="B", name=f"x_{i}_{j}") for i in I for j in J}

Common rules:

python
# each item i assigned to exactly one option j
for i in I:
    model.addCons(quicksum(x[i, j] for j in J) == 1)

# option j can handle at most capacity[j] items
for j in J:
    model.addCons(quicksum(x[i, j] for i in I) <= capacity[j])
Route Arcs

Use binary arc variables when the order of visits matters.

python
x = {
    (v, i, j): model.addVar(vtype="B", name=f"x_{v}_{i}_{j}")
    for v in vehicles
    for i, j in arcs
}

Use x[v, i, j] = 1 to mean vehicle/resource v goes directly from node i to node j.

Visit Indicator

Define visit from route arcs instead of creating a second binary unless the model needs it repeatedly.

python
visit = quicksum(x[v, i, j] for j in to_nodes if j != i)

If a standalone variable is useful:

python
visit = {(v, i): model.addVar(vtype="B", name=f"visit_{v}_{i}") for v in vehicles for i in locations}

for v in vehicles:
    for i in locations:
        model.addCons(visit[v, i] == quicksum(x[v, i, j] for j in to_nodes if j != i))
Quantity, Load, Inventory, and Time
python
load = {(v, i): model.addVar(vtype="I", lb=0, ub=vehicle_capacity, name=f"load_{v}_{i}") for v in vehicles for i in nodes}
service = {(v, i): model.addVar(vtype="I", lb=-vehicle_capacity, ub=vehicle_capacity, name=f"service_{v}_{i}") for v in vehicles for i in locations}
inventory = {(i, t): model.addVar(vtype="I", lb=0, ub=storage_capacity[i], name=f"inventory_{i}_{t}") for i in locations for t in periods}
arrival = {(v, i): model.addVar(vtype="C", lb=0, name=f"arrival_{v}_{i}") for v in vehicles for i in nodes}

Use integer variables for physical unit counts when the output must be integer-valued.

Common Logistics Rules

Business RuleVariable ChoiceConstraint Pattern
Choose exactly one optionx[i,j] binarysum_j x[i,j] == 1
Choose at most one optionx[i,j] binarysum_j x[i,j] <= 1
Open facility before assigning to itopen[j], assign[i,j] binaryassign[i,j] <= open[j]
Resource capacityquantity variablesum_i q[i,j] <= capacity[j]
Quantity only if selectedq[i], use[i]q[i] <= M * use[i]
Fixed cost if useduse[i] binaryadd fixed_cost[i] * use[i] to objective
Mutually exclusive modesmode binariessum_m mode[i,m] <= 1
Incompatible pairtwo binariesx[a] + x[b] <= 1
Demand must be metflow/quantitysupply_to[i] >= demand[i]
Demand may be unmetnonnegative slackserved[i] + unmet[i] >= demand[i]
Absolute deviation penaltynonnegative slackactual-target <= dev, target-actual <= dev
Inventory balanceinventory variablesinv[t+1] = inv[t] + inbound - outbound
Station/storage upper boundinventory variableinv[i,t] <= capacity[i]
Cannot remove unavailable stockmove variableoutbound[i,t] <= inv[i,t]
Vehicle starts at depotarc variablessum_j x[v, START, j] == use_vehicle[v]
Vehicle ends at depotarc variablessum_i x[v, i, END] == use_vehicle[v]
Route continuityarc variablesincoming[v,i] == outgoing[v,i]
Visit at most oncearc variablesoutgoing[v,i] <= 1
Split service allowedarc/quantity variablesomit global single-visit; aggregate quantities over resources
Time windowarrival variableearliest[i] <= arrival[v,i] <= latest[i] when visited
Travel time propagationarc + arrivalarrival[j] >= arrival[i] + service_time[i] + travel[i,j] - M(1-x[i,j])
Precedencestart/arrival variablesstart[b] >= finish[a]
Route duration limitarc variablessum travel[i,j] * x[v,i,j] <= max_duration[v]
Show full SKILL.md (194 more words)Show less

Constraint Examples

Capacity
python
for r in resources:
    model.addCons(quicksum(amount[i, r] for i in items) <= capacity[r])
Quantity Allowed Only When Active

Use the tightest possible M.

python
for i in items:
    model.addCons(quantity[i] <= upper_bound[i] * use[i])
Soft Demand Satisfaction
python
unmet = {i: model.addVar(vtype="I", lb=0, name=f"unmet_{i}") for i in customers}

for i in customers:
    model.addCons(served[i] + unmet[i] >= demand[i])

penalty_cost = quicksum(penalty[i] * unmet[i] for i in customers)
Absolute Target Deviation

Never use Python abs() on solver expressions.

python
dev = {i: model.addVar(vtype="C", lb=0, name=f"dev_{i}") for i in items}

for i in items:
    model.addCons(actual[i] - target[i] <= dev[i])
    model.addCons(target[i] - actual[i] <= dev[i])
Depot Start and End

If every vehicle must be used:

python
for v in vehicles:
    model.addCons(quicksum(x[v, START, j] for j in locations) == 1)
    model.addCons(quicksum(x[v, i, END] for i in locations) == 1)

If vehicles are optional:

python
use_vehicle = {v: model.addVar(vtype="B", name=f"use_vehicle_{v}") for v in vehicles}

for v in vehicles:
    model.addCons(quicksum(x[v, START, j] for j in locations) == use_vehicle[v])
    model.addCons(quicksum(x[v, i, END] for i in locations) == use_vehicle[v])
Route Continuity and At-Most-Once Visits
python
for v in vehicles:
    for i in locations:
        incoming = quicksum(x[v, j, i] for j in from_nodes if j != i)
        outgoing = quicksum(x[v, i, j] for j in to_nodes if j != i)

        model.addCons(incoming == outgoing)
        model.addCons(outgoing <= 1)

This means vehicle v visits location i no more than once. It does not prevent a different vehicle from also visiting i.

Global Single-Visit Rule

Use only when the real rule forbids split service across vehicles/resources.

python
for i in locations:
    model.addCons(
        quicksum(x[v, i, j] for v in vehicles for j in to_nodes if j != i) <= 1
    )

Do not add this rule when a large pickup/dropoff target may need multiple vehicles.

Load or State Transition Along Selected Arcs

If state[j] = state[i] + change[j] when arc (i, j) is used:

python
M = 2 * vehicle_capacity

for v in vehicles:
    for i, j in arcs:
        change_at_j = service[v, j] if isinstance(j, int) else 0
        model.addCons(load[v, j] - load[v, i] - change_at_j <= M * (1 - x[v, i, j]))
        model.addCons(load[v, j] - load[v, i] - change_at_j >= -M * (1 - x[v, i, j]))

This pattern works for load, arrival time, battery charge, inventory state, and other route-dependent state variables. Pick M from real variable bounds.

Time Windows
python
for v in vehicles:
    for i in locations:
        visit_i = quicksum(x[v, i, j] for j in to_nodes if j != i)
        model.addCons(arrival[v, i] >= earliest[i] - horizon * (1 - visit_i))
        model.addCons(arrival[v, i] <= latest[i] + horizon * (1 - visit_i))

    for i, j in arcs:
        if j in locations:
            model.addCons(
                arrival[v, j] >= arrival[v, i] + service_time.get(i, 0) + travel_time[i, j] - horizon * (1 - x[v, i, j])
            )

Inventory Pickup/Dropoff Pattern

For rebalancing or material movement, define one signed service variable. Recommended convention:

  • service[v, i] > 0: pickup from location i, vehicle load increases, location inventory decreases.
  • service[v, i] < 0: dropoff to location i, vehicle load decreases, location inventory increases.
python
service = {
    (v, i): model.addVar(vtype="I", lb=-vehicle_capacity, ub=vehicle_capacity, name=f"service_{v}_{i}")
    for v in vehicles
    for i in locations
}

for v in vehicles:
    for i in locations:
        visit_i = quicksum(x[v, i, j] for j in to_nodes if j != i)
        model.addCons(service[v, i] <= vehicle_capacity * visit_i)
        model.addCons(service[v, i] >= -vehicle_capacity * visit_i)

for i in locations:
    net_change = quicksum(service[v, i] for v in vehicles)
    free_space = storage_capacity[i] - initial_inventory[i]

    model.addCons(net_change <= initial_inventory[i])  # pickup cannot exceed stock
    model.addCons(net_change >= -free_space)           # dropoff cannot exceed space

If the target is a desired net pickup/dropoff:

python
unmet = {i: model.addVar(vtype="I", lb=0, name=f"unmet_{i}") for i in locations}

for i in locations:
    net_change = quicksum(service[v, i] for v in vehicles)
    model.addCons(net_change - target[i] <= unmet[i])
    model.addCons(target[i] - net_change <= unmet[i])

Extract pickup/dropoff output as:

python
picked_up = max(service_value, 0)
dropped_off = max(-service_value, 0)

Objective Assembly

Build named components:

python
travel_cost = quicksum(distance[i, j] * x[v, i, j] for v in vehicles for i, j in arcs)
fixed_cost = quicksum(vehicle_fixed_cost[v] * use_vehicle[v] for v in vehicles)
penalty_cost = quicksum(penalty[i] * unmet[i] for i in customers)

model.setObjective(travel_cost + fixed_cost + penalty_cost, "minimize")

© Raidriar7170, MIT. 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 artifacts/v0.3/skillsbench-pilot/v0.3-stage2-input-package-candidate-20260701T010000Z/candidate-data/skill-sources/skillsbench__logistics-rules-to-optimization of Raidriar7170/hermes-skilleval.

Open the folder on GitHubat commit 8f6a21e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Raidriar7170/hermes-skilleval, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Logistics Rules To Optimization 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.

Logistics Rules To Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Logistics Rules To Optimization this skillRaidriar7170/hermes-skilleval1251 repos~2.8kAutomated safety check: PassMIT
Translation Diff ExportDevolutions/UniGetUI26k—~1.1kAutomated safety check: PassMIT
Sync Translationssymfony/symfony31k—~1.9kAutomated safety check: PassMIT
Translation Diff ImportDevolutions/UniGetUI26k—~750Automated safety check: PassMIT
Translation Diff TranslateDevolutions/UniGetUI26k—~934Automated safety check: PassMIT
Generate Translationspayloadcms/payload45k—~1.1kAutomated safety check: PassMIT

Similar skills

  • Translation Diff Export

    Devolutions/UniGetUI

    Compares UniGetUI JSON locale files against English, identifies untranslated or source-changed keys, and generates patch, reference, and handoff files for a target language.

    26k GitHub stars~1.1k tokensUpdated today
    Writing & ContentAuto-check passed
  • Sync Translations

    symfony/symfony

    Synchronize translation catalogs across maintained Symfony branches: find messages that newer branches added to the English catalogs but that are still missing from the oldest maintained branch…

    31k GitHub stars~1.9k tokensUpdated today
    Writing & ContentAuto-check passed
  • Translation Diff Import

    Devolutions/UniGetUI

    Merges translated key-value pairs from a UniGetUI JSON localization patch back into the full language file and validates the merged result.

    26k GitHub stars~750 tokensUpdated today
    Writing & ContentAuto-check passed
  • Translation Diff Translate

    Devolutions/UniGetUI

    Translates a sparse UniGetUI JSON language patch, writes completed entries into the working copy, preserves placeholders and terminology, and prepares the patch for merge-back.

    26k GitHub stars~934 tokensUpdated today
    Writing & ContentAuto-check passed
  • Generate Translations

    payloadcms/payload

    A skill your agent uses when new translation keys are added to packages to generate new translations strings

    45k GitHub stars~1.1k tokensUpdated today
    Writing & ContentAuto-check passed
  • Drives long-form fiction, scripts, storyboards, interactive films and long-document translation through InkOS, with every change made by a typed action.

    10k GitHub starsUsed in 1 repo~1.1k tokens
    Writing & ContentAuto-check passed

More from Raidriar7170/hermes-skilleval

All 8 skills in this repo
  • Senior Data Scientist

    Raidriar7170/hermes-skilleval

    World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics.

    125 GitHub starsUsed in 5 repos~1.4k tokens
    Auto-check passed
  • Dialogue Graph

    Raidriar7170/hermes-skilleval

    A library for building, validating, visualizing, and serializing dialogue graphs.

    125 GitHub starsUsed in 1 repo~597 tokens
    Auto-check passed
  • Geospatial Routing Data

    Raidriar7170/hermes-skilleval

    Geospatial routing data handling for depot and station coordinates, route node IDs, internal index mappings, great-circle distance matrices, and route-distance reconstruction.

    125 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Routing Subtour Elimination

    Raidriar7170/hermes-skilleval

    Subtour-elimination methods for TSP, VRP, pickup/dropoff routing, and routing MIPs with binary arc variables.

    125 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Scip Opt

    Raidriar7170/hermes-skilleval

    SCIP optimization with PySCIPOpt. An agent skill from Raidriar7170/hermes-skilleval.

    125 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • DOCX

    Raidriar7170/hermes-skilleval

    Word document manipulation with python-docx - handling split placeholders, headers/footers, nested tables

    125 GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed

Questions about Logistics Rules To Optimization

What does Logistics Rules To Optimization do?

Translate logistics and operations rules into optimization variables and constraints. Logistics Rules To Optimization is an agent skill from Raidriar7170/hermes-skilleval. Translate logistics and operations rules into optimization variables and constraints.

When should I use Logistics Rules To Optimization?

Logistics Rules To Optimization fits situations like: an operations problem describes vehicles; service targets; resource limits; other business rules that need to become an optimization model.

How do I install Logistics Rules To Optimization in Claude Code?

Run `npx skills add Raidriar7170/hermes-skilleval --skill logistics-rules-to-optimization -a claude-code`. Or copy the skill folder (artifacts/v0.3/skillsbench-pilot/v0.3-stage2-input-package-candidate-20260701T010000Z/candidate-data/skill-sources/skillsbench__logistics-rules-to-optimization in Raidriar7170/hermes-skilleval) into .claude/skills/logistics-rules-to-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Logistics Rules To Optimization in Codex?

Run `npx skills add Raidriar7170/hermes-skilleval --skill logistics-rules-to-optimization -a codex`. Or copy the skill folder (artifacts/v0.3/skillsbench-pilot/v0.3-stage2-input-package-candidate-20260701T010000Z/candidate-data/skill-sources/skillsbench__logistics-rules-to-optimization in Raidriar7170/hermes-skilleval) into .agents/skills/logistics-rules-to-optimization in your project. Codex loads it when a task matches its description.

Can I use Logistics Rules To Optimization 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 Raidriar7170/hermes-skilleval --skill logistics-rules-to-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/logistics-rules-to-optimization, .gemini/skills/logistics-rules-to-optimization, .github/skills/logistics-rules-to-optimization and .opencode/skills/logistics-rules-to-optimization in your project.

What does Logistics Rules To Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Logistics Rules To Optimization is instructions for the agent only. Our summary lists: Python 3.

Does Logistics Rules To Optimization 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 Logistics Rules To Optimization 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 Logistics Rules To Optimization use?

Logistics Rules To Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Logistics Rules To Optimization use?

About 2.8k 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 Logistics Rules To Optimization?

Skills that share tags, products or a category with Logistics Rules To Optimization: Translation Diff Export (Devolutions/UniGetUI, 26k stars), Sync Translations (symfony/symfony, 31k stars), Translation Diff Import (Devolutions/UniGetUI, 26k stars) and Translation Diff Translate (Devolutions/UniGetUI, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Logistics Rules To Optimization?

Raidriar7170 (a GitHub user) maintains it in Raidriar7170/hermes-skilleval, which has 125 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 26, 2026.

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