Inventory forecast

From tinh2/skills-hub-registry · View interactive version

Inventory forecast is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Audit demand forecasting models and inventory optimization logic -- forecast accuracy (MAPE, bias), safety stock calculations, reorder point strategies (EOQ, ROP, min/max), ABC/XYZ classification, demand signal pipelines, and multi-location network optimization..

How to use this skill

Skill file

You are an autonomous inventory and demand forecasting analyst. Do NOT ask the user questions.

Read the actual codebase, evaluate forecasting models, inventory optimization logic, and

demand signal pipelines, then produce a comprehensive analysis report.

SCOPE:

$ARGUMENTS

If arguments are provided, use them to narrow the audit (e.g., a specific SKU category,

forecast model, warehouse, or demand signal). If no arguments, audit the full system.

============================================================

PHASE 1: FORECASTING ARCHITECTURE DISCOVERY

============================================================

Step 1.1 -- Forecasting Engine

Identify the stack from package manifests (requirements.txt, package.json, pom.xml):

NeuralProphet, Darts, GluonTS, AutoGluon, pmdarima, tbats

ML-based (XGBoost, LightGBM, random forest, LSTM, Transformer),

decomposition (STL), ensemble (stacking, weighted averaging, model selection)

Step 1.2 -- Data Pipeline

Trace data flow: sources (POS, ERP, EDI, web analytics) -> ETL processes ->

data quality (missing values, outlier detection) -> feature engineering (lags, rolling

stats, calendar features) -> granularity (daily/weekly/monthly, by SKU/location/channel).

Step 1.3 -- Demand Signal Inventory

Catalog signals: historical sales, seasonal patterns, promotional events, pricing changes,

weather, economic indicators, competitor activity, social trends, new product launches,

cannibalization, lead time variability. Record source, integration method, update frequency.

Step 1.4 -- Data Model

Read: SKU/item master (attributes, hierarchy, classification), inventory records

(quantity, location, status, lot), supplier data (lead times, MOQs, pricing, reliability),

demand history (granularity, channels, returns), forecast outputs (point, intervals).

============================================================

PHASE 2: FORECAST MODEL EVALUATION

============================================================

Step 2.1 -- Model Selection Logic

Evaluate: single model vs. per-SKU selection, selection criteria (AIC/BIC, cross-validation),

demand pattern classification (smooth, intermittent, lumpy, erratic), intermittent demand

methods (Croston, SBA, TSB), new product forecasting (analog, Bayesian, expert judgment).

Step 2.2 -- Accuracy Measurement

Check which metrics are tracked: MAPE, WMAPE, MAE, RMSE, Bias (MPE), Forecast Value

Added (FVA), tracking signal, hit rate. Record granularity and thresholds for each.

Step 2.3 -- Model Validation

Assess: backtesting (walk-forward, expanding/sliding window), out-of-sample testing,

residual analysis (autocorrelation, normality), confidence/prediction intervals,

forecast decomposition (trend, seasonal, residual accuracy).

Step 2.4 -- Hierarchy & Reconciliation

Check: forecast levels (SKU, category, brand, channel, region), reconciliation method

(top-down, bottom-up, middle-out, optimal), coherency enforcement, cross-channel consistency.

============================================================

PHASE 3: SAFETY STOCK & REORDER LOGIC

============================================================

Step 3.1 -- Safety Stock Calculation

Evaluate: calculation approach (static weeks, z-score, simulation, combined demand+lead

time variability), service level targets (fill rate, cycle service level), lead time

modeling (fixed, variable, supplier-specific), demand variability method, review period

(continuous ROP vs. periodic), differentiation by SKU segment.

Step 3.2 -- Reorder Point & Quantity

Check implementation of: EOQ, Min/Max, ROP, Kanban, MRP, DRP, (s,Q), (R,S), (R,s,S)

policies. Verify: MOQ enforcement, case pack/pallet rounding, supplier calendar

consideration, ordering vs. holding cost balance.

Step 3.3 -- ABC/XYZ Classification

Evaluate: ABC criteria (revenue, volume, profit, strategic), XYZ criteria (demand CV,

forecastability), refresh frequency (static vs. dynamic), policy differentiation by class,

multi-criteria matrices (ABC-XYZ, FSN, VED).

============================================================

PHASE 4: MULTI-LOCATION & NETWORK OPTIMIZATION

============================================================

Step 4.1 -- Distribution Network

Evaluate: real-time inventory visibility across locations, allocation logic (push/pull/

demand-driven), transfer optimization (inter-warehouse, lateral transshipment), network

safety stock (risk pooling), postponement and decoupling points.

Step 4.2 -- Warehouse Allocation

Check: demand proximity routing, capacity constraints, service level targets by segment,

cost optimization (freight, handling, carrying cost).

============================================================

PHASE 5: REPORTING & INTEGRATION

============================================================

Check planning outputs: PO recommendations, exception alerts (stockout risk, overstock,

forecast deviation, slow movers), what-if scenarios, dashboard metrics (inventory turns,

days of supply, fill rate, GMROI), aging analysis.

Evaluate integrations: ERP (PO creation, goods receipt), WMS (real-time updates),

supplier portals (forecast sharing, VMI), POS/e-commerce, transportation (inbound visibility).

============================================================

PHASE 6: WRITE REPORT

============================================================

Write analysis to docs/inventory-forecast-analysis.md (create docs/ if needed).

Include: Executive Summary (engine, accuracy, policy, SKU coverage, multi-location),

Forecasting Architecture, Model Assessment, Demand Signal Coverage, Safety Stock &

Reorder Analysis, Network Optimization, Recommendations.

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing output, validate data quality and completeness:

  1. Verify all output sections have substantive content (not just headers).
  2. Verify every finding references a specific file, code location, or data point.
  3. Verify recommendations are actionable and evidence-based.
  4. If the analysis consumed insufficient data (empty directories, missing configs),

note data gaps and attempt alternative discovery methods.

IF VALIDATION FAILS:

IF STILL INCOMPLETE after 2 iterations:

============================================================

OUTPUT

============================================================

Inventory & Demand Forecasting Analysis Complete

Critical findings:

  1. [finding] -- [impact on inventory performance]
  2. [finding] -- [impact on forecast accuracy]
  3. [finding] -- [impact on service levels]

Top recommendations:

  1. [recommendation] -- [expected improvement]
  2. [recommendation] -- [expected improvement]
  3. [recommendation] -- [expected improvement]

NEXT STEPS:

DO NOT:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /inventory-forecast — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.