inventory-optimizer
Inventory optimization skill for safety stock, reorder point, and order quantity calculations.
от a5c-ai★ 1 947 звёзд на GitHub
Установить inventory-optimizer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
inventory-optimizer
You are inventory-optimizer - a specialized skill for optimizing inventory policies including safety stock, reorder points, and order quantities.
Overview
This skill enables AI-powered inventory optimization including:
- ABC/XYZ classification
- Economic Order Quantity (EOQ) calculation
- Safety stock calculation by service level
- Reorder point determination
- Periodic review (R,S) policy optimization
- Continuous review (r,Q) policy optimization
- Multi-echelon inventory optimization
- Inventory investment analysis
Capabilities
1. ABC/XYZ Classification
import numpy as np
import pandas as pd
def abc_analysis(items: pd.DataFrame, value_column: str, quantity_column: str):
"""
ABC classification based on annual value (Pareto analysis)
A: Top 80% of value (typically 20% of items)
B: Next 15% of value (typically 30% of items)
C: Remaining 5% of value (typically 50% of items)
"""
# Calculate annual value
items = items.copy()
items['annual_value'] = items[value_column] * items[quantity_column]
items = items.sort_values('annual_value', ascending=False)
# Calculate cumulative percentage
total_value = items['annual_value'].sum()
items['cum_value'] = items['annual_value'].cumsum()
items['cum_pct'] = items['cum_value'] / total_value * 100
# Assign ABC class
def assign_class(pct):
if pct <= 80:
return 'A'
elif pct <= 95:
return 'B'
else:
return 'C'
items['ABC_class'] = items['cum_pct'].apply(assign_class)
return items
def xyz_analysis(items: pd.DataFrame, demand_history_columns: list):
"""
XYZ classification based on demand variability
X: CV < 0.5 (stable demand)
Y: 0.5 <= CV < 1.0 (moderate variability)
Z: CV >= 1.0 (high variability)
"""
items = items.copy()
# Calculate coefficient of variation
demand_data = items[demand_history_columns]
items['mean_demand'] = demand_data.mean(axis=1)
items['std_demand'] = demand_data.std(axis=1)
items['CV'] = items['std_demand'] / items['mean_demand']
# Assign XYZ class
def assign_xyz(cv):
if cv < 0.5:
return 'X'
elif cv < 1.0:
return 'Y'
else:
return 'Z'
items['XYZ_class'] = items['CV'].apply(assign_xyz)
return items
def abc_xyz_matrix(items: pd.DataFrame):
"""
Create combined ABC-XYZ matrix
"""
matrix = items.groupby(['ABC_class', 'XYZ_class']).size().unstack(fill_value=0)
recommendations = {
'AX': 'High value, stable - continuous review, tight control',
'AY': 'High value, variable - safety stock important, frequent review',
'AZ': 'High value, unpredictable - careful forecasting, higher safety stock',
'BX': 'Medium value, stable - periodic review',
'BY': 'Medium value, variable - moderate control',
'BZ': 'Medium value, unpredictable - consider min-max system',
'CX': 'Low value, stable - simple rules, minimal attention',
'CY': 'Low value, variable - periodic review, simple rules',
'CZ': 'Low value, unpredictable - consider elimination or consignment'
}
return {
"matrix": matrix,
"recommendations": recommendations
}
2. Economic Order Quantity (EOQ)
def economic_order_quantity(annual_demand: float, ordering_cost: float,
holding_cost_per_unit: float):
"""
Classic EOQ calculation
EOQ = sqrt(2 * D * S / H)
D: Annual demand
S: Ordering cost per order
H: Holding cost per unit per year
"""
eoq = np.sqrt((2 * annual_demand * ordering_cost) / holding_cost_per_unit)
# Calculate associated costs
orders_per_year = annual_demand / eoq
annual_ordering_cost = orders_per_year * ordering_cost
average_inventory = eoq / 2
annual_holding_cost = average_inventory * holding_cost_per_unit
total_cost = annual_ordering_cost + annual_holding_cost
return {
"EOQ": round(eoq, 0),
"orders_per_year": round(orders_per_year, 1),
"order_interval_days": round(365 / orders_per_year, 1),
"annual_ordering_cost": round(annual_ordering_cost, 2),
"annual_holding_cost": round(annual_holding_cost, 2),
"total_relevant_cost": round(total_cost, 2),
"average_inventory": round(average_inventory, 0)
}
def eoq_with_quantity_discounts(annual_demand: float, ordering_cost: float,
holding_rate: float, price_breaks: list):
"""
EOQ with quantity discounts
price_breaks: [(min_qty, unit_price), ...]
"""
results = []
for min_qty, unit_price in sorted(price_breaks, key=lambda x: x[1], reverse=True):
holding_cost = unit_price * holding_rate
eoq = np.sqrt((2 * annual_demand * ordering_cost) / holding_cost)
# Check if EOQ is feasible for this price bracket
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash(*) - 02
Read - 03
Write - 04
Edit - 05
Glob - 06
Grep - 07
WebFetch
FAQ
Что делает скилл inventory-optimizer?
Inventory optimization skill for safety stock, reorder point, and order quantity calculations.
Как установить скилл inventory-optimizer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл inventory-optimizer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…