10,320 core deep-dives plus 93,000 role-scoped playbooks — how-to, cost, security, architecture, comparisons, debugging, prompt engineering, scaling and evals for every category of Claude loop.
Ship a Growth loop end-to-end: cron 07:00 local with ±3 min jitter → claude-sonnet-4-5 → fetch-mcp (headless browser) → a single Slack digest to #growth, threaded under a weekly anchor. Budget $0.008 – $0.02 per run, 18s for a 20-URL roster P95, and one kill switch that stops it silently melting your bill.
Ship a Claude Code loop end-to-end: GitHub webhook on issues.labeled == 'auto-fix' → claude-sonnet-4-5 (planner) → github-mcp → a review-ready PR with plan JSON, test log, cost, and a Claude-Code trailer. Budget $0.08 – $0.35 per run, 6 min end-to-end (label → PR open) P95, and one kill switch that stops it silently melting your bill.
Ship a Agents loop end-to-end: HTTP request or queue message → claude-sonnet-4-5 → Anthropic tool_use → a structured JSON response plus a replayable trace. Budget $0.03 – $0.20 per run, 6–12s per session P95, and one kill switch that stops it silently melting your bill.
Ship a RAG loop end-to-end: a user query, a Slack slash command, or a periodic re-index → claude-sonnet-4-5 → embedding-mcp → an answer with inline citations and a faithfulness score attached. Budget $0.006 – $0.05 per run, 1.8s (retrieve 250ms · rerank 400ms · answer 1.1s) P95, and one kill switch that stops it silently melting your bill.
Ship a Ops loop end-to-end: webhook from Datadog / PagerDuty / Alertmanager → claude-sonnet-4-5 → pagerduty-mcp → a Slack thread with severity, correlated alerts, and top-3 runbook links. Budget $0.004 – $0.02 per run, 800ms webhook-to-Slack P95, and one kill switch that stops it silently melting your bill.
Ship a Support loop end-to-end: Zendesk webhook on ticket.created → claude-haiku-4 → zendesk-mcp → a draft reply attached as an internal note plus suggested macros and tags. Budget $0.002 – $0.01 per run, 2.4s webhook-to-note P95, and one kill switch that stops it silently melting your bill.
Ship a Sales loop end-to-end: HubSpot webhook on contact.created + enrichment complete → claude-sonnet-4-5 → hubspot-mcp → a scored lead, a personalized reply draft, and a next-step task in the AE's queue. Budget $0.02 – $0.08 per run, 9s from lead created to draft ready P95, and one kill switch that stops it silently melting your bill.
Ship a Finance loop end-to-end: cron nightly + on-demand at close → claude-sonnet-4-5 → stripe-mcp → a variance report with anomalies flagged and journal entries pre-drafted. Budget $0.05 – $0.30 per run, 12 min for a full month of transactions P95, and one kill switch that stops it silently melting your bill.
Ship a Security loop end-to-end: GitHub push webhook + nightly cron for CVE feeds → claude-haiku-4 → gitleaks-mcp → an inline PR comment with severity, evidence, and remediation. Budget $0.003 – $0.02 per run, 3.2s push-to-comment P95, and one kill switch that stops it silently melting your bill.
Ship a Productivity loop end-to-end: cron each morning + calendar webhook for meetings → claude-haiku-4 → gcal-mcp → a personal daily brief in Slack DM plus a to-do list synced to Notion. Budget $0.001 – $0.006 per run, 4s per user P95, and one kill switch that stops it silently melting your bill.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Growth loops specifically, prompt returns NOTHING_MATERIAL and the loop posts a one-line 'all quiet'.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Claude Code loops specifically, plan JSON path-allowlist rejects any write outside declared files_to_edit.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Agents loops specifically, max_steps=8 hard cap that returns the partial trace.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For RAG loops specifically, faithfulness eval below 0.7 → return 'I don't know' + top-3 sources.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Ops loops specifically, confidence < 0.85 or novel signature → always page a human.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Support loops specifically, sentiment=negative or refund_amount>$50 → require human review.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Sales loops specifically, personalization score < 0.6 → draft-only, no auto-send.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Finance loops specifically, any suggested journal entry above $500 requires human approval.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Security loops specifically, any category > 40 alerts/day auto-throttles and pings the SecEng lead.
Cap step budget, verify every output, refuse-when-unsure, keep the prompt short, and always instrument $/run alongside p95. For Productivity loops specifically, brief exceeds 200 words → summarize the summary before send.
A production Growth loop runs $0.008 – $0.02 per run, ~30 runs/month, totaling ~$0.60. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4.
A production Claude Code loop runs $0.08 – $0.35 per run, ~120 runs/month, totaling ~$60. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4 (patcher).
A production Agents loop runs $0.03 – $0.20 per run, highly variable runs/month, totaling $50 – $500. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4.
A production RAG loop runs $0.006 – $0.05 per run, 1k – 100k runs/month, totaling $40 – $2k. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4 (re-ranker judge).
A production Ops loop runs $0.004 – $0.02 per run, 10k – 200k runs/month, totaling $40 – $1k. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4 (classifier).
A production Support loop runs $0.002 – $0.01 per run, 3k – 60k runs/month, totaling $10 – $600. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4.
A production Sales loop runs $0.02 – $0.08 per run, 1k – 20k runs/month, totaling $40 – $600. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4.
A production Finance loop runs $0.05 – $0.30 per run, 30 – 200 runs/month, totaling $15 – $60. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4.
A production Security loop runs $0.003 – $0.02 per run, 1k – 10k runs/month, totaling $10 – $200. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4.
A production Productivity loop runs $0.001 – $0.006 per run, 20 – 60 per user runs/month, totaling $1 – $5 per user. The two levers that halve it: cache aggressively and route hot paths to claude-haiku-4.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Growth specifically, public-web scraping only; robots.txt honored via fetch-mcp.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Claude Code specifically, GitHub App scoped to one repo; SOC2 evidence captured per run.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Agents specifically, tool inputs Zod-validated server-side; never trust model JSON.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For RAG specifically, row-level access enforced at retrieval; embeddings inherit source ACLs.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Ops specifically, audit trail persisted for SOC2 / ISO 27001 evidence.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Support specifically, PII redaction before persist; GDPR retention on ticket embeddings.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Sales specifically, CAN-SPAM / GDPR opt-out honored via shared suppression list.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Finance specifically, SOX-friendly: every mutation carries a signed audit record; SoD preserved.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Security specifically, SOC2 CC7.1 / ISO 27001 A.12.6 evidence auto-attached to each finding.
Scope secrets in a locker, sandbox every tool, sign every mutation, and write an audit ledger you can hand an auditor. For Productivity specifically, opt-in only; per-user data isolation; no cross-user embedding leakage.
Growth loop = cron 07:00 local with ±3 min jitter → claude-sonnet-4-5 → [fetch-mcp (headless browser) · diff-mcp · slack-mcp] → verify → a single Slack digest to #growth, threaded under a weekly anchor. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Claude Code loop = GitHub webhook on issues.labeled == 'auto-fix' → claude-sonnet-4-5 (planner) → [github-mcp · filesystem-mcp (sandboxed) · bash-mcp (egress-restricted)] → verify → a review-ready PR with plan JSON, test log, cost, and a Claude-Code trailer. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Agents loop = HTTP request or queue message → claude-sonnet-4-5 → [Anthropic tool_use · custom typed tools · redis for session state] → verify → a structured JSON response plus a replayable trace. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
RAG loop = a user query, a Slack slash command, or a periodic re-index → claude-sonnet-4-5 → [embedding-mcp · vector-mcp (pgvector or Qdrant) · cross-encoder re-ranker] → verify → an answer with inline citations and a faithfulness score attached. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Ops loop = webhook from Datadog / PagerDuty / Alertmanager → claude-sonnet-4-5 → [pagerduty-mcp · grafana-mcp · slack-mcp · runbook filesystem-mcp] → verify → a Slack thread with severity, correlated alerts, and top-3 runbook links. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Support loop = Zendesk webhook on ticket.created → claude-haiku-4 → [zendesk-mcp · kb-vector-mcp · stripe-mcp (for refunds)] → verify → a draft reply attached as an internal note plus suggested macros and tags. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Sales loop = HubSpot webhook on contact.created + enrichment complete → claude-sonnet-4-5 → [hubspot-mcp · clearbit-mcp · gmail-mcp · linkedin-scraper (rate-limited)] → verify → a scored lead, a personalized reply draft, and a next-step task in the AE's queue. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Finance loop = cron nightly + on-demand at close → claude-sonnet-4-5 → [stripe-mcp · quickbooks-mcp · csv-mcp · sheets-mcp] → verify → a variance report with anomalies flagged and journal entries pre-drafted. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Security loop = GitHub push webhook + nightly cron for CVE feeds → claude-haiku-4 → [gitleaks-mcp · trivy-mcp · semgrep-mcp · github-mcp] → verify → an inline PR comment with severity, evidence, and remediation. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Productivity loop = cron each morning + calendar webhook for meetings → claude-haiku-4 → [gcal-mcp · gmail-mcp · slack-mcp · notion-mcp] → verify → a personal daily brief in Slack DM plus a to-do list synced to Notion. Every arrow emits a span; every span carries cost + tokens; every failure is replayable from the ledger.
Build a Growth loop when you need any 'someone should check X every morning' workflow. Build a Ops loop when the task is closer to alert triage, incident summarization, config drift, on-call handoffs. The trigger tells you which side to pick.
Build a Claude Code loop when you need Dependabot-style upgrades, refactors described by a stable rule, missing tests. Build a Agents loop when the task is closer to research, triage, and orchestration where the answer shape changes per input. The trigger tells you which side to pick.
Build a Agents loop when you need research, triage, and orchestration where the answer shape changes per input. Build a Claude Code loop when the task is closer to Dependabot-style upgrades, refactors described by a stable rule, missing tests. The trigger tells you which side to pick.
Build a RAG loop when you need internal knowledge search, customer-facing docs, on-call runbooks. Build a Agents loop when the task is closer to research, triage, and orchestration where the answer shape changes per input. The trigger tells you which side to pick.
Build a Ops loop when you need alert triage, incident summarization, config drift, on-call handoffs. Build a Security loop when the task is closer to secret scanning, dep risk, IAM diff review, SOC2 evidence collection. The trigger tells you which side to pick.
Build a Support loop when you need tier-1 triage, macro suggestion, refund pre-approval, similar-case surfacing. Build a RAG loop when the task is closer to internal knowledge search, customer-facing docs, on-call runbooks. The trigger tells you which side to pick.
Build a Sales loop when you need inbound scoring, reply drafting, CRM enrichment, meeting-summary follow-ups. Build a Growth loop when the task is closer to any 'someone should check X every morning' workflow. The trigger tells you which side to pick.
Build a Finance loop when you need invoice parsing, spend anomaly detection, month-end close, AR aging. Build a Ops loop when the task is closer to alert triage, incident summarization, config drift, on-call handoffs. The trigger tells you which side to pick.
Build a Security loop when you need secret scanning, dep risk, IAM diff review, SOC2 evidence collection. Build a Ops loop when the task is closer to alert triage, incident summarization, config drift, on-call handoffs. The trigger tells you which side to pick.
Build a Productivity loop when you need personal standup writer, meeting splitters, inbox triage, focus-hour protection. Build a Growth loop when the task is closer to any 'someone should check X every morning' workflow. The trigger tells you which side to pick.