uiskill.sh

coffee-roast-workflow

Guides coffee roasting batch workflow from green bean selection to quality control. Use when user says "start a roast", "create roast batch", "roasting workflow", or "quality check after roasting".

Agent SkillClaude Code, Claude.aiMITMCP: cafe-os-api4 installsv1.0.0
Allowed Tools: Bash(python:*) WebFetch

SKILL.md (Anthropic Format)

---
name: coffee-roast-workflow
description: "Guides coffee roasting batch workflow from green bean selection to quality control. Use when user says \"start a roast\", \"create roast batch\", \"roasting workflow\", or \"quality check after roasting\"."
license: MIT
compatibility: Claude Code, Claude.ai
allowed-tools: "Bash(python:*) WebFetch"
metadata:
  author: cafe-os
  version: 1.0.0
  mcp-server: cafe-os-api
---

# Coffee Roast Workflow

## Instructions

### Step 1: Select Green Beans
Fetch available green bean inventory.
- Check stock levels (minimum 500g required)
- Verify bean origin and grade metadata
- Confirm moisture content is within 10-12% range

### Step 2: Choose Recipe
Load roast recipe matching the selected beans.
- Match bean blend ratios
- Confirm target first-crack temperature
- Verify roaster machine capacity

### Step 3: Execute Roast Batch
Create a new roast batch record.
- Set batch size from recipe
- Record start time
- Monitor roast curve data points

### Step 4: Quality Control
After roasting completes:
1. Record final weight and calculate loss rate
2. Measure moisture content (target: 1-3%)
3. Measure Agtron color score
4. Record cupping score (if available)

CRITICAL: Loss rate must be between 12-20%. Flag for review if outside range.

### Step 5: Update Inventory
- Deduct green bean consumption from inventory
- Add roasted product to finished goods inventory
- Calculate final cost per gram

## Examples

### Example 1: Full roast workflow
User says: "Start a roast with Ethiopian Yirgacheffe"
Actions:
1. Search green beans for Ethiopian Yirgacheffe
2. Check stock >= 500g
3. Find matching recipe
4. Create roast batch
5. Guide through QC after completion
Result: Roast batch created, QC recorded, inventory updated

### Example 2: Post-roast quality check
User says: "Quality check batch #42"
Actions:
1. Fetch batch #42 details
2. Prompt for final weight, moisture, Agtron
3. Calculate loss rate
4. Flag if out of range
Result: QC data recorded, batch status updated

### Example 3: Cost calculation
User says: "What's the cost per gram for today's roast?"
Actions:
1. Fetch latest roast batch
2. Get green bean unit cost
3. Calculate: final cost = unit cost × batch size / final weight
Result: Cost per gram displayed with margin analysis

## Troubleshooting

### Error: Insufficient green bean stock
Cause: Available stock is below minimum batch size (500g)
Solution: Check pending purchase orders or reduce batch size in recipe

### Error: Loss rate out of range
Cause: Roast too light (<12%) or too dark (>20%)
Solution: Review roast curve and adjust recipe parameters. Check roaster calibration.

### Error: Missing QC data
Cause: Quality control fields not fully completed
Solution: Ensure final weight, moisture content, and Agtron score are all recorded before marking batch as complete

## Reference Files

For detailed roast level standards, see `references/roast-levels.md`.
For post-roast quality checklist, see `references/qc-checklist.md`.