Add claude-slack-test command and standardize paths to ~/.claude/slack/#12
Open
BRBCoffeeDebuff wants to merge 1 commit into
Open
Conversation
New Features: - Add claude-slack-test command for testing Slack connection - Add --local flag to test directory-level hook configuration - Add optional --description flag to claude-slack for meaningful thread descriptions Path Standardization: - Consolidate all paths to ~/.claude/slack/ directory structure: - ~/.claude/slack/logs/ for all log files - ~/.claude/slack/sockets/ for Unix sockets - ~/.claude/slack/registry.db for session database - Remove hardcoded /tmp/ paths that were inconsistent with config.py defaults - Update .env.example to show correct default paths (commented out) - Fix .env to not override defaults with /tmp/ paths Files Changed: - bin/claude-slack-test (new): Test Slack connection and directory setup - bin/claude-slack: Add --description and --help flags - bin/claude-slack-listener: Fix monitor log path - bin/claude-slack-monitor: Add env loading, fix log paths - bin/claude-slack-debug: Fix log/socket directory paths - core/slack_listener.py: Use get_socket_dir() for legacy socket - core/claude_wrapper_hybrid.py: Use LOG_DIR for buffer files - core/session_registry.py: Add description support in Slack threads - hooks/on_*.py: Add LOG_DIR, fix debug log paths - README.md, SECURITY.md: Update path references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claude-slack-testcommand for testing Slack connection--localflag to test directory-level hook configuration--descriptionflag toclaude-slackfor meaningful thread descriptions~/.claude/slack/directory structureProblem
1. No way to test Slack connection
Users had no simple way to verify their Slack setup was working before starting a session. If something was misconfigured, they'd only find out after starting Claude and wondering why messages weren't appearing.
2. Inconsistent path configuration
The codebase had paths scattered across multiple locations with inconsistent defaults:
.env/.env.example/tmp/claude_socks,/tmp/claude_sessions/config.py~/.claude/slack/slack_listener.py/tmp/claude_slack.sockclaude_wrapper_hybrid.py/tmp/claude_output_*.txthooks/*.py/tmp/*_hook_debug.logbin/claude-slack-monitor/tmp/slack_*.logbin/claude-slack-debug~/.local/share/claude-code-integration/This caused:
/tmp/is cleared on system restart/tmp/may have different permissions3. No way to add context to Slack threads
When multiple sessions are running, thread headers only showed the project name. Users couldn't tell which session was for what task without opening the thread.
4. No per-directory setup verification
Users couldn't verify if a specific project directory had hooks properly configured before starting a session.
Solution
New
claude-slack-testcommandPath standardization
All components now consistently use
~/.claude/slack/(configurable via environment variables):Optional session descriptions
claude-slack -d "Working on authentication feature"Creates thread with description visible in header:
Files Changed
New:
bin/claude-slack-test- Test command with--localflagModified for path consistency:
core/slack_listener.py- Useget_socket_dir()for legacy socketcore/claude_wrapper_hybrid.py- UseLOG_DIRfor buffer fileshooks/on_notification.py- AddLOG_DIR, fix debug log and buffer pathshooks/on_stop.py- AddLOG_DIR, fix debug log pathhooks/on_pretooluse.py- AddLOG_DIR, fix debug log pathhooks/check_hook_status.sh- Fix debug log default pathbin/claude-slack-listener- Fix monitor log pathbin/claude-slack-monitor- Add env loading, fix all log pathsbin/claude-slack-debug- Fix log/socket directory pathsModified for description feature:
bin/claude-slack- Add--descriptionand--helpflagscore/claude_wrapper_hybrid.py- Pass description to registrycore/session_registry.py- Include description in Slack thread headerDocumentation:
.env.example- Show correct default paths (commented out)README.md- Update path referencesSECURITY.md- Update path referencesTest plan
claude-slack-test- Verifies Slack API connection, sends test messageclaude-slack-test --local- Verifies directory has hooks configuredclaude-slack-health- All checks pass with new paths~/.claude/slack/logs/registry.dbcreated in~/.claude/slack/claude-slack -d "description"shows in thread headerBreaking Changes
None. Environment variables still work for custom paths. Only defaults changed from
/tmp/to~/.claude/slack/.🤖 Generated with Claude Code