setup tips & tricks — Slack × CMA webhook bridge

Bridge Slack @mentions to Claude Managed Agents and post results back to threads.

Updated May 7, 2026
One-click install
npx skills add https://github.com/Observatoriodomos/DomosMirador --skill setup-tips-tricks-slack-cma-webhook-bridge-observatoriodomos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup tips & tricks — Slack × CMA webhook bridge
Source: https://github.com/Observatoriodomos/DomosMirador/tree/main/claude-cookbooks/managed_agents/slack
Command: npx skills add https://github.com/Observatoriodomos/DomosMirador --skill setup-tips-tricks-slack-cma-webhook-bridge-observatoriodomos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @anthropic-ai/sdk, @slack/web-api.

What problem does it solve?

It solves the setup and debugging pain of building a stateless bridge between Slack mentions and Claude Managed Agents so replies land in the correct Slack thread reliably.

Core Features & Use Cases

  • Slack → Claude Managed Agents kickoff using a signed /slack/events webhook that dedupes retries and fires the session creation without waiting for the model run.
  • Claude webhook → Slack thread posting using a signed /cma-webhook endpoint that unwraps session.status_idled, retrieves the session metadata, and posts back to slack_channel + slack_thread_ts.
  • Production-grade gotchas and guardrails, including Slack 3-second ack requirements, workspace-scoped Anthropic webhooks, token prefix differences (xoxb- vs xapp-), idempotency, and filtering unrelated sessions.

Quick Start

Ask your agent to "walk me through setting this up" and follow its checklist to configure Slack app event subscriptions, Anthropic CMA webhook signing, and required environment variables, then run the bridge server.

Frequently Asked Questions about setup tips & tricks — Slack × CMA webhook bridge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I route Slack @mentions to Claude Managed Agents and get replies in the correct thread?

To route Slack @mentions to Claude Managed Agents, a bridge server captures signed `/slack/events` webhooks, creates a stateless CMA session, and later posts results back into the originating Slack thread using stored session metadata targeting `slack_channel` and `slack_thread_ts`.

How does a Claude Managed Agents webhook post results back to a Slack thread?

A Claude Managed Agents webhook posts results back to a Slack thread by routing `session.status_idled` signals through a `/cma-webhook` endpoint, retrieving session metadata, and calling Slack `chat.postMessage` with the correct bot token to target the original `slack_thread_ts`.

What Slack webhook event idempotency and HMAC verification steps are needed for Claude Managed Agents?

Slack webhook event idempotency and HMAC verification are needed to dedupe Slack retry payloads and validate request signatures, ensuring the bridge fires session creation only once per mention without waiting for the model run to complete.

Does a Slack CMA webhook bridge require different bot token scopes for event subscriptions and posting messages?

Yes, a Slack CMA webhook bridge requires correct bot token scopes and handles token prefix differences such as `xoxb-` versus `xapp-` to ensure the `chat.postMessage` call has the authorization needed to post replies into the originating thread.

Why does my Slack mention webhook timeout before Claude Managed Agents finishes processing?

Slack mention webhooks require a 3-second acknowledgment, so the bridge must fire CMA session creation immediately and return a response without waiting for the model run, relying on the later `/cma-webhook` callback to post the final results.

How do I filter unrelated Claude Managed Agents sessions when posting back to Slack threads?

To filter unrelated Claude Managed Agents sessions when posting back to Slack threads, the `/cma-webhook` endpoint uses a retrieve-then-filter approach on session metadata, ensuring only sessions matching the originating `slack_channel` and `slack_thread_ts` receive the `chat.postMessage` reply.