notify-templates

bởi anthropic

Các mẫu định dạng cố định cho cảnh báo Slack, email nhà cung cấp và thông báo leo thang. Tải mục này bất cứ khi nào nhiệm vụ là "notify", "alert", "email" hoặc "tell ops".

npx skills add https://github.com/anthropics/cwc-workshops --skill notify-templates

Notification 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.

Low-stock Slack alert

:warning: *Low stock* — {{sku}} ({{product_name}})
On hand: {{on_hand}} · Reorder point: {{reorder_point}} · Days of cover: {{days_cover}}
{{action_line}}

action_line is either PO {{po_id}} placed for {{qty}} units (ETA {{eta}}) or Awaiting review — {{reason}}.

Supplier email

Subject: PO {{po_id}} — {{qty}} × {{sku}}

Hi {{supplier_name}},

Please confirm PO {{po_id}} for {{qty}} units of {{sku}} ({{product_name}}) at ${{unit_price}}/unit.
Requested delivery: {{requested_date}}. {{expedite_note}}

Thanks,
StockPilot

Escalation (human review needed)

:octagonal_sign: *Review needed* — {{sku}}
Recommended qty: {{qty}} (confidence {{confidence}})
Flags: {{flags_csv}}
Reason: {{reason}}

Routing (who gets what)

AudienceWhenExample
ops channel (default)Low-stock alerts, reorder recs, cycle-count adjustments, weekly reports.Almost everything.
ops with @hereActive 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.
FinanceOnly 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.

Batch, don't spam

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:

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")
'

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

  • days-of-cover. Do not echo the full alert text in your reply; it's already in the outbox.

How to send

Append directly to /mnt/user/sinks/outbox.jsonl via Bash — one JSON object per line, e.g.:

python -c 'import json; print(json.dumps({"channel": "ops", "sku": "SKU-0012", "message": "..."}))' \
  >> /mnt/user/sinks/outbox.jsonl

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.

Thêm skills từ anthropic

access
anthropic
Quản lý quyền truy cập kênh Discord — phê duyệt ghép cặp, chỉnh sửa danh sách cho phép, đặt chính sách DM/nhóm. Sử dụng khi người dùng yêu cầu ghép cặp, phê duyệt ai đó, kiểm tra ai được phép,…
official
session-report
anthropic
Tạo báo cáo HTML có thể khám phá về việc sử dụng phiên Claude Code (token, bộ nhớ đệm, tác nhân phụ, kỹ năng, lời nhắc tốn kém) từ bản ghi ~/.claude/projects.
official
build-mcp-server
anthropic
Kỹ năng này nên được sử dụng khi người dùng yêu cầu "xây dựng một máy chủ MCP", "tạo một MCP", "tạo tích hợp MCP", "bọc một API cho Claude", "cung cấp công cụ cho…
official
cookbook-audit
anthropic
Kiểm tra một notebook trong Anthropic Cookbook dựa trên tiêu chí đánh giá. Sử dụng khi có yêu cầu xem xét hoặc kiểm tra notebook.
official
handle-complaint
anthropic
Xử lý khiếu nại của khách hàng từ đầu đến cuối — lấy ngữ cảnh, soạn phản hồi và đề xuất giải pháp vận hành. Chấp nhận email hoặc ID ticket tùy chọn…
official
use-case-triage
anthropic
Nhanh chóng xác định xem một hoạt động xử lý có cần PIA, DPIA bắt buộc theo GDPR hay có thể tiến hành — phát hiện xung đột chính sách quyền riêng tư và định tuyến đến đúng…
official
board-minutes
anthropic
Soạn thảo biên bản cuộc họp hội đồng hoặc ủy ban theo định dạng của bạn. Tự động phát hiện các cuộc họp hội đồng và ủy ban sắp tới từ lịch của bạn, yêu cầu chương trình họp và…
official
renewal-tracker
anthropic
Hiển thị các hợp đồng có thời hạn hủy sắp đến và cảnh báo trước khi cửa sổ thông báo đóng, làm việc từ sổ đăng ký gia hạn được duy trì. Sử dụng khi người dùng yêu cầu…
official