algo-mfg-cpklisted
Install: claude install-skill charlieviettq/awesome-agent-skill
# Cpk Process Capability Index
## Overview
Cpk measures how well a process fits within specification limits, accounting for both variation (spread) and centering. Cpk = min((USL - μ) / 3σ, (μ - LSL) / 3σ). Cpk ≥ 1.33 is typically required; Cpk ≥ 1.67 for critical characteristics. Unlike Cp, Cpk penalizes off-center processes.
## When to Use
**Trigger conditions:**
- Assessing whether a manufacturing process can meet customer specifications
- Comparing capability across processes, machines, or time periods
- Qualifying a process for production readiness
**When NOT to use:**
- When the process is not in statistical control (stabilize first with SPC)
- For non-normal distributions without transformation
## Algorithm
```
IRON LAW: Cpk Is Only Valid for a STABLE, IN-CONTROL Process
Computing Cpk on an unstable process gives a meaningless number.
The process MUST be in statistical control (per SPC charts) before
capability analysis. An unstable process with Cpk=2.0 today may
produce defects tomorrow when it shifts.
```
### Phase 1: Input Validation
Collect: 100+ measurements from a stable process. Determine: USL, LSL (customer specifications). Verify process is in control (SPC charts show stability).
**Gate:** Process in control, specifications defined, 100+ data points.
### Phase 2: Core Algorithm
1. Compute process mean: μ = Σxᵢ / n
2. Compute process standard deviation: σ = estimated from R-bar/d₂ or S-bar/c₄ (within-subgroup) — NOT overall std dev
3. Cp = (USL - LSL) /