Claude Code Slack banner
jwyang21 jwyang21

Claude Code Slack

AI community

Description

Using a personal Slack workspace and a custom Slack bot to (1) control a Claude Code agent running in a server's tmux session, and (2) make direct Anthropic API calls to the Claude model — independent of the tmux session — for one-off tasks and questions

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

claude-code-slack

This repository is to explain codes to control Claude Code running in tmux pane via slack app. For the explanation of overall methods to use Claude Code (e.g., installing, re-installing, creating rules and/or skills, etc), refer to [claude-code-setting](https://github.com/jwyang21/claude-code-setting) repository.

Main Functions

  • To control a Claude Code agent running in a server's tmux session
  • To make direct Anthropic API calls to the Claude model — independent of the tmux session — for one-off tasks and questions.

Requirements

  • A personal Slack workspace (Free Edition also works!)
  • A custom Slack bot (files in manual/ explains detailed guidelines to make this bot)

Repository Structure

claude-code-slack/
├── src/
│   ├── index.js                      # Main bot code — all Slack handlers, tmux control, API calls
│   ├── .env_example                  # An example of src/.env file (see security note below)
│   └── package.json                  # npm dependencies and start script
├── manual/
│   ├── claude-slack-manual-EN.pptx   # Step-by-step setup guide (English)
│   ├── claude-slack-manual-KO.pptx   # Step-by-step setup guide (Korean)
│   └── index_commented.js            # Main bot code (src/index.js) with comments. Created by Claude.
├── assets/
│   └── overview.png                  # Architecture diagram used in the README
├── .gitignore                        # Specifies files and directories to be ignored by Git
├── LICENSE                           # MIT license
└── README.md                         # This file

What each directory contains

`src/`

The runnable bot. Everything needed to start the bot lives here.

  • index.js — The entire bot in a single Node.js file. Handles the /claude, /tmux-connect, /tmux, /tmux-status, and /tmux-disconnect slash commands, routes thread replies, polls the tmux pane every 3 seconds for permission prompts, and makes streaming calls to the Anthropic A