Xpersona
S

self-improving-supply-chain

CLAWHUB · Unverified

Captures forecast errors, supplier risks, logistics delays, inventory mismatches, quality deviations, and demand signal shifts to enable continuous supply chain improvement. Use when: (1) A stockout or backorder event occurs, (2) A delivery SLA is missed, (3) Supplier lead time increases, (4) Quality rejection rate spikes, (5) Demand forecast vs. actual variance exceeds 15%, (6) Warehouse capacity threshold is breached, (7) A procurement or routing decision needs documentation. Skill: self-improving-supply-chain Owner: jose-compu Summary: Captures forecast errors, supplier risks, logistics delays, inventory mismatches, quality deviations, and demand signal shifts to enable continuous supply chain improvement. Use when: (1) A stockout or backorder event occurs, (2) A delivery SLA is missed, (3) Supplier lead time increases, (4) Quality rejection rate spikes, (5) Demand forecast vs. actual va

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17bzpdy0evfmqz6nx069npr3n84p7f2:self-improving-supply-chain
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jose-compu-self-improving-supply-chain/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

145,287 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: self-improving-supply-chain
description: "Captures forecast errors, supplier risks, logistics delays, inventory mismatches, quality deviations, and demand signal shifts to enable continuous supply chain improvement. Use when: (1) A stockout or backorder event occurs, (2) A delivery SLA is missed, (3) Supplier lead time increases, (4) Quality rejection rate spikes, (5) Demand forecast vs. actual variance exceeds 15%, (6) Warehouse capacity threshold is breached, (7) A procurement or routing decision needs documentation."
---

# Self-Improving Supply Chain Skill

Log supply chain learnings, disruption patterns, and feature requests to markdown files for continuous improvement. Captures forecast errors, supplier risks, logistics delays, inventory mismatches, quality deviations, and demand signal shifts. Important learnings get promoted to supplier scorecards, safety stock policies, routing playbooks, demand planning models, or quality acceptance criteria.

## First-Use Initialisation

Before logging anything, ensure the `.learnings/` directory and files exist in the project or workspace root. If any are missing, create them:

```bash
mkdir -p .learnings
[ -f .learnings/LEARNINGS.md ] || printf "# Supply Chain Learnings\n\nForecast errors, supplier risks, logistics delays, inventory mismatches, quality deviations, and demand signal shifts captured during operations.\n\n**Categories**: forecast_error | supplier_risk | logistics_delay | inventory_mismatch | quality_deviation | demand_signal_shift\n**Areas**: procurement | inventory | logistics | manufacturing | quality | demand_planning | warehousing\n\n---\n" > .learnings/LEARNINGS.md
[ -f .learnings/SUPPLY_CHAIN_ISSUES.md ] || printf "# Supply Chain Issues Log\n\nStockouts, delivery delays, supplier failures, quality rejections, and capacity breaches.\n\n---\n" > .learnings/SUPPLY_CHAIN_ISSUES.md
[ -f .learnings/FEATURE_REQUESTS.md ] || printf "# Feature Requests\n\nSupply chain tools, automation capabilities, and operational improvements.\n\n---\n" > .learnings/FEATURE_REQUESTS.md
```

Never overwrite existing files. This is a no-op if `.learnings/` is already initialised.

Do not log proprietary supplier pricing, negotiated contract terms, or customer-identifiable order data. Prefer aggregated metrics and redacted summaries over raw PO numbers or customer names.
This skill is documentation-only: it does not execute purchases, place orders, trigger procurement transactions, or call external payment systems.

If you want automatic reminders, use the opt-in hook workflow described in [Hook Integration](#hook-integration).

## Quick Reference

| Situation | Action |
|-----------|--------|
| Stockout event detected | Log to `.learnings/SUPPLY_CHAIN_ISSUES.md` with category `inventory_mismatch` |
| Delivery late or SLA missed | Log to `.learnings/SUPPLY_CHAIN_ISSUES.md` with category `logistics_delay` |
| Supplier lead time increased | Log to `.learnings/LEARNINGS.md` with category `supplier_ri

_meta.json

{
  "ownerId": "kn78jat5kd20evgyxzp9dmryax84qap0",
  "slug": "self-improving-supply-chain",
  "version": "1.2.1",
  "publishedAt": 1787944937922
}

references/examples.md

# Entry Examples

Concrete examples of well-formatted supply chain entries with all fields.

## Learning: Forecast Error (Seasonal Demand Spike)

```markdown
## [LRN-20250415-001] forecast_error

**Logged**: 2025-04-15T10:30:00Z
**Priority**: high
**Status**: pending
**Area**: demand_planning

### Summary
Q4 seasonal demand spike not captured in baseline forecast model, caused 30% understock on top 15 SKUs

### Details
The demand planning model used a 12-week rolling average with no seasonality decomposition.
Q4 holiday demand for gift-category SKUs spiked 45% above the rolling average. The model
predicted 8,200 units; actual demand was 11,900 units. This resulted in stockouts on 15 of
our top 50 SKUs for 9 days during peak selling season. Estimated lost revenue: $340,000.

The root cause is that the rolling average smooths out seasonal patterns. SKUs in the gift
category have a consistent Q4 lift that should be modeled with a seasonal index.

### Suggested Action
Implement seasonal decomposition (Holt-Winters or similar) for SKUs with >20% seasonal
variance. Apply category-level seasonal indices where item-level history is insufficient.
Validate forecast accuracy monthly using MAPE and bias metrics.

### Metadata
- Source: demand_forecast_review
- SKU Category: gift, seasonal
- Related Files: demand_model/forecast_q4_2025.xlsx
- Tags: forecast, seasonal, MAPE, understock, holiday
- Pattern-Key: forecast_error.seasonal_miss
- Impact: $340,000 lost revenue, 9-day stockout on 15 SKUs

---
```

## Learning: Supplier Risk (Single-Source Critical Component)

```markdown
## [LRN-20250416-001] supplier_risk

**Logged**: 2025-04-16T09:15:00Z
**Priority**: critical
**Status**: pending
**Area**: procurement

### Summary
Single-source supplier for MCU-7200 microcontroller with no qualified backup; 6-week lead time increase threatens production

### Details
Supplier Shenzhen MicroTech is the sole qualified source for the MCU-7200 microcontroller
used in our flagship product line. They communicated a lead time increase from 8 weeks to
14 weeks due to wafer allocation constraints at their foundry. No alternative supplier is
qualified, and qualifying a new source takes 16-20 weeks including first-article inspection.

Current inventory covers 5 weeks of production. With the new 14-week lead time, there is a
9-week gap that cannot be bridged without production line stoppage or emergency spot buys
at 3-4x standard cost.

### Suggested Action
1. Recommend bridge replenishment order for human approval before lead time extends further
2. Begin qualification of Taiwan Semiconductor Components as alternate source
3. Evaluate pin-compatible alternatives (MCU-7210, MCU-7250) for design flexibility
4. Add supplier diversification policy: no single-source for components with >$50K annual spend

### Metadata
- Source: supplier_communication
- Supplier: Shenzhen MicroTech (SMT-4421)
- Component: MCU-7200 microcontroller
- Related Files: procurement/supplier_scorecards/smt-44

references/hooks-setup.md

# Hook Setup Guide

Configure automatic supply chain self-improvement triggers for AI agents.

## Overview

Hooks enable proactive supply chain pattern capture by injecting reminders at key moments:
- **UserPromptSubmit**: Reminder after matching prompts to evaluate supply chain learnings
- **PostToolUse (Bash)**: Error detection when supply chain commands reveal disruptions, stockouts, or delays

## Claude Code Setup

### Option 1: Project-Level Configuration

Create `.claude/settings.json` in your project root:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "inventory|supplier|forecast|shipment|warehouse|procurement|logistics|stockout",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-supply-chain/scripts/activator.sh"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-supply-chain/scripts/error-detector.sh"
          }
        ]
      }
    ]
  }
}
```

### Option 2: User-Level Configuration (discouraged)

Do **not** install this hook globally. User-level hooks persist across all repositories and sessions. Keep hooks project-scoped. The example below is shown only so you can recognize and remove it:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "inventory|supplier|forecast|shipment|warehouse|procurement|logistics|stockout",
        "hooks": [
          {
            "type": "command",
            "command": "~/.claude/skills/self-improving-supply-chain/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

### Minimal Setup (Activator Only)

For lower overhead, use only the UserPromptSubmit hook:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "inventory|supplier|forecast|shipment|warehouse|procurement|logistics|stockout",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-supply-chain/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

## Codex CLI Setup

Codex uses the same hook system. Create `.codex/settings.json`:

```json
{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "inventory|supplier|forecast|shipment|warehouse|procurement|logistics|stockout",
        "hooks": [
          {
            "type": "command",
            "command": "./skills/self-improving-supply-chain/scripts/activator.sh"
          }
        ]
      }
    ]
  }
}
```

## GitHub Copilot Setup

Copilot doesn't support hooks. Add guidance to `.github/copilot-instructions.md`:

```markdown
## Supply Chain Self-Improvement

After resolving supply chain issues, consider logging to `.learnings/`:
- Stockouts, delays, quality problems → SUPPLY_CHAIN_ISSUES.md
- Forecast misses, supplier risks, demand shifts → LEARNINGS.md
- Tool/capability requests → FEATURE_REQUESTS.md

references/openclaw-integration.md

# OpenClaw Integration

Complete setup and usage guide for integrating the self-improving-supply-chain skill with OpenClaw.

## Overview

OpenClaw uses workspace-based prompt injection combined with event-driven hooks. Context is injected from workspace files at session start, and hooks can trigger on lifecycle events.

## Workspace Structure

```
~/.openclaw/
├── workspace/                   # Working directory
│   ├── AGENTS.md               # Multi-agent coordination patterns
│   ├── SOUL.md                 # Behavioral guidelines and personality
│   ├── TOOLS.md                # Tool capabilities and gotchas
│   ├── MEMORY.md               # Long-term memory (main session only)
│   └── memory/                 # Daily memory files
│       └── YYYY-MM-DD.md
├── skills/                      # Installed skills
│   └── self-improving-supply-chain/
│       └── SKILL.md
└── hooks/                       # Custom hooks
    └── self-improving-supply-chain/
        ├── HOOK.md
        └── handler.ts
```

## Quick Setup

### 1. Install the Skill

```bash
clawdhub install self-improving-supply-chain
```

Or copy manually:

```bash
cp -r self-improving-supply-chain ~/.openclaw/skills/
```

### 2. Install the Hook (Optional)

```bash
cp -r hooks/openclaw ~/.openclaw/hooks/self-improving-supply-chain
openclaw hooks enable self-improving-supply-chain
```

### 3. Create Learning Files

```bash
mkdir -p ~/.openclaw/workspace/.learnings
```

## Promotion Targets (Supply Chain-Specific)

When supply chain learnings prove broadly applicable, promote them to operational standards:

| Learning Type | Promote To | Example |
|---------------|------------|---------|
| Supplier performance patterns | Supplier scorecards | "Require dual-source for components >$50K annual spend" |
| Inventory buffer patterns | Safety stock policies | "Ocean-freight SKUs carry 3 weeks safety stock" |
| Routing optimizations | Routing playbooks | "Divert to Nansha port when Yantian queue >5 days" |
| Forecast accuracy patterns | Demand planning models | "Apply seasonal index for gift-category SKUs in Q4" |
| Quality failure patterns | Quality acceptance criteria | "Inspect 100% of first shipment from new suppliers" |
| Workflow improvements | `AGENTS.md` | "Run inventory reconciliation before reorder point calc" |

### Promotion Decision Tree

```
Is the learning project-specific?
├── Yes → Keep in .learnings/
└── No → Is it a supplier performance pattern?
    ├── Yes → Promote to supplier scorecard
    └── No → Is it an inventory/stock pattern?
        ├── Yes → Promote to safety stock policy
        └── No → Is it a logistics/routing pattern?
            ├── Yes → Promote to routing playbook
            └── No → Is it a forecast/demand pattern?
                ├── Yes → Promote to demand planning model
                └── No → Promote to TOOLS.md or AGENTS.md
```

## Supply Chain-Specific Detection Triggers

| Trigger | Action | Target |
|---------|--------|--------|
| Stockout or backord

Sponsored

Ads related to self-improving-supply-chain and adjacent AI workflows.