safety-stock-review
它能做什么
这项技能计算安全库存和补货点,然后检查这些数字是否真正达到你想要的服务水平。适合需要可靠库存水平、而不是教科书式猜测的库存规划人员。
适用场景
- ✓当你需要为产品设定安全库存或补货点时。
- ✓当你想检查当前的安全库存水平是否足够时。
- ✓当你需要知道提高服务水平会在库存上增加多少成本的时候。
技能链接
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/operations/safety-stock-review/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的产品计算安全库存和补货点,并检查它们是否真的能达到 95% 的服务水平。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查需求波动性,用标准公式计算安全库存,然后回放你的历史数据,衡量它实际达到的周期服务水平和满足率。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Safety Stock Review
The textbook formula assumes roughly normal demand. Real portfolios contain SKUs where that assumption fails badly - the skill's job is to compute the number AND say where it can be trusted.
Required data
Per-SKU demand history (sku, period, qty, 12+ periods), lead time (with variability if available), and the service target. Clarify early which service the target means: cycle service (probability of no stockout per cycle) or fill rate (share of units served) - contracts usually mean fill rate, formulas usually compute cycle service.
Workflow
- Classify first. Compute CV and zero-period share per SKU. For CV >= 1.0 or intermittent demand, state up front that the normal-formula result will be optimistic.
- Compute the formula result: SS = z * sigma_d * sqrt(LT), ROP = mu_d * LT + SS (demand-period units consistent with LT). If lead time varies, use the extended form with the sigma_LT term - ignoring lead-time variance is the most common silent understatement.
- Stress-test empirically. Set stock at mu + SS and replay the actual history: report both achieved cycle service (share of periods fully covered) and achieved fill rate (units served / units demanded). Zero-demand periods pass cycle service for free - fill rate is the honest one on intermittent items.
- Show the cost of nines. SS at 90/95/98/99% targets for the SKUs in question - service targets are pricing decisions, and the curve makes that visible.
- Recommend per class, not globally: formula fine for X-class; formula + empirical check for Y; for Z-class recommend empirical/quantile-based sizing or a policy change (MTO, lead-time reduction) instead of a bigger z.
- Validate. Reconcile the stress-test denominator (total units demanded) against the raw data sum before presenting.
Pitfalls to check explicitly
- Cycle service quoted where the contract says fill rate - a penalty clause waiting to be found.
- Normal formula on lumpy demand understates risk precisely on the items that hurt most.
- sigma computed over a period mixing trend or seasonality inflates SS everywhere; deseasonalize or use forecast-error sigma when a forecast exists.
- One global service target across the whole portfolio - targets should follow item criticality and margin.
Output format
- Per-SKU (or per-class) table: mu, sigma, CV, class, SS, ROP, achieved cycle service, achieved fill rate
- Trust statement per class ("formula reliable here / optimistic here, use X instead")
- Cost-of-nines table for the discussed target range
- Assumption footnote: service definition, lead-time treatment, sigma source
Worked stress test with charts: https://github.com/gulmezeren2-byte/abc-xyz-inventory
Source: industrial-engineering-ai-skills by Eren Gulmez (MIT). The full method pack - entry skill, role agents, data-hygiene rules and artifact templates - lives there.
常见问题
为什么要用历史数据检验结果?
标准公式假设需求平稳、大致符合正态分布,因此这项技能会先用真实数据进行检验,再决定是否信任它。
周期服务水平和满足率有什么区别?
周期服务水平是没有缺货的周期所占的比例。满足率是你实际满足的数量所占的比例。
如果交货周期变化怎么办?
如果交货周期存在波动,这项技能会使用扩展公式,因为忽略这种波动往往会低估安全库存。
详情
作者的原始描述
Size or audit safety stock with assumption checks - the z*sigma*sqrt(LT) formula plus an empirical stress test of what it actually delivers (cycle service vs fill rate) per variability class. Use when the user mentions safety stock, emniyet stoku, emniyet stoğu, reorder point, service level, stok seviyesi belirleme. Differentiator - refuses to hand back a number without validating the demand-distribution assumptions behind it.
热度
- GitHub 星标
- 33k
- 排名
- #8868
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
owasp-security
33k教你的智能体掌握面向网页应用、API、移动端、容器和 AI 智能体的 OWASP 安全指南,以便发现常见弱点并提出修复建议。
agent-management
33k让你的智能体使用 AI Maestro 命令行工具创建、列出、休眠、唤醒、重命名和删除 AI 智能体,管理每个智能体的生命周期。
agent-messaging
33k让你的智能体使用智能体消息协议,在 AI 智能体之间发送、接收和回复带签名的消息,大部分在你自己的电脑上完成。
docs-search
33k让你的智能体搜索自动生成的代码文档,查找函数签名、类定义和注释,从而在修改代码之前核对真实的 API。