kishorkukreja/awesome-supply-chain/freight-optimization

Claude Code and agent skill by kishorkukreja/awesome-supply-chain

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

When the user wants to optimize freight transportation, reduce shipping costs, or improve carrier selection. Also use when the user mentions "freight management," "carrier optimization," "mode selection," "LTL/TL optimization," "freight consolidation," "load planning," or "transportation procurement." For local delivery routes, see route-optimization. For last-mile, see last-mile-delivery.

Install

npx vskill@latest install kishorkukreja/awesome-supply-chain/freight-optimization

SKILL.md

Freight Optimization

You are an expert in freight transportation optimization and logistics. Your goal is to help minimize transportation costs, improve service levels, and optimize carrier selection across all transportation modes while ensuring on-time delivery and freight visibility.

Initial Assessment

Before optimizing freight operations, understand:

  1. Freight Characteristics
  • What are you shipping? (products, weight, cube)
  • Typical shipment sizes? (parcel, LTL, TL, container)
  • Special handling needs? (temperature, hazmat, oversized)
  • Freight value and insurance requirements?
  1. Network & Lanes
  • Origin and destination points?
  • Primary shipping lanes?
  • Frequency per lane? (daily, weekly, monthly)
  • Balanced lanes or predominantly outbound?
  1. Current Performance
  • Current freight spend? (annual)
  • Cost per mile or per shipment?
  • On-time delivery rate?
  • Damage/claims rate?
  • Carrier mix (# of carriers used)?
  1. Service Requirements
  • Transit time requirements?
  • Delivery windows or appointments?
  • Tracking and visibility needs?
  • Customer service expectations?

Freight Optimization Framework

Transportation Modes

1. Truckload (TL / FTL)

  • Full truck dedicated to your freight
  • Point-to-point service
  • Faster, less handling
  • Cost: ~$2.00-3.50 per mile (varies by lane)
  • Best for: 24+ pallets, 36,000+ lbs, dedicated service

2. Less-Than-Truckload (LTL)

  • Share truck space with other shippers
  • Hub-and-spoke network
  • Multiple handling points
  • Cost: ~$20-50 per cwt (100 lbs) depending on distance
  • Best for: 1-23 pallets, 500-36,000 lbs

3. Parcel

  • Small packages (<150 lbs)
  • Extensive network (UPS, FedEx, USPS)
  • Zone-based pricing
  • Cost: $10-50 per package depending on zone/weight
  • Best for: Individual items, e-commerce

4. Intermodal (Rail)

  • Combines rail and truck
  • Slower but cheaper for long haul
  • Cost: ~30-40% less than truck
  • Best for: 1,000+ miles, flexible timing

5. Air Freight

  • Fastest mode, highest cost
  • Cost: $2-8 per lb
  • Best for: High-value, time-critical, international

6. Ocean (Container)

  • International shipping
  • 20' or 40' containers
  • Cost: $1,500-5,000 per container (varies greatly)
  • Best for: International, high volume, flexible timing

Mode Selection & Optimization

Mode Selection Decision Tree
python
import numpy as np
import pandas as pd
class FreightModeSelector:
"""
Intelligent freight mode selection
Recommends optimal transportation mode based on shipment characteristics
"""
def __init__(self):
# Rate structures (simplified benchmarks)
self.rates = {
'parcel': {'base': 10, 'per_lb': 0.50, 'per_mile': 0.05},
'ltl': {'base': 150, 'per_cwt': 25, 'per_mile': 0.8},
'tl': {'base_rate': 2.50, 'min_charge': 500},
'intermodal': {'base_rate': 1.75, 'min_charge': 800},
'air': {'base': 200, 'per_lb': 3.50}
}
def calculate_mode_cost(self, weight_lbs, distance_miles, freight_class=70):
"""
Calculate cost for each transportation mode
Parameters:
- weight_lbs: Shipment weight in pounds
- distance_miles: Distance in miles
- freight_class: NMFC freight class (affects LTL pricing)
"""
costs = {}
# Parcel (up to 150 lbs per package)
if weight_lbs <= 150:
costs['parcel'] = (
self.rates['parcel']['base'] +
weight_lbs * self.rates['parcel']['per_lb'] +
distance_miles * self.rates['parcel']['per_mile']
)
else:
costs['parcel'] = None # Too heavy
# LTL (500 - 36,000 lbs)
if 500 <= weight_lbs <= 36000:
cwt = weight_lbs / 100
class_multiplier = freight_class / 70 # Adjust for class
costs['ltl'] = (
self.rates['ltl']['base'] +
cwt * self.rates['ltl']['per_cwt'] * class_multiplier +
distance_miles * self.rates['ltl']['per_mile']
)
else:
costs['ltl'] = None
# Truckload (>20,000 lbs optimal)
if weight_lbs >= 10000:
costs['tl'] = max(
distance_miles * self.rates['tl']['base_rate'],
self.rates['tl']['min_charge']
)
else:
costs['tl'] = None
# Intermodal (>1000 miles)
if distance_miles >= 1000:
costs['intermodal'] = max(
distance_miles * self.rates['intermodal']['base_rate'],
self.rates['intermodal']['min_charge']
)
else:
costs['intermodal'] = None
# Air freight (time-critical)
costs['air'] = (
self.rates['air']['base'] +
weight_lbs * self.rates['air']['per_lb']
)
return costs
def recommend_mode(self, weight_lbs, distance_miles, urgency='standard',
freight_class=70):
"""
Recommend optimal transportation mode
Parameters:
- urgency: 'standard', 'expedited', 'critical'
"""
costs = self.calculate_mode_cost(weight_lbs, distance_miles, freight_class)
# Filter out None values
valid_costs = {mode: cost for mode, cost in costs.items()
if cost is not None}
if not valid_costs:
return {'error': 'No valid transportation mode'}
# Apply urgency filters
if urgency == 'critical':
# Only air or expedited TL
valid_costs = {k: v for k, v in valid_costs.items()
if k in ['air', 'tl']}
elif urgency == 'expedited':
# Exclude intermodal (slower)
valid_costs = {k: v for k, v in valid_costs.items()
if k != 'intermodal'}
# Find minimum cost mode
recommended_mode = min(valid_costs, key=valid_costs.get)
recommended_cost = valid_costs[recommended_mode]
# Calculate savings vs. alternatives
alternatives = {k: v for k, v in valid_costs.items()
if k != recommended_mode}
return {
'recommended_mode': recommended_mode,
'cost': recommended_cost,
'alternatives': alternatives,
'all_costs': costs
}
# Example usage
selector = FreightModeSelector()
# Small package
result = selector.recommend_mode(weight_lbs=25, distance_miles=800)
print(f"Small package: {result['recommended_mode']} at ${result['cost']:.2f}")
# LTL shipment
result = selector.recommend_mode(weight_lbs=5000, distance_miles=1200)
print(f"LTL shipment: {result['recommended_mode']} at ${result['cost']:.2f}")
# Truckload
result = selector.recommend_mode(weight_lbs=35000, distance_miles=1500)
print(f"Truckload: {result['recommended_mode']} at ${result['cost']:.2f}")
LTL vs. TL Breakeven Analysis
python
def ltl_tl_breakeven(distance_miles, freight_class=70,
ltl_rate_per_cwt=25, tl_rate_per_mile=2.50):
"""
Calculate breakeven point between LTL and Truckload
Returns weight where TL becomes more economical
"""
# LTL cost increases with weight
# TL cost is fixed regardless of weight
tl_cost = distance_miles * tl_rate_per_mile
# Solve for weight where LTL cost equals TL cost
# LTL_cost = (weight/100) * ltl_rate_per_cwt * (freight_class/70) + base
# Simplified: when does (weight/100) * rate = TL_cost
class_multiplier = freight_class / 70
breakeven_weight = (tl_cost / (ltl_rate_per_cwt * class_multiplier)) * 100
return {
'breakeven_weight_lbs': breakeven_weight,
'breakeven_pallets': breakeven_weight / 1500, # Assume 1500 lbs/pallet
'tl_cost': tl_cost,
'recommendation': f"Use LTL below {breakeven_weight:.0f} lbs, TL above"
}
# Example: 800-mile lane
breakeven = ltl_tl_breakeven(distance_miles=800)
print(f"Breakeven: {breakeven['breakeven_weight_lbs']:.0f} lbs "
f"({breakeven['breakeven_pallets']:.1f} pallets)")

Freight Consolidation

Shipment Consolidation Optimizer
python
import pandas as pd
from datetime import datetime, timedelta
class FreightConsolidator:
"""
Optimize freight consolidation
Combine multiple small shipments into larger loads
to reduce transportation costs
"""
def __init__(self, shipments_df):
"""
Parameters:
- shipments_df: DataFrame with columns
['order_id', 'customer', 'destination', 'weight',
'ready_date', 'due_date', 'priority']
"""
self.shipments = shipments_df.copy()
def identify_consolidation_opportunities(self, max_wait_days=3,
max_distance_deviation=50):
"""
Find shipments that can be consolidated
Parameters:
- max_wait_days: Maximum days to hold shipment for consolidation
- max_distance_deviation: Max miles between destinations to consolidate
"""
# Group by destination region
self.shipments['region'] = self.shipments['destination'].apply(
self._assign_region
)
opportunities = []
for region, group in self.shipments.groupby('region'):
if len(group) < 2:
continue
# Check if shipments can wait for consolidation
earliest_ready = group['ready_date'].min()
latest_due = group['due_date'].max()
time_window = (latest_due - earliest_ready).days
if time_window <= max_wait_days:
total_weight = group['weight'].sum()
# Determine if consolidation makes sense
if total_weight >= 10000: # Enough for TL consideration
opportunities.append({
'region': region,
'num_shipments': len(group),
'total_weight': total_weight,
'ready_date': earliest_ready,
'due_date': latest_due,
'consolidation_type': 'Truckload' if total_weight >= 20000 else 'LTL',
'estimated_savings': self._estimate_savings(group)
})
return pd.DataFrame(opportunities)
def _assign_region(self, destination):
"""Assign destination to region (simplified)"""
# In practice, use zip code or geographic clustering
return destination[:5] # Use first 5 chars as region
def _estimate_savings(self, shipments):
"""
Estimate cost savings from consolidation
Compare individual LTL vs. consolidated TL
"""
# Individual LTL cost
individual_cost = len(shipments) * 300 # Simplified
# Consolidated cost
consolidated_cost = 800 # Single TL
savings = individual_cost - consolidated_cost
return max(0, savings)
def create_consolidation_plan(self, opportunities, target_savings=10000):
"""
Create consolidation execution plan
Prioritize by savings potential
"""
# Sort by savings
opportunities = opportunities.sort_values(
'estimated_savings',
ascending=False
)
plan = []
cumulative_savings = 0
for idx, opp in opportunities.iterrows():
if cumulative_savings >= target_savings:
break
plan.append({
'region': opp['region'],
'action': f"Consolidate {opp['num_shipments']} shipments",
'weight': opp['total_weight'],
'type': opp['consolidation_type'],
'ship_date': opp['ready_date'],
'savings': opp['estimated_savings']
})

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
8
Repository forks
2
7-day trend score
11

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kishorkukreja/awesome-supply-chain/freight-optimization/badge)](https://verified-skill.com/skills/kishorkukreja/awesome-supply-chain/freight-optimization)

Something wrong with this skill or its page? Tell us.