{"id":29682670,"url":"https://github.com/anandchowdhary/claude-code-slack-bot","last_synced_at":"2025-07-23T03:02:20.413Z","repository":{"id":305692190,"uuid":"1019433345","full_name":"AnandChowdhary/claude-code-slack-bot","owner":"AnandChowdhary","description":"🤖 Use Claude Code from a Slack bot, built on top of Claude Code Action","archived":false,"fork":false,"pushed_at":"2025-07-17T09:21:59.000Z","size":112,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-21T15:06:43.423Z","etag":null,"topics":["claude","claude-ai","claude-code","cloudflare-workers","github-actions","hono","slack","slack-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnandChowdhary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-14T10:13:02.000Z","updated_at":"2025-07-17T09:22:02.000Z","dependencies_parsed_at":"2025-07-21T15:18:07.627Z","dependency_job_id":null,"html_url":"https://github.com/AnandChowdhary/claude-code-slack-bot","commit_stats":null,"previous_names":["anandchowdhary/claude-code-slack-bot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AnandChowdhary/claude-code-slack-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fclaude-code-slack-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fclaude-code-slack-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fclaude-code-slack-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fclaude-code-slack-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnandChowdhary","download_url":"https://codeload.github.com/AnandChowdhary/claude-code-slack-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fclaude-code-slack-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266608969,"owners_count":23955545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","claude-ai","claude-code","cloudflare-workers","github-actions","hono","slack","slack-bot"],"created_at":"2025-07-23T03:00:50.830Z","updated_at":"2025-07-23T03:02:20.386Z","avatar_url":"https://github.com/AnandChowdhary.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Claude Code Slack integration\n\nSeamlessly 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](https://github.com/anthropics/claude-code-action).\n\n## 📸 How it works\n\n### 1. Request a feature in Slack\n\nWhen you mention the bot, it acknowledges your request and creates a GitHub issue:\n\n\u003cimg width=\"600\" alt=\"Slack request asking Claude Code to update README with a reply that its started work\" src=\"https://github.com/user-attachments/assets/01f1fe0c-86f7-4179-aad4-6d86cfb02611\" /\u003e\n\n### 2. Get real-time progress updates\n\nAs Claude Code works on your request, you'll see progress updates in the Slack thread:\n\n\u003cimg width=\"600\" alt=\"Slack thread showing progress of Claude Code updating README\" src=\"https://github.com/user-attachments/assets/115ccaaa-9362-4567-b534-f262a284aed3\" /\u003e\n\n### 3. Behind the scenes\n\nThe bot creates a GitHub issue with full context from your Slack conversation:\n\n\u003cimg width=\"600\" alt=\"Initial GitHub comment\" src=\"https://github.com/user-attachments/assets/e719223c-94c6-484f-aba8-35a8870866e3\" /\u003e\n\n## 🚀 Setup instructions\n\n### 📋 Prerequisites\n\n- Claude Code Action installed in your repository\n- Cloudflare account with Workers enabled\n- Slack workspace with admin access\n- GitHub repository with Claude Code configured\n- GitHub personal access token with `repo` scope\n- Node.js 18+ and npm/yarn\n\n### 1. Clone and install\n\n```bash\ngit clone https://github.com/your-org/claude-code-slack\ncd claude-code-slack\nnpm install\n```\n\n### 2. Configure Slack app\n\n1. Go to [api.slack.com/apps](https://api.slack.com/apps) and create a new app\n2. Choose \"From scratch\" and select your workspace\n3. Navigate to **OAuth \u0026 Permissions** and add these scopes:\n\n   **Bot token scopes:**\n\n   - `app_mentions:read` - Read messages that mention your app\n   - `chat:write` - Send messages as the bot\n   - `reactions:write` - Add emoji reactions\n   - `reactions:read` - View emoji reactions\n   - `channels:history` - View messages in public channels\n   - `groups:history` - View messages in private channels\n   - `im:history` - View messages in DMs\n   - `mpim:history` - View messages in group DMs\n\n4. Install the app to your workspace and copy the **Bot user OAuth token**\n\n### 3. Configure event subscriptions\n\n1. In your Slack app settings, go to **Event Subscriptions**\n2. Enable Events and add your Worker URL: `https://your-worker.workers.dev/slack/events`\n3. Subscribe to these bot events:\n   - `app_mention` - When someone mentions your bot\n   - `message.channels` - Messages in public channels (for thread replies)\n   - `message.groups` - Messages in private channels (for thread replies)\n   - `message.im` - Direct messages\n   - `message.mpim` - Group direct messages\n\n### 4. Set environment variables\n\nCreate a `.dev.vars` file for local development:\n\n```env\nSLACK_BOT_USER_OAUTH_TOKEN=xoxb-your-token\nGITHUB_TOKEN=ghp_your_token\nGITHUB_OWNER=your-org\nGITHUB_REPO=your-repo\n```\n\n### 5. Configure Cloudflare resources\n\n#### KV namespace\n\nCreate a KV namespace for storing issue-thread mappings:\n\n```bash\nwrangler kv:namespace create \"KV\"\n```\n\n#### Queue\n\nCreate a queue for handling progress checks:\n\n```bash\nwrangler queues create progress-checks\n```\n\nUpdate `wrangler.jsonc` with your resource IDs:\n\n```json\n{\n  \"name\": \"claude-code-slack\",\n  \"kv_namespaces\": [\n    {\n      \"binding\": \"KV\",\n      \"id\": \"your-kv-namespace-id\"\n    }\n  ],\n  \"queues\": {\n    \"producers\": [{ \"binding\": \"PROGRESS_QUEUE\", \"queue\": \"progress-checks\" }],\n    \"consumers\": [{ \"queue\": \"progress-checks\" }]\n  }\n}\n```\n\n### 6. Deploy to Cloudflare\n\n```bash\n# Deploy to production\nnpm run deploy\n\n# Or for development\nnpm run dev\n```\n\n## ⚙️ Configuration\n\n### Environment variables\n\n| Variable                     | Description                                    | Required |\n| ---------------------------- | ---------------------------------------------- | -------- |\n| `SLACK_BOT_USER_OAUTH_TOKEN` | Slack bot OAuth token                          | ✅       |\n| `GITHUB_TOKEN`               | GitHub personal access token with `repo` scope | ✅       |\n| `GITHUB_OWNER`               | GitHub organization or username                | ✅       |\n| `GITHUB_REPO`                | GitHub repository name                         | ✅       |\n\n### KV storage\n\nThe bot uses Cloudflare KV to store:\n\n- Issue-to-thread mappings (30-day TTL)\n- Enables persistent connection between Slack threads and GitHub issues\n\n### Queue system\n\nUses Cloudflare Queues to:\n\n- Handle progress monitoring asynchronously\n- Check for GitHub updates every 10 seconds\n- Automatically stop monitoring after 30 minutes or when work is complete\n\n## 🧪 Testing \u0026 debugging\n\n### Debug mode\n\nAdd `[DEBUG]` to any message to see detailed information:\n\n- Channel and thread details\n- KV storage operations\n- GitHub API calls\n- Queue processing steps\n\nExample:\n\n```\n@claude-bot [DEBUG] Can you help me fix the login button?\n```\n\n### Common issues\n\n1. **Bot not responding**:\n\n   - Verify OAuth scopes include all required permissions\n   - Check event subscriptions are properly configured\n   - Ensure bot is added to the channel\n\n2. **No GitHub issue created**:\n\n   - Confirm GitHub token has `repo` scope\n   - Verify GITHUB_OWNER and GITHUB_REPO are correct\n   - Check for API rate limits\n\n3. **Progress updates not appearing**:\n   - Ensure queue is properly configured in wrangler.jsonc\n   - Check queue consumer is running\n   - Verify KV namespace is accessible\n\n## 🔧 How it works\n\n1. **User mentions bot** → Bot adds 👀 reaction and creates GitHub issue\n2. **Issue created** → Claude Code starts working, queue monitors progress\n3. **Progress updates** → Every 10 seconds, check for new GitHub comments\n4. **Updates posted** → Convert GitHub markdown to Slack format and post\n5. **Completion detected** → When \"[Create PR ➔]\" appears or 30 minutes pass, remove 👀\n\n## 📝 License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fclaude-code-slack-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanandchowdhary%2Fclaude-code-slack-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fclaude-code-slack-bot/lists"}