
Slack
Run a stateful local Slack Web API emulator so you can develop bots, OAuth, and webhooks without calling production Slack.
Overview
slack is an agent skill most often used in Ship (also Build integrations) that runs an emulated Slack Web API locally for channels, OAuth, webhooks, and bot testing.
Install
npx skills add https://github.com/vercel-labs/emulate --skill slackWhat is this skill?
- Stateful Slack Web API emulation: channels, messages, threads, reactions, OAuth v2, incoming webhooks
- `npx emulate --service slack` on default port 4000 (or custom port via `createEmulator`)
- Bearer token auth with `Authorization: Bearer <token>`; seeded fallback user when token omitted
- Dispatches `event_callback` payloads to configured webhook URLs on state changes
- Allowed tools include Bash for `npx emulate`, `emulate`, and `curl` against local endpoints
- Default standalone port documented as http://localhost:4000
- Programmatic example uses port 4003 with createEmulator
Adoption & trust: 72 installs on skills.sh; 1.3k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need realistic Slack API behavior in development without hitting the live API, burning rate limits, or mutating a real workspace.
Who is it for?
Solo builders implementing Slack bots, OAuth v2, or incoming webhooks who want curl-friendly local parity before deploy.
Skip if: Production Slack operations, compliance reviews of real workspace data, or teams that only need Slack SDK mocks with zero HTTP server.
When should I use this skill?
Slack API, emulate Slack, mock Slack, test Slack OAuth, Slack bot, incoming webhook, local Slack, or any task requiring a local Slack API.
What do I get? / Deliverables
You start the Slack emulator, redirect your app via environment URL, and validate Web API flows—including event callbacks—entirely on localhost.
- Running local Slack emulator instance with documented base URL
- Validated Web API flows via curl or app client against emulated endpoints
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Local API emulation is primarily a Ship concern—proving integrations safely before release—while also supporting Build-time connector work. Mocking channels, messages, threads, and OAuth fits the testing subphase where integrations are exercised without external side effects.
Where it fits
Point a new Slack bot client at `http://localhost:4003` while implementing message.post and thread replies.
Run OAuth v2 and auth.test curls against Bearer tokens before promoting the app to a real workspace.
Verify incoming webhooks receive `event_callback` payloads when channel state changes in the emulator.
How it compares
Local HTTP Slack emulator—not Slack’s official sandbox or a static JSON mock with no state or event_callback delivery.
Common Questions / FAQ
Who is slack for?
Developers integrating Slack Web API features who want agent-guided setup of the emulate package for local channels, auth, and webhooks.
When should I use slack?
During Ship testing to validate bots and OAuth without production Slack; during Build integrations when coding against Slack endpoints; when prompts say emulate Slack, mock Slack, or test incoming webhooks locally.
Is slack safe to install?
Review the Security Audits panel on this page; local emulation still runs a network service—avoid exposing it publicly without hardening.
SKILL.md
READMESKILL.md - Slack
# Slack API Emulator Fully stateful Slack Web API emulation with channels, messages, threads, reactions, OAuth v2, and incoming webhooks. State changes dispatch `event_callback` payloads to configured webhook URLs. ## Start ```bash # Slack only npx emulate --service slack # Default port (when run alone) # http://localhost:4000 ``` Or programmatically: ```typescript import { createEmulator } from 'emulate' const slack = await createEmulator({ service: 'slack', port: 4003 }) // slack.url === 'http://localhost:4003' ``` ## Auth Pass tokens as `Authorization: Bearer <token>`. All Web API endpoints require authentication. ```bash curl -X POST http://localhost:4003/api/auth.test \ -H "Authorization: Bearer test_token_admin" ``` When no token is provided, requests fall back to the first seeded user. ## Pointing Your App at the Emulator ### Environment Variable ```bash SLACK_EMULATOR_URL=http://localhost:4003 ``` ### Slack SDK / Bolt ```typescript import { WebClient } from '@slack/web-api' const client = new WebClient(token, { slackApiUrl: `${process.env.SLACK_EMULATOR_URL}/api/`, }) ``` ### OAuth URL Mapping | Real Slack URL | Emulator URL | |----------------|-------------| | `https://slack.com/oauth/v2/authorize` | `$SLACK_EMULATOR_URL/oauth/v2/authorize` | | `https://slack.com/api/oauth.v2.access` | `$SLACK_EMULATOR_URL/api/oauth.v2.access` | ### Auth.js / NextAuth.js ```typescript { id: 'slack', name: 'Slack', type: 'oauth', authorization: { url: `${process.env.SLACK_EMULATOR_URL}/oauth/v2/authorize`, params: { scope: 'chat:write,channels:read,users:read' }, }, token: { url: `${process.env.SLACK_EMULATOR_URL}/api/oauth.v2.access`, }, clientId: process.env.SLACK_CLIENT_ID, clientSecret: process.env.SLACK_CLIENT_SECRET, } ``` ## Seed Config ```yaml slack: team: name: My Workspace domain: my-workspace users: - name: developer real_name: Developer email: dev@example.com is_admin: true - name: designer real_name: Designer email: designer@example.com channels: - name: general topic: General discussion - name: engineering topic: Engineering discussions is_private: true bots: - name: my-bot oauth_apps: - client_id: "12345.67890" client_secret: example_client_secret name: My Slack App redirect_uris: - http://localhost:3000/api/auth/callback/slack incoming_webhooks: - channel: general label: CI Notifications signing_secret: my_signing_secret ``` When no OAuth apps are configured, the emulator accepts any `client_id`. With apps configured, strict validation is enforced for `client_id`, `client_secret`, and `redirect_uri`. ## API Endpoints ### Auth ```bash # Test authentication curl -X POST http://localhost:4003/api/auth.test \ -H "Authorization: Bearer $TOKEN" ``` ### Chat ```bash # Post message curl -X POST http://localhost:4003/api/chat.postMessage \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"channel": "C000000001", "text": "Hello from the emulator!"}' # Post threaded reply curl -X POST http://localhost:4003/api/chat.postMessage \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"channel": "C000000001", "text": "Thread reply", "thread_ts": "1234567890.123456"}' # Update message curl -X POST http://localhost:400