Skip to content

feat: Slack↔terminal bridge — Block Kit buttons relay Claude Code input via project channel #12

@davesleal

Description

@davesleal

Overview

Build a bridge so Dave can respond to Claude Code prompts directly from Slack instead of switching to the terminal. Prompts are routed to the project's own channel (e.g. #slackclaw-dev, #dayist-dev) so work stays organised per project.

Flow

  1. Claude Code needs input → detects current git repo → maps to project channel via orchestrator_config.py
  2. Posts to the project channel (e.g. #slackclaw-dev) with a Block Kit message + interactive buttons
  3. Dave clicks a button in Slack
  4. SlackClaw's action handler catches the click, writes the value to a named pipe (/tmp/claude_input)
  5. A wrapper script (claude-slack) feeds that back into Claude Code's stdin

Channel routing

  • Detect project from git remote get-url origin or cwd
  • Map to channel via CHANNEL_ROUTING in orchestrator_config.py
  • Fallback to #claude-code when no project context detected

What to build

  • claude-slack wrapper script — launches claude with stdin piped from /tmp/claude_input; intercepts questions and posts Block Kit button messages to the correct project channel
  • SlackClaw @app.action("claude_input") handler — receives button clicks from any project channel, writes value to named pipe, updates message to show selection
  • Block Kit message formatter — turns Claude Code prompts + options into button blocks

UX

  • Buttons appear in the project channel with actual option labels
  • After clicking, message updates to show the selected option
  • Stays in project channel — no cross-project noise
  • #claude-code used only as fallback for global/non-project sessions

Notes

  • Named pipe: mkfifo /tmp/claude_input && claude < /tmp/claude_input
  • SlackClaw must have interactivity enabled in Slack app settings
  • Buttons disabled after click to prevent double submission

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions