本文へ移動
cccskills
無料GitHub で公開

inventory-stock

Design inventory and stock control — availability tracking, optimistic locking to prevent overselling, reservations, multi-location, backorders, and restock forecasting. Includes a safety-stock/reorder-point calculator. Triggers: designing inventory, fixing overselling, forecasting restock.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcaneスター 3(GitHub 3 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(2)

  • SKILL.md3.6 KB
  • scripts/restock_forecast.py6.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Inventory & Stock

Stock is where data integrity meets revenue: oversell and you lose trust, over-reserve and you lose sales. Design availability that is correct under concurrency and forecast restocks from real demand — platform-agnostic.

Before Starting

Gather: inventory model (single vs multi-location), sales velocity and lead times, fulfillment style (own stock, dropship, backorder), and goal (design the model, forecast restock, or audit for oversell risk).

How This Skill Works

ModeTriggerOutput
DesigndesignAvailability model + concurrency strategy
ForecastforecastSafety stock + reorder points (via script)
AuditauditOversell-risk and accuracy review

Phase 1 — Availability Model

Track three numbers per SKU per location, never one:

QuantityMeaning
on_handPhysically present
reservedAllocated to unfulfilled orders/checkouts
availableon_hand − reserved — the only number a shopper sees

Rule: Reserve at checkout start with a TTL; release on timeout/abandonment. Decrement on_hand at fulfillment, not at order placement.


Phase 2 — Preventing Overselling

The classic race: two shoppers buy the last unit. Defenses, in order of preference:

  1. Optimistic locking — version/row check on decrement; retry on conflict. Default choice.
  2. Atomic conditional update — UPDATE ... WHERE available >= qty and check rows-affected.
  3. Pessimistic lock — only for high-contention single rows; costs throughput.

Always treat "reserve stock" as a transaction that can FAIL and surface that to checkout cleanly. Multi-location adds an allocation step (which location fulfills) before the decrement.

For backorder rules, multi-location allocation strategies, and reservation TTL tuning, see the patterns above and hand off to order-lifecycle for fulfillment state.


Phase 3 — Restock Forecasting

Use the script to turn a sales CSV into reorder points:

python skills/inventory-stock/scripts/restock_forecast.py            # demo data
python skills/inventory-stock/scripts/restock_forecast.py sales.csv --lead-time 14 --service-level 0.95

It computes average daily demand, demand variability, safety stock (z × σ_demand × √lead_time), and reorder point (demand × lead_time + safety_stock). CSV columns: sku,date,units_sold.


Output Artifacts

RequestOutput
DesignAvailability model + chosen concurrency strategy
ForecastPer-SKU reorder point + safety stock table
AuditOversell-risk findings: PASS / FAIL per check

An inventory design PASSES when shoppers only see available, reservations expire, decrements are atomic/versioned, and forecasts drive reorder points instead of guesswork.


Related Skills

  • commerce-data-model: defines the SKU/variant that stock hangs off.
  • order-lifecycle: consumes reservations and triggers decrements at fulfillment.
  • cart-checkout: starts the reservation when checkout begins.
  • commerce-analytics: sell-through and turnover metrics that feed forecasts.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

SebastianLuser のスキルをすべて見る

このスキルの問題を報告する