account-research
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM.…
\"Calculate safety stock levels to buffer against demand and lead time uncertainty. Use this skill when the user needs to set inventory buffers, determine service level trade-offs, or optimize safety stock across SKUs — even if they say 'how much buffer inventory', 'stockout
$ npx -y skills add charlieviettq/awesome-agent-skill --skill algo-sc-safety-stock --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/algo-sc-safety-stockContext preview
The summary Claude sees to decide when to auto-load this skill.
\"Calculate safety stock levels to buffer against demand and lead time uncertainty. Use this skill when the user needs to set inventory buffers, determine service level trade-offs, or optimize safety stock across SKUs — even if they say 'how much buffer inventory', 'stockout
name: "\"algo-sc-safety-stock\"" description: "\"Calculate safety stock levels to buffer against demand and lead time uncertainty. Use this skill when the user needs to set inventory buffers, determine service level trade-offs, or optimize safety stock across SKUs — even if they say 'how much buffer inventory', 'stockout prevention', or 'service level calculation'.\"." allowed-tools: Bash, Read, Write, Edit, Glob, Grep
Safety stock is buffer inventory held to protect against demand and lead time variability. Formula: SS = z × √(LT × σ²_d + d² × σ²_LT) where z=service factor, LT=lead time, σ_d=demand std dev, d=avg demand, σ_LT=lead time std dev. Directly trades inventory cost against stockout risk.
**Trigger conditions:**
**When NOT to use:**
IRON LAW: Safety Stock Is a TRADE-OFF, Not a Target More safety stock = fewer stockouts but higher holding cost. The relationship is non-linear: going from 95% to 99% service level roughly DOUBLES safety stock. Going from 99% to 99.9% doubles it again. Always quantify the cost of each service level increment. z-values: 90%→1.28, 95%→1.65, 99%→2.33, 99.9%→3.09.
Collect: historical demand data (weekly/monthly), lead time data (average and variability), target service level, unit cost and holding rate. **Gate:** Minimum 12 periods of demand data, lead time estimates available.
1. Compute demand statistics: average demand (d), demand standard deviation (σ_d) 2. Compute lead time statistics: average LT, LT standard deviation (σ_LT) 3. Compute combined variability: σ_combined = √(LT × σ²_d + d² × σ²_LT) 4. Look up z for target service level 5. Safety stock = z × σ_combined 6. Reorder point = d × LT + SS
Simulate: using historical demand, would the computed SS have prevented stockouts at the target service level? **Gate:** Simulated service level matches target (±2%).
Return safety stock with cost impact and service level analysis.
{
"safety_stock": 250,
"reorder_point": 850,
"service_level": 0.95,
"annual_holding_cost": 5000,
"metadata": {"avg_demand_weekly": 120, "demand_cv": 0.3, "avg_lead_time_weeks": 5}
}**Input:** Weekly demand: avg=100, σ=30. Lead time: avg=4 weeks, σ=1 week. Target: 95%. **Expected:** σ_combined = √(4×900 + 10000×1) = √(3600+10000) = √13600 = 116.6. SS = 1.65 × 116.6 = 192 units.
| Input | Expected | Why | |-------|----------|-----| | Zero demand variability | SS from LT variability only | σ_d = 0, only lead time risk remains | | Zero lead time variability | SS from demand variability only | σ_LT = 0, standard formula simplifies | | Very long lead time | High SS | More uncertainty accumulates over longer periods |
| Script | Description | Usage | |--------|-------------|-------| | `scripts/safety_stock.py` | Compute safety stock and reorder point with combined demand/lead-time variability | `python scripts/safety_stock.py --help` |
Run `python scripts/safety_stock.py --verify` to execute built-in sanity tests.
Curated skill pack for LLM agents in engineer and science workflow (Cursor & Claude ready).
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM.…
Evaluate LLM agents and tool-using workflows—task success, tool accuracy, latency/cost, safety, and regression suites. Use when shipping agent features,…
Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and discoverability for LLM callers. Use when defining tools for agents, SDKs, or…
\"Implement and select ad bidding strategies from manual CPC to automated target-CPA and target-ROAS. Use this skill when the user needs to choose a bidding…
\"Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to distribute budget across…
\"Build CTR prediction models for estimating ad click-through rates from features. Use this skill when the user needs to predict click probability, build an ad…