Skip to main content
hooksSource-backedReview first Safety Privacy
Slack logo

Slack Progress Notifier - Hooks

Sends progress updates to Slack channel for team visibility on Claude activities.

by JSONbored·added 2025-09-19·
HarnessClaude Code
Trigger:Notification
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://api.slack.com/messaging/webhooks, https://github.com/JSONbored/awesome-claude/blob/main/content/hooks/slack-progress-notifier.mdx
Brand
Slack
Brand domain
slack.com
Brand asset source
brandfetch
Safety notes
Runs on notification events and posts a formatted activity message to Slack when SLACK_WEBHOOK_URL is configured., Uses curl with a short timeout and retry, so failed network delivery may still delay hook completion briefly., High activity can create noisy Slack notifications unless users add their own filtering or rate limits.
Privacy notes
Sends tool name, file basename, user name, git branch, project name, and timestamp to the configured Slack webhook., Uses the SLACK_WEBHOOK_URL environment variable and does not manage webhook rotation or channel permissions., Slack receives and retains the notification according to the workspace and webhook configuration.
Author
JSONbored
Claim status
unclaimed
Last verified
2025-09-19

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

Install command

Provided

Config snippet

Provided

Copy snippet

Provided

Prerequisites

None

Platforms

1 listed

Difficulty

0/100

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Safety & privacy surface

Safety & privacy surface

3 safety and 3 privacy notes across 3 risk areas. Review closely: permissions & scopes, network access.

3 areas
  • SafetyNetwork accessRuns on notification events and posts a formatted activity message to Slack when SLACK_WEBHOOK_URL is configured.
  • SafetyNetwork accessUses curl with a short timeout and retry, so failed network delivery may still delay hook completion briefly.
  • SafetyGeneralHigh activity can create noisy Slack notifications unless users add their own filtering or rate limits.
  • PrivacyNetwork accessSends tool name, file basename, user name, git branch, project name, and timestamp to the configured Slack webhook.
  • PrivacyPermissions & scopesUses the SLACK_WEBHOOK_URL environment variable and does not manage webhook rotation or channel permissions.
  • PrivacyNetwork accessSlack receives and retains the notification according to the workspace and webhook configuration.

Safety notes

  • Runs on notification events and posts a formatted activity message to Slack when SLACK_WEBHOOK_URL is configured.
  • Uses curl with a short timeout and retry, so failed network delivery may still delay hook completion briefly.
  • High activity can create noisy Slack notifications unless users add their own filtering or rate limits.

Privacy notes

  • Sends tool name, file basename, user name, git branch, project name, and timestamp to the configured Slack webhook.
  • Uses the SLACK_WEBHOOK_URL environment variable and does not manage webhook rotation or channel permissions.
  • Slack receives and retains the notification according to the workspace and webhook configuration.

Schema details

Install type
cli
Reading time
4 min
Difficulty score
0
Troubleshooting
Yes
Breaking changes
No
Skill and platform metadata
Retrieval sources
https://api.slack.com/messaging/webhookshttps://code.claude.com/docs/en/hooks
Runtime and command metadata
Trigger
Notification
Script language
bash
Script body
#!/bin/bash

# Read the tool input from stdin
INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name')
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')

# Check if Slack webhook URL is configured
if [ -z "$SLACK_WEBHOOK_URL" ]; then
    echo "ℹ️ Slack webhook URL not configured - skipping notification"
    echo "💡 Set SLACK_WEBHOOK_URL environment variable to enable Slack notifications"
    exit 0
fi

echo "📢 Slack Progress Notifier - Sending team notification..."
echo "🔧 Tool: $TOOL_NAME"
if [ -n "$FILE_PATH" ]; then
    echo "📄 File: $(basename "$FILE_PATH")"
fi

# Determine appropriate emoji based on tool/activity type
EMOJI="📝"  # Default emoji

case "$TOOL_NAME" in
    *test*|*Test*)
        EMOJI="🧪"
        ACTIVITY="Testing"
        ;;
    *build*|*Build*)
        EMOJI="🏗️"
        ACTIVITY="Building"
        ;;
    *deploy*|*Deploy*)
        EMOJI="🚀"
        ACTIVITY="Deployment"
        ;;
    *commit*|*Commit*|*git*)
        EMOJI="📝"
        ACTIVITY="Version Control"
        ;;
    *edit*|*Edit*|*write*|*Write*)
        EMOJI="✏️"
        ACTIVITY="Code Editing"
        ;;
    *lint*|*Lint*|*format*|*Format*)
        EMOJI="🧹"
        ACTIVITY="Code Quality"
        ;;
    *install*|*Install*|*package*)
        EMOJI="📦"
        ACTIVITY="Package Management"
        ;;
    *security*|*Security*|*audit*)
        EMOJI="🔒"
        ACTIVITY="Security"
        ;;
    *debug*|*Debug*|*error*)
        EMOJI="🐛"
        ACTIVITY="Debugging"
        ;;
    *doc*|*Doc*|*readme*)
        EMOJI="📚"
        ACTIVITY="Documentation"
        ;;
    *)
        EMOJI="⚡"
        ACTIVITY="Development"
        ;;
esac

# Prepare the message
if [ -n "$FILE_PATH" ]; then
    FILENAME=$(basename "$FILE_PATH")
    MESSAGE="$EMOJI Claude Code: $ACTIVITY - $TOOL_NAME on $FILENAME"
else
    MESSAGE="$EMOJI Claude Code: $ACTIVITY - $TOOL_NAME"
fi

# Get additional context
TIMESTAMP=$(date '+%H:%M:%S')
USER=$(whoami 2>/dev/null || echo "developer")
BRANCH="unknown"
if git rev-parse --git-dir >/dev/null 2>&1; then
    BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
fi

# Create rich message payload
REPO_NAME=$(basename "$(pwd)" 2>/dev/null || echo "project")

# Construct JSON payload with proper escaping
PAYLOAD=$(cat <<EOF
{
  "text": "$MESSAGE",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "$EMOJI *Claude Code Activity*\n*Action:* $TOOL_NAME\n*Time:* $TIMESTAMP\n*User:* $USER\n*Branch:* $BRANCH\n*Project:* $REPO_NAME"
      }
    }
  ]
}
EOF
)

echo "📤 Sending notification to Slack..."

# Send to Slack with proper error handling
if curl -X POST \
     -H 'Content-type: application/json' \
     --data "$PAYLOAD" \
     --max-time 5 \
     --retry 1 \
     "$SLACK_WEBHOOK_URL" \
     --silent \
     --show-error 2>/dev/null; then
    echo "✅ Slack notification sent successfully"
else
    CURL_EXIT_CODE=$?
    case $CURL_EXIT_CODE in
        6)
            echo "⚠️ Failed to send Slack notification - couldn't resolve host"
            ;;
        7)
            echo "⚠️ Failed to send Slack notification - couldn't connect to server"
            ;;
        22)
            echo "⚠️ Failed to send Slack notification - HTTP error (check webhook URL)"
            ;;
        28)
            echo "⚠️ Failed to send Slack notification - timeout"
            ;;
        *)
            echo "⚠️ Failed to send Slack notification - error code: $CURL_EXIT_CODE"
            ;;
    esac
    echo "💡 Verify SLACK_WEBHOOK_URL is correct and Slack service is accessible"
fi

echo ""
echo "💡 Slack Integration Tips:"
echo "  • Get webhook URL from: https://api.slack.com/messaging/webhooks"
echo "  • Set SLACK_WEBHOOK_URL environment variable"
echo "  • Test webhook with: curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Test\"}' \$SLACK_WEBHOOK_URL"
echo "  • Configure channel-specific webhooks for different notification types"
echo "  • Consider rate limiting for high-activity periods"

echo ""
echo "🎯 Slack notification complete!"

exit 0
Full copyable content
{
  "hooks": {
    "notification": {
      "script": "./.claude/hooks/slack-progress-notifier.sh",
      "matchers": [
        "*"
      ]
    }
  }
}

About this resource

Features

  • Real-time Slack notifications for Claude activities including Slack notification integration (real-time Slack notifications on file changes, immediate notification delivery with webhook delivery, Slack message formatting with rich formatting, Slack channel integration with channel routing), notification optimization (notification performance with fast delivery, notification reliability with retry logic, notification efficiency with efficient processing, notification batching with message batching), notification validation (notification payload validation with payload verification, notification delivery validation with delivery checking, notification format validation with format checking, notification content validation with content verification), and notification reporting (notification delivery reporting with delivery status, notification error reporting with error details, notification statistics with delivery metrics, notification analytics with analytics tracking)
  • Contextual emoji selection based on activity type including emoji selection (activity-based emoji selection with activity detection, emoji mapping with activity mapping, emoji customization with custom emojis, emoji fallback with default emojis), activity detection (activity type detection with type identification, activity classification with activity classification, activity context analysis with context analysis, activity pattern recognition with pattern recognition), emoji management (emoji configuration with emoji settings, emoji rules with emoji rules, emoji preferences with user preferences, emoji updates with emoji updates), and emoji reporting (emoji selection reporting with selection status, emoji usage reporting with usage statistics, emoji effectiveness reporting with effectiveness metrics, emoji analytics with emoji analytics)
  • Webhook-based integration with Slack channels including webhook integration (Slack webhook URL configuration with webhook setup, webhook authentication with webhook security, webhook delivery with reliable delivery, webhook retry logic with retry handling), webhook configuration (webhook URL management with URL configuration, webhook channel configuration with channel settings, webhook security configuration with security settings, webhook rate limiting with rate limit handling), webhook management (webhook health monitoring with health checks, webhook error handling with error recovery, webhook performance monitoring with performance tracking, webhook analytics with webhook metrics), and webhook reporting (webhook delivery reporting with delivery status, webhook error reporting with error details, webhook performance reporting with performance metrics, webhook analytics with webhook statistics)
  • Team collaboration and visibility enhancement including collaboration features (team visibility with activity visibility, team notifications with team alerts, team coordination with activity coordination, team awareness with activity awareness), visibility management (activity visibility configuration with visibility settings, notification preferences with preference management, channel routing with channel configuration, notification filtering with filter settings), collaboration analytics (team activity analytics with activity metrics, collaboration effectiveness with effectiveness measurement, team engagement with engagement tracking, collaboration insights with insights), and collaboration reporting (team visibility reporting with visibility status, collaboration metrics reporting with collaboration metrics, team engagement reporting with engagement statistics, collaboration insights reporting with insights)
  • Non-blocking notification delivery including async delivery (asynchronous notification delivery with background processing, non-blocking execution with non-blocking operations, notification queuing with message queuing, notification batching with batch processing), delivery optimization (delivery performance with fast delivery, delivery reliability with reliable delivery, delivery efficiency with efficient processing, delivery scalability with scalable delivery), delivery management (delivery retry logic with retry handling, delivery error handling with error recovery, delivery monitoring with delivery tracking, delivery analytics with delivery metrics), and delivery reporting (delivery status reporting with delivery status, delivery performance reporting with performance metrics, delivery error reporting with error details, delivery analytics with delivery statistics)
  • Customizable message formatting including message formatting (Slack message formatting with rich formatting, message templates with template support, message customization with custom formatting, message styling with style options), formatting options (message format configuration with format settings, message template configuration with template settings, message style configuration with style settings, message content configuration with content settings), formatting management (formatting rules with formatting configuration, formatting templates with template management, formatting customization with custom formatting, formatting updates with format updates), and formatting reporting (formatting status reporting with formatting status, formatting usage reporting with usage statistics, formatting effectiveness reporting with effectiveness metrics, formatting analytics with formatting analytics)
  • Git integration and context enrichment including Git integration (Git repository detection with repository detection, Git branch detection with branch detection, Git commit tracking with commit tracking, Git status analysis with status analysis), context enrichment (repository context with repo information, branch context with branch information, user context with user information, timestamp context with time information), context management (context configuration with context settings, context customization with custom context, context filtering with context filtering, context updates with context updates), and context reporting (context enrichment reporting with context status, context usage reporting with usage statistics, context effectiveness reporting with effectiveness metrics, context analytics with context analytics)
  • Development workflow integration including continuous notifications (real-time Slack notifications on file changes, immediate notification delivery on activities, automatic notifications on operations, seamless Slack integration with development workflow), workflow automation (automated Slack notifications without manual intervention, notification automation with automatic delivery, team visibility automation with automatic visibility), and workflow optimization (activity tracking with activity monitoring, notification optimization with optimization, team collaboration maintenance with collaboration checks)

Use Cases

  • Keep team informed about automated code changes automatically sending Slack notifications on file changes, providing team visibility, and maintaining team awareness
  • Monitor Claude Code activity in real-time automatically tracking Claude activities, sending real-time notifications, and providing activity monitoring
  • Track development progress across team channels automatically routing notifications to appropriate channels, tracking progress, and maintaining team coordination
  • Notify team of test runs and build activities automatically detecting test and build activities, sending notifications, and providing activity alerts
  • Enhance team collaboration and awareness automatically providing team visibility, enabling collaboration, and maintaining team awareness
  • Development workflow integration seamlessly integrating Slack notifications into development workflows without manual notification or team coordination

Installation

  1. Create hooks directory: mkdir -p .claude/hooks
  2. Create hook file: touch .claude/hooks/slack-progress-notifier.sh
  3. Make executable: chmod +x .claude/hooks/slack-progress-notifier.sh
  4. Add configuration from Hook Configuration section above to .claude/settings.json or ~/.claude/settings.json
  5. Alternative: Use the interactive /hooks command in Claude Code

Config paths

  • Local (not committed): .claude/settings.local.json
  • User settings (global): ~/.claude/settings.json
  • Project-wide (committed): .claude/settings.json

Requirements

  • Claude Code CLI installed
  • Project directory initialized
  • Bash shell available
  • curl command (for webhook requests)
  • jq (optional, for JSON generation and parsing)
  • Git installed (optional, for Git context)
  • Slack webhook URL configured (SLACK_WEBHOOK_URL environment variable)

Hook Configuration

{
  "hooks": {
    "notification": {
      "script": "./.claude/hooks/slack-progress-notifier.sh",
      "matchers": ["*"]
    }
  }
}

Hook Script

#!/bin/bash

# Read the tool input from stdin
INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name')
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')

# Check if Slack webhook URL is configured
if [ -z "$SLACK_WEBHOOK_URL" ]; then
    echo "ℹ️ Slack webhook URL not configured - skipping notification"
    echo "💡 Set SLACK_WEBHOOK_URL environment variable to enable Slack notifications"
    exit 0
fi

echo "📢 Slack Progress Notifier - Sending team notification..."
echo "🔧 Tool: $TOOL_NAME"
if [ -n "$FILE_PATH" ]; then
    echo "📄 File: $(basename "$FILE_PATH")"
fi

# Determine appropriate emoji based on tool/activity type
EMOJI="📝"  # Default emoji

case "$TOOL_NAME" in
    *test*|*Test*)
        EMOJI="🧪"
        ACTIVITY="Testing"
        ;;
    *build*|*Build*)
        EMOJI="🏗️"
        ACTIVITY="Building"
        ;;
    *deploy*|*Deploy*)
        EMOJI="🚀"
        ACTIVITY="Deployment"
        ;;
    *commit*|*Commit*|*git*)
        EMOJI="📝"
        ACTIVITY="Version Control"
        ;;
    *edit*|*Edit*|*write*|*Write*)
        EMOJI="✏️"
        ACTIVITY="Code Editing"
        ;;
    *lint*|*Lint*|*format*|*Format*)
        EMOJI="🧹"
        ACTIVITY="Code Quality"
        ;;
    *install*|*Install*|*package*)
        EMOJI="📦"
        ACTIVITY="Package Management"
        ;;
    *security*|*Security*|*audit*)
        EMOJI="🔒"
        ACTIVITY="Security"
        ;;
    *debug*|*Debug*|*error*)
        EMOJI="🐛"
        ACTIVITY="Debugging"
        ;;
    *doc*|*Doc*|*readme*)
        EMOJI="📚"
        ACTIVITY="Documentation"
        ;;
    *)
        EMOJI="⚡"
        ACTIVITY="Development"
        ;;
esac

# Prepare the message
if [ -n "$FILE_PATH" ]; then
    FILENAME=$(basename "$FILE_PATH")
    MESSAGE="$EMOJI Claude Code: $ACTIVITY - $TOOL_NAME on $FILENAME"
else
    MESSAGE="$EMOJI Claude Code: $ACTIVITY - $TOOL_NAME"
fi

# Get additional context
TIMESTAMP=$(date '+%H:%M:%S')
USER=$(whoami 2>/dev/null || echo "developer")
BRANCH="unknown"
if git rev-parse --git-dir >/dev/null 2>&1; then
    BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
fi

# Create rich message payload
REPO_NAME=$(basename "$(pwd)" 2>/dev/null || echo "project")

# Construct JSON payload with proper escaping
PAYLOAD=$(cat <<EOF
{
  "text": "$MESSAGE",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "$EMOJI *Claude Code Activity*\n*Action:* $TOOL_NAME\n*Time:* $TIMESTAMP\n*User:* $USER\n*Branch:* $BRANCH\n*Project:* $REPO_NAME"
      }
    }
  ]
}
EOF
)

echo "📤 Sending notification to Slack..."

# Send to Slack with proper error handling
if curl -X POST \
     -H 'Content-type: application/json' \
     --data "$PAYLOAD" \
     --max-time 5 \
     --retry 1 \
     "$SLACK_WEBHOOK_URL" \
     --silent \
     --show-error 2>/dev/null; then
    echo "✅ Slack notification sent successfully"
else
    CURL_EXIT_CODE=$?
    case $CURL_EXIT_CODE in
        6)
            echo "⚠️ Failed to send Slack notification - couldn't resolve host"
            ;;
        7)
            echo "⚠️ Failed to send Slack notification - couldn't connect to server"
            ;;
        22)
            echo "⚠️ Failed to send Slack notification - HTTP error (check webhook URL)"
            ;;
        28)
            echo "⚠️ Failed to send Slack notification - timeout"
            ;;
        *)
            echo "⚠️ Failed to send Slack notification - error code: $CURL_EXIT_CODE"
            ;;
    esac
    echo "💡 Verify SLACK_WEBHOOK_URL is correct and Slack service is accessible"
fi

echo ""
echo "💡 Slack Integration Tips:"
echo "  • Get webhook URL from: https://api.slack.com/messaging/webhooks"
echo "  • Set SLACK_WEBHOOK_URL environment variable"
echo "  • Test webhook with: curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Test\"}' \$SLACK_WEBHOOK_URL"
echo "  • Configure channel-specific webhooks for different notification types"
echo "  • Consider rate limiting for high-activity periods"

echo ""
echo "🎯 Slack notification complete!"

exit 0

Examples

Slack Progress Notifier Hook Script

Complete hook script that sends Slack notifications on Claude activities

#!/bin/bash
INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name')
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
if [ -z "$SLACK_WEBHOOK_URL" ]; then
  exit 0
fi
EMOJI="📝"
case "$TOOL_NAME" in
  *test*|*Test*) EMOJI="🧪" ;;
  *build*|*Build*) EMOJI="🏗️" ;;
  *edit*|*Edit*) EMOJI="✏️" ;;
esac
MESSAGE="$EMOJI Claude Code: $TOOL_NAME"
if [ -n "$FILE_PATH" ]; then
  MESSAGE="$MESSAGE on $(basename "$FILE_PATH")"
fi
jq -n --arg text "$MESSAGE" '{text: $text}' | curl -X POST -H 'Content-type: application/json' --data @- --max-time 3 --silent "$SLACK_WEBHOOK_URL" >/dev/null 2>&1 &
exit 0

Hook Configuration

Complete hook configuration for .claude/settings.json to enable Slack notifications

{
  "hooks": {
    "notification": {
      "script": "./.claude/hooks/slack-progress-notifier.sh",
      "matchers": ["*"]
    }
  }
}

Debounced Slack Notifications

Enhanced hook script with debouncing to prevent notification spam

#!/bin/bash
INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name')
LAST_NOTIFY=$(cat /tmp/slack_last 2>/dev/null || echo 0)
NOW=$(date +%s)
if [ $((NOW - LAST_NOTIFY)) -lt 10 ]; then
  exit 0
fi
echo $NOW > /tmp/slack_last
if [ -z "$SLACK_WEBHOOK_URL" ]; then
  exit 0
fi
MESSAGE="⚡ Claude Code: $TOOL_NAME"
jq -n --arg text "$MESSAGE" '{text: $text}' | curl -X POST -H 'Content-type: application/json' --data @- --max-time 3 --silent "$SLACK_WEBHOOK_URL" >/dev/null 2>&1 &
exit 0

Rich Slack Message with Block Kit

Enhanced hook script with Slack Block Kit formatting and Git context

#!/bin/bash
INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name')
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
BRANCH=$(git branch --show-current 2>/dev/null || git rev-parse --short HEAD 2>/dev/null || echo 'unknown')
REPO_NAME=$(basename "$(pwd)" 2>/dev/null || echo 'project')
TIMESTAMP=$(date '+%H:%M:%S')
jq -n --arg text "Claude Code Activity" --arg tool "$TOOL_NAME" --arg file "$(basename "$FILE_PATH" 2>/dev/null || echo 'N/A')" --arg branch "$BRANCH" --arg repo "$REPO_NAME" --arg time "$TIMESTAMP" '{"blocks": [{"type": "section", "text": {"type": "mrkdwn", "text": ("*Claude Code Activity*\n*Action:* " + $tool + "\n*File:* " + $file + "\n*Branch:* " + $branch + "\n*Repo:* " + $repo + "\n*Time:* " + $time)}}]}' | curl -X POST -H 'Content-type: application/json' --data @- --max-time 3 --silent "$SLACK_WEBHOOK_URL" >/dev/null 2>&1 &
exit 0

Slack Notifier Configuration Example

Example Slack notifier configuration for customizing notification behavior

{
  "slack": {
    "webhook_url": "$SLACK_WEBHOOK_URL",
    "debounce_seconds": 10,
    "emoji_mapping": {
      "test": "🧪",
      "build": "🏗️",
      "deploy": "🚀",
      "edit": "✏️"
    },
    "include_git_context": true,
    "include_timestamp": true
  }
}

Troubleshooting

Notifications fail with 'invalid_payload' error from Slack

Escape special characters in JSON payload. Use jq to construct payload: jq -n --arg msg "$MESSAGE" '{text: $msg}' | curl -d @- $SLACK_WEBHOOK_URL. Avoid shell variable expansion inside JSON strings. Verify JSON format. Test with various message content.

Hook causes timeout on every tool execution slowing workflow

Run curl in background with & to avoid blocking: (curl --max-time 3 "$SLACK_WEBHOOK_URL" &) >/dev/null 2>&1. Add exit 0 immediately after background execution. Reduce timeout from 5s to 3s. Verify async execution. Test with various timeout values.

Slack webhook returns HTTP 410 'url_verification_failed'

Webhook URL expired or was revoked. Generate new webhook at https://api.slack.com/messaging/webhooks. Update SLACK_WEBHOOK_URL environment variable. Check workspace permissions for incoming webhooks. Verify webhook URL. Test with new webhook URL.

Git branch detection fails showing 'unknown' for detached HEAD

Add fallback to commit SHA: BRANCH=$(git branch --show-current || git rev-parse --short HEAD || echo 'unknown'). Handle detached HEAD state gracefully with descriptive label like 'detached@SHA'. Verify Git state. Test with various Git states.

Notification spam floods channel during rapid file operations

Implement debouncing with timestamp check: LAST_NOTIFY=$(cat /tmp/slack_last 2>/dev/null || echo 0); NOW=$(date +%s); [ $((NOW - LAST_NOTIFY)) -lt 10 ] && exit 0. Skip notifications within 10s window. Verify debouncing logic. Test with various activity frequencies.

Slack notifications are not delivered or delayed

Check network connectivity and Slack service status. Verify webhook URL is correct and accessible. Check curl exit codes for specific errors. Add retry logic for transient failures. Verify webhook configuration. Test with manual curl requests.

Emoji selection is incorrect or missing for activity types

Review emoji mapping case statements. Add more activity type patterns. Use default emoji fallback. Verify activity type detection. Test with various activity types.

Slack message formatting is broken or unreadable

Use jq for safe JSON generation instead of heredoc. Validate JSON payload before sending. Use Slack Block Kit for rich formatting. Verify message format. Test with various message content.

Source citations

Add this badge to your README

Show that Slack Progress Notifier - Hooks is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/hooks/slack-progress-notifier.svg)](https://heyclau.de/entry/hooks/slack-progress-notifier)

How it compares

Slack Progress Notifier - Hooks side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Next steps differ across entries — use the actions in the table below to copy install commands and source links per resource.

Field

Sends progress updates to Slack channel for team visibility on Claude activities.

Open dossier

A Claude Code hook that flags files exceeding complexity thresholds after you edit them — estimating cyclomatic complexity, line and function counts, and nesting depth (via ESLint's complexity rule and Radon).

Open dossier

A PostToolUse hook that reminds you to enable native query logging for PostgreSQL, Prisma, Sequelize, and TypeORM, and flags possible N+1 patterns when you edit SQL or data-access files.

Open dossier

Alerts when files exceed size thresholds that could impact performance. This PostToolUse hook provides comprehensive file size monitoring when files are created or modified, automatically detecting files that exceed recommended size thresholds for different file types and providing optimization suggestions.

Open dossier
Next stepsDiffers
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
Submitter
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
BrandSlack logoSlack
Categoryhookshookshookshooks
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorJSONboredJSONboredJSONboredJSONbored
Added2025-09-192025-09-192025-10-192025-09-19
Platforms
Claude Code
Claude Code
Claude Code
Claude Code
Source repo
Safety notesRuns on notification events and posts a formatted activity message to Slack when SLACK_WEBHOOK_URL is configured. Uses curl with a short timeout and retry, so failed network delivery may still delay hook completion briefly. High activity can create noisy Slack notifications unless users add their own filtering or rate limits.Runs after edits to JS/TS/Python files and prints advisory warnings only; the line/function/brace counts are heuristics, not a substitute for ESLint or Radon run on the full project.Runs automatically after bash, write, or edit activity and inspects files that look like query, model, repository, DAO, or SQL files. Creates .claude/logs/query-performance.log and appends database command or file-analysis events. Uses grep-based heuristics for query warnings and should not be treated as proof of a performance defect.Runs automatically on its configured Claude Code hook event and executes shell logic that can read, modify, or delete files in your project (and may run builds, installs, or network calls); review the script and scope it to expected paths before enabling.
Privacy notesSends tool name, file basename, user name, git branch, project name, and timestamp to the configured Slack webhook. Uses the SLACK_WEBHOOK_URL environment variable and does not manage webhook rotation or channel permissions. Slack receives and retains the notification according to the workspace and webhook configuration.Reads the contents of files you edit to compute complexity locally; it prints warnings to hook output and does not transmit code, but those messages can reveal file structure.Reads query-related source files and may print file paths, query patterns, and database command strings to local hook output. Stores analyzed file paths and database command text in .claude/logs/query-performance.log. Database command text may include connection names, database names, or other operational details if typed directly into the command.Receives Claude Code hook input (session metadata, file paths, and tool output) and reads local project files; review what the script logs or forwards to external services and keep credentials out of its output.
Prerequisites— none listed— none listed— none listed— none listed
Install
mkdir -p .claude/hooks && touch .claude/hooks/slack-progress-notifier.sh && chmod +x .claude/hooks/slack-progress-notifier.sh
mkdir -p .claude/hooks && touch .claude/hooks/code-complexity-alert-monitor.sh && chmod +x .claude/hooks/code-complexity-alert-monitor.sh
mkdir -p .claude/hooks && touch .claude/hooks/file-size-warning-monitor.sh && chmod +x .claude/hooks/file-size-warning-monitor.sh
Config
{
  "hooks": {
    "notification": {
      "script": "./.claude/hooks/slack-progress-notifier.sh",
      "matchers": [
        "*"
      ]
    }
  }
}
{
  "hooks": {
    "notification": {
      "script": "./.claude/hooks/code-complexity-alert-monitor.sh"
    }
  }
}
{
  "hooks": {
    "postToolUse": {
      "script": "./.claude/hooks/database-query-performance-logger.sh",
      "matchers": [
        "bash",
        "write",
        "edit"
      ]
    }
  }
}
{
  "hooks": {
    "postToolUse": {
      "script": "./.claude/hooks/file-size-warning-monitor.sh",
      "matchers": [
        "write",
        "edit"
      ]
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.