algo-sc-bullwhip
Skill238 starsChanged 6 months agoMITView on GitHub
Analyze and mitigate the bullwhip effect where demand variability amplifies upstream in supply chains. Use this skill when the user needs to diagnose order variability amplification, quantify the bullwhip ratio, or implement dampening strategies — even if they say 'why are our orders so volatile', 'supply chain variability', or 'demand amplification problem'.
In this repository315 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- algo-ad-biddingSkill
- algo-ad-budgetSkill
- algo-ad-ctrSkill
- algo-ad-gspSkill
- algo-ad-vcgSkill
- algo-blockchain-basicsSkill
- algo-blockchain-smart-contractSkill
- algo-ecom-bm25Skill
- algo-ecom-rankingSkill
- algo-ecom-searchSkill
- algo-forecast-arimaSkill
- algo-forecast-ensembleSkill
- algo-forecast-exponentialSkill
- algo-forecast-prophetSkill
- algo-hr-compensationSkill
- algo-hr-matchingSkill
- algo-hr-turnoverSkill
- algo-mfg-cpkSkill
- algo-mfg-doeSkill
- algo-mfg-fmeaSkill
- algo-mfg-spcSkill
- algo-net-centralitySkill
- algo-net-communitySkill
- algo-net-influenceSkill
- algo-nlp-ldaSkill
- algo-nlp-nerSkill
- algo-nlp-similaritySkill
- algo-nlp-summarizationSkill
- algo-price-bundleSkill
- algo-price-conjointSkill
- algo-price-dynamicSkill
- algo-price-elasticitySkill
- algo-price-van-westendorpSkill
- algo-rank-bayesianSkill
- algo-rank-eloSkill
- algo-rank-trueskillSkill
- algo-rank-wilsonSkill
- algo-rec-cfSkill
- algo-rec-contentSkill
- algo-rec-hybridSkill
- algo-rec-mfSkill
- algo-rec-sessionSkill
- algo-risk-altman-zSkill
- algo-risk-benfordSkill
- algo-risk-creditSkill
- algo-risk-varSkill
- algo-sc-eoqSkill
- algo-sc-newsvendorSkill
- algo-sc-routingSkill
- algo-sc-safety-stockSkill
- algo-seo-backlinkSkill
- algo-seo-contentSkill
- algo-seo-crawlSkill
- algo-seo-pagerankSkill
- algo-seo-schemaSkill
- algo-seo-technicalSkill
- algo-seo-tfidfSkill
- algo-social-engagementSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
When demand is genuinely volatile (not amplified) — the issue is demand forecasting
- Distinctive: line 49
Check: BWR > 1 at upstream stages (confirms bullwhip).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bullwhip Effect Analysis
Overview
The bullwhip effect describes how small fluctuations in consumer demand amplify progressively at each upstream stage of the supply chain. A 5% retail demand increase can become a 40% order spike at the manufacturer. Caused by demand signal processing, order batching, price fluctuations, and rationing/shortage gaming.
When to Use
Trigger conditions:
- Diagnosing why supplier orders are far more volatile than end-consumer demand
- Quantifying demand amplification across supply chain tiers
- Designing strategies to reduce order variability
When NOT to use:
- When demand is genuinely volatile (not amplified) — the issue is demand forecasting
- For single-echelon inventory optimization (use EOQ or safety stock)
Algorithm
IRON LAW: Demand Variability Amplifies at EACH Upstream Stage
Bullwhip ratio = Var(orders) / Var(demand). A ratio > 1 at any stage
confirms the bullwhip effect. The four root causes (Lee et al., 1997):
1. Demand signal processing (forecasting with moving averages)
2. Order batching (periodic review, MOQs)
3. Price fluctuations (forward buying during promotions)
4. Rationing and shortage gaming (inflating orders during scarcity)Phase 1: Input Validation
Collect: end-consumer demand time series AND order time series at each supply chain stage (retailer → distributor → manufacturer → supplier). Gate: At least 2 tiers of order data, minimum 26 periods.
Phase 2: Core Algorithm
- Compute variance of demand at each tier
- Compute bullwhip ratio per tier: BWR_i = Var(orders_i) / Var(orders_{i-1})
- Identify contribution of each cause: batch size analysis, promotion calendar overlap, forecast method evaluation
- Quantify cost: excess inventory carrying cost, expediting cost, capacity misallocation
Phase 3: Verification
Check: BWR > 1 at upstream stages (confirms bullwhip). Correlate order spikes with identifiable causes (promotions, forecast updates, batch cycles). Gate: Bullwhip quantified and root causes identified.
Phase 4: Output
Return bullwhip ratios with root cause attribution and mitigation recommendations.
Output Format
{
"bullwhip_ratios": [{"tier": "retailer→distributor", "ratio": 1.8}, {"tier": "distributor→manufacturer", "ratio": 2.3}],
"root_causes": [{"cause": "order_batching", "contribution_pct": 40}, {"cause": "demand_signal_processing", "contribution_pct": 35}],
"metadata": {"periods": 52, "tiers_analyzed": 3}
}Examples
Sample I/O
Input: Consumer demand CV=0.10, Retailer orders CV=0.18, Distributor orders CV=0.32 Expected: BWR retailer=3.24 (0.18²/0.10²), BWR distributor=3.16 (0.32²/0.18²). Strong bullwhip confirmed.
Edge Cases
| Input | Expected | Why |
| BWR < 1 | Smoothing effect | Information sharing or VMI may dampen variability |
| Promotional periods | Spike in BWR | Forward buying amplifies orders |
| Single tier only | Cannot measure amplification | Need at least 2 tiers for comparison |
Gotchas
- Data granularity: Weekly vs monthly data can show different bullwhip magnitudes. Use consistent time buckets across tiers.
- VMI and CPFR: Vendor-managed inventory and collaborative planning reduce bullwhip by sharing demand data. But they require trust and IT integration.
- Information sharing ≠ bullwhip elimination: Even with POS data sharing, lead times and batch constraints still cause some amplification.
- Shortage gaming is hardest to fix: During shortages, customers inflate orders. When supply recovers, cancellations flood in. Only committed-quantity allocations prevent this.
- Measurement challenges: True consumer demand is often unobserved (only POS data). Lost sales from stockouts are invisible, understating true demand variability.
References
- For Lee-Padmanabhan-Whang formal model, see
references/bullwhip-model.md - For information sharing strategies, see
references/information-sharing.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

