npx skills add ...
npx skills add anthropics/cwc-workshops --skill notify-templates
Fixed-format templates for Slack alerts, supplier emails, and escalations. Load this whenever the task is "notify", "alert", "email", or "tell ops".
npx skills add anthropics/cwc-workshops --skill notify-templates
Notifications are template fills, not creative writing. Do not spawn a subagent for this. Fill the slots from data you already have, then append the result to the outbox.
action_line is either PO {{po_id}} placed for {{qty}} units (ETA {{eta}}) or Awaiting review — {{reason}}.
| Audience | When | Example |
|---|---|---|
ops channel (default) | Low-stock alerts, reorder recs, cycle-count adjustments, weekly reports. | Almost everything. |
ops with @here | Active or imminent stockout on a top-100 SKU, or a supplier delay that causes a stockout within 7 days. | "0 on hand at WH-EAST, network out in <1d" |
| Purchasing lead (DM/email, not channel) | Single PO > $25k, deviation from the scored supplier, or new-supplier consideration. | |
| Finance | Only if open-PO balance for one supplier would exceed $100k, or suspected duplicate POs. Nothing routine. |
When you escalate beyond the default channel, add one line saying which threshold was crossed.
For sweeps and daily checks, send one summary notification, not one per SKU. The low-stock template above is for a single-SKU task; for a sweep, compose a single message listing the actioned SKUs (and any deferred) and send it once at the end.
When the task explicitly asks for one alert per SKU (e.g. "send a personalized alert for each of the top 10"): fill the template once per SKU and write all lines to the outbox in one Bash heredoc, like:
Do not call send_slack_alert (or any subagent) once per SKU — that's
N model round-trips for template-filling.
After sending a batch, your final response should be a brief confirmation ("✓ 10 alerts sent to ops — see outbox") plus a compact table of SKU + on-hand
Append directly to /mnt/user/sinks/outbox.jsonl via Bash — one JSON object
per line, e.g.:
Use json.dumps so newlines in the message are escaped (raw echo would
break the JSONL). That's the whole job: one read for the data you need (if
you don't have it), one append. If you're making more than two calls to send
a notification, you've over-engineered it.
:octagonal_sign: *Review needed* — {{sku}}
Recommended qty: {{qty}} (confidence {{confidence}})
Flags: {{flags_csv}}
Reason: {{reason}}python -c '
import json
rows = [...top-10 from batch_days_of_cover.py...]
with open("/mnt/user/sinks/outbox.jsonl", "a") as f:
for r in rows:
f.write(json.dumps({"channel": "ops", "sku": r["sku"],
"message": f":warning: Low stock — {r[\"sku\"]} ..."}) + "\n")
'python -c 'import json; print(json.dumps({"channel": "ops", "sku": "SKU-0012", "message": "..."}))' \
>> /mnt/user/sinks/outbox.jsonl