Slack app for running Claude Code CLI commands
Project description
Claude Code, but in Slack. Access Claude Code remotely from any device, or use it full-time for a better UI experience.
Why Slack?
| Feature | Terminal | Slack |
|---|---|---|
| Code blocks | Plain text | Syntax-highlighted with copy button |
| Long output | Scrolls off screen | "View Details" modal |
| Permissions | Y/n prompts | Approve/Deny buttons |
| Parallel work | Multiple terminals | Threads = isolated sessions |
| File sharing | cat or copy-paste |
Drag & drop with preview |
| Notifications | Watch the terminal | Alerts when tasks complete |
| Streaming | Live terminal output | Watch responses as they generate |
| Smart context | Manual file inclusion | Frequently-used files auto-included |
Installation
Prerequisites
- Python 3.10+
- Claude Code CLI installed and authenticated
1. Install the ccslack executable
pipx install slack-claude-code
2. Create Slack App
Go to https://api.slack.com/apps → "Create New App" → "From scratch"
Socket Mode: Enable and create an app-level token with connections:write scope (save the xapp- token)
Bot Token Scopes (OAuth & Permissions):
chat:write,commands,channels:history,app_mentions:read,files:write
Event Subscriptions: Enable and add message.channels, app_mention
App Icon: In "Basic Information" → "Display Information", upload assets/claude_logo.png from this repo as the app icon
Slash Commands: Add the commands from the tables below (or the subset that you plan to use)
Configuration
Customize Claude's behavior for your workflow.
| Command | Description | Example |
|---|---|---|
/model |
Show or change AI model | /model sonnet |
/mode |
Set permission mode | /mode plan |
/permissions |
View/update permissions | /permissions |
/notifications |
Configure notifications | /notifications |
Session Management
Each Slack thread maintains an isolated Claude session with its own context.
| Command | Description | Example |
|---|---|---|
/clear |
Reset conversation | /clear |
/compact |
Compact context | /compact |
/cost |
Show session cost | /cost |
/resume |
Resume previous session | /resume |
/sessions |
List active sessions | /sessions |
/session-cleanup |
Clean up inactive sessions | /session-cleanup |
Navigation
Control the working directory for Claude's file operations.
| Command | Description | Example |
|---|---|---|
/ls |
List directory contents | /ls src/ |
/cd |
Change working directory | /cd /home/user/project |
/pwd |
Print working directory | /pwd |
/add-dir |
Add directory to context | /add-dir ./lib |
CLI Tools
Direct access to Claude Code CLI functionality.
| Command | Description | Example |
|---|---|---|
/init |
Initialize project config | /init |
/memory |
View/edit Claude's memory | /memory |
/review |
Review code changes | /review |
/doctor |
Diagnose installation | /doctor |
/stats |
Show session statistics | /stats |
/context |
Display context info | /context |
/todos |
List and manage todos | /todos |
/claude-help |
Show Claude Code help | /claude-help |
/claude-config |
Show configuration | /claude-config |
Multi-Agent Tasks
Autonomous Planner → Worker → Evaluator pipeline for complex tasks. Iterates up to 3 times until complete.
| Command | Description | Example |
|---|---|---|
/task |
Start a multi-agent task | /task add unit tests for UserService |
/tasks |
List active tasks with status | /tasks |
/task-cancel |
Cancel a running task | /task-cancel abc123 |
Command Queue
Queue commands for sequential execution while preserving Claude's session context across items.
| Command | Description | Example |
|---|---|---|
/q |
Add command to queue | /q analyze the API endpoints |
/qv |
View queue status | /qv |
/qc |
Clear pending queue | /qc |
/qr |
Remove specific item | /qr 5 |
Jobs & Control
Monitor and control long-running operations with real-time progress updates.
| Command | Description | Example |
|---|---|---|
/st |
Show active job status | /st |
/cc |
Cancel jobs | /cc or /cc abc123 |
/esc |
Send interrupt (Ctrl+C) | /esc |
Git
Full git workflow without leaving Slack. Includes branch name and commit message validation.
| Command | Description | Example |
|---|---|---|
/status |
Show branch and changes | /status |
/diff |
Show uncommitted changes | /diff --staged |
/commit |
Commit staged changes | /commit fix: resolve race condition |
/branch |
Manage branches | /branch create feature/auth |
3. Configure
Key environment variables (see .env.example for optional settings):
# Required
SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
SLACK_SIGNING_SECRET=...
Where to find these values:
SLACK_BOT_TOKEN: Your App → OAuth & Permissions → Bot User OAuth TokenSLACK_APP_TOKEN: Your App → Basic Information → App-Level Tokens → (token you created withconnections:write)SLACK_SIGNING_SECRET: Your App → Basic Information → App Credentials → Signing Secret
4. Start the Slack bot
You can now run ccslack in your terminal. The working directory where you start the executable will be the defualt working direcotry for your Claude Code session(s). If you have a .env file in this directory, it will automatically be loaded.
Usage
Type messages in any channel where the bot is installed. The main channel is a single Claude Code session. If you click reply to any message and start a thread, this will be a new Claude Code session.
Architecture
src/
├── app.py # Main entry point
├── config.py # Configuration
├── database/ # SQLite persistence (models, migrations, repository)
├── claude/ # Claude CLI integration (streaming)
├── handlers/ # Slack command handlers
├── agents/ # Multi-agent orchestration (planner→worker→evaluator)
├── approval/ # Permission & plan approval handling
├── git/ # Git operations (status, diff, commit, branch)
├── hooks/ # Event hook system
├── question/ # AskUserQuestion tool support
├── tasks/ # Background task management
└── utils/ # Formatters, helpers, validators
Troubleshooting
| Problem | Solution |
|---|---|
| Configuration errors on startup | Check .env has all required tokens |
| Commands not appearing | Verify slash commands in Slack app settings |
License
MIT
Congratulations, you can now use Claude Code from anywhere 🎉💪
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slack_claude_code-0.1.3.tar.gz.
File metadata
- Download URL: slack_claude_code-0.1.3.tar.gz
- Upload date:
- Size: 83.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec98d59f4739d8ae6b02b463873c43f694637008bcb843c7ed9e7a45390d17fd
|
|
| MD5 |
87949a5c65f83013a9c2d6170a64d94b
|
|
| BLAKE2b-256 |
6ff01321bfd8b37708176c797ec019a75bb6f2eea8cb798f2ffb7203348a1de5
|
Provenance
The following attestation bundles were made for slack_claude_code-0.1.3.tar.gz:
Publisher:
release.yml on djkelleher/slack-claude-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slack_claude_code-0.1.3.tar.gz -
Subject digest:
ec98d59f4739d8ae6b02b463873c43f694637008bcb843c7ed9e7a45390d17fd - Sigstore transparency entry: 833533487
- Sigstore integration time:
-
Permalink:
djkelleher/slack-claude-code@919949792537c138dd066e8a9e768a41967aa63d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/djkelleher
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@919949792537c138dd066e8a9e768a41967aa63d -
Trigger Event:
push
-
Statement type:
File details
Details for the file slack_claude_code-0.1.3-py3-none-any.whl.
File metadata
- Download URL: slack_claude_code-0.1.3-py3-none-any.whl
- Upload date:
- Size: 108.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07d933bde4367138d97616c8506b13d46d27c7eee847cf83dd4d6f14ac9bed96
|
|
| MD5 |
2624a4ce0cdd3b0a852ecdb313f70f9e
|
|
| BLAKE2b-256 |
c17bb99be67c1b6cc336004864f91550b9f5b995d2a22dcbebb600c63229c104
|
Provenance
The following attestation bundles were made for slack_claude_code-0.1.3-py3-none-any.whl:
Publisher:
release.yml on djkelleher/slack-claude-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slack_claude_code-0.1.3-py3-none-any.whl -
Subject digest:
07d933bde4367138d97616c8506b13d46d27c7eee847cf83dd4d6f14ac9bed96 - Sigstore transparency entry: 833533488
- Sigstore integration time:
-
Permalink:
djkelleher/slack-claude-code@919949792537c138dd066e8a9e768a41967aa63d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/djkelleher
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@919949792537c138dd066e8a9e768a41967aa63d -
Trigger Event:
push
-
Statement type: