๐ค Claude Code Slack integration
Seamlessly connect Slack with Claude Code to turn your team’s feature requests and bug reports into GitHub issues with AI-powered implementation. Built with Cloudflare Workers, Hono, and TypeScript on top of Claude Code Action.
๐ธ How it works
1. Request a feature in Slack
When you mention the bot, it acknowledges your request and creates a GitHub issue:
2. Get real-time progress updates
As Claude Code works on your request, you’ll see progress updates in the Slack thread:
3. Behind the scenes
The bot creates a GitHub issue with full context from your Slack conversation:
๐ Setup instructions
๐ Prerequisites
- Claude Code Action installed in your repository
 - Cloudflare account with Workers enabled
 - Slack workspace with admin access
 - GitHub repository with Claude Code configured
 - GitHub personal access token with 
reposcope - Node.js 18+ and npm/yarn
 
1. Clone and install
git clone https://github.com/your-org/claude-code-slack
cd claude-code-slack
npm install
2. Configure Slack app
Go to api.slack.com/apps and create a new app
Choose “From scratch” and select your workspace
Navigate to OAuth & Permissions and add these scopes:
Bot token scopes:
app_mentions:read- Read messages that mention your appchat:write- Send messages as the botreactions:write- Add emoji reactionsreactions:read- View emoji reactionschannels:history- View messages in public channelsgroups:history- View messages in private channelsim:history- View messages in DMsmpim:history- View messages in group DMs
Install the app to your workspace and copy the Bot user OAuth token
3. Configure event subscriptions
- In your Slack app settings, go to Event Subscriptions
 - Enable Events and add your Worker URL: 
https://your-worker.workers.dev/slack/events - Subscribe to these bot events:
app_mention- When someone mentions your botmessage.channels- Messages in public channels (for thread replies)message.groups- Messages in private channels (for thread replies)message.im- Direct messagesmessage.mpim- Group direct messages
 
4. Set environment variables
Create a .dev.vars file for local development:
SLACK_BOT_USER_OAUTH_TOKEN=xoxb-your-token
GITHUB_TOKEN=ghp_your_token
GITHUB_OWNER=your-org
GITHUB_REPO=your-repo
5. Configure Cloudflare resources
KV namespace
Create a KV namespace for storing issue-thread mappings:
wrangler kv:namespace create "KV"
Queue
Create a queue for handling progress checks:
wrangler queues create progress-checks
Update wrangler.jsonc with your resource IDs:
{
  "name": "claude-code-slack",
  "kv_namespaces": [
    {
      "binding": "KV",
      "id": "your-kv-namespace-id"
    }
  ],
  "queues": {
    "producers": [{ "binding": "PROGRESS_QUEUE", "queue": "progress-checks" }],
    "consumers": [{ "queue": "progress-checks" }]
  }
}
6. Deploy to Cloudflare
# Deploy to production
npm run deploy
# Or for development
npm run dev
โ๏ธ Configuration
Environment variables
| Variable | Description | Required | 
|---|---|---|
SLACK_BOT_USER_OAUTH_TOKEN | 
Slack bot OAuth token | โ | 
GITHUB_TOKEN | 
GitHub personal access token with repo scope | 
โ | 
GITHUB_OWNER | 
GitHub organization or username | โ | 
GITHUB_REPO | 
GitHub repository name | โ | 
KV storage
The bot uses Cloudflare KV to store:
- Issue-to-thread mappings (30-day TTL)
 - Enables persistent connection between Slack threads and GitHub issues
 
Queue system
Uses Cloudflare Queues to:
- Handle progress monitoring asynchronously
 - Check for GitHub updates every 10 seconds
 - Automatically stop monitoring after 30 minutes or when work is complete
 
๐งช Testing & debugging
Debug mode
Add [DEBUG] to any message to see detailed information:
- Channel and thread details
 - KV storage operations
 - GitHub API calls
 - Queue processing steps
 
Example:
@claude-bot [DEBUG] Can you help me fix the login button?
Common issues
Bot not responding:
- Verify OAuth scopes include all required permissions
 - Check event subscriptions are properly configured
 - Ensure bot is added to the channel
 
No GitHub issue created:
- Confirm GitHub token has 
reposcope - Verify GITHUB_OWNER and GITHUB_REPO are correct
 - Check for API rate limits
 
- Confirm GitHub token has 
 Progress updates not appearing:
- Ensure queue is properly configured in wrangler.jsonc
 - Check queue consumer is running
 - Verify KV namespace is accessible
 
๐ง How it works
- User mentions bot โ Bot adds ๐ reaction and creates GitHub issue
 - Issue created โ Claude Code starts working, queue monitors progress
 - Progress updates โ Every 10 seconds, check for new GitHub comments
 - Updates posted โ Convert GitHub markdown to Slack format and post
 - Completion detected โ When “[Create PR โ]” appears or 30 minutes pass, remove ๐
 
