Generic Slack utilities for fetching messages, thread replies, posting messages, and converting timestamps using Slack Web API.
Ships in productization-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Generic Slack helper utilities for common Slack operations.
This skill provides deterministic scripts for Slack operations:
Required:
SLACK_XOXC_TOKEN - Slack cookie tokenSLACK_XOXD_TOKEN - Slack workspace tokenSLACK_WORKSPACE - Slack workspace name (default: "redhat")requests library (pip3 install -r requirements.txt)Script: scripts/slack/fetch_messages.py
Purpose: Fetch Slack channel message history using Slack Web API (conversations.history)
Usage:
./scripts/slack/fetch_messages.py <channel_id> <time_window> <output_path> [--filter-date YYYY-MM-DD]
Parameters:
channel_id - Slack channel ID (e.g., "C08LVA9E1SS")time_window - Time window (e.g., "65m", "90d", "1w")output_path - Path to write JSON output--filter-date - Optional: filter to messages from this date only (YYYY-MM-DD)Time Window Format:
m - minutes (e.g., "65m" = last 65 minutes)h - hours (e.g., "2h" = last 2 hours)d - days (e.g., "90d" = last 90 days)w - weeks (e.g., "1w" = last week)Example:
./scripts/slack/fetch_messages.py "C08LVA9E1SS" "1h" "/tmp/messages.json"
./scripts/slack/fetch_messages.py "C08LVA9E1SS" "90d" "/tmp/messages.json" --filter-date "2025-12-15"
Output Format:
--filter-date: JSON summary to stdout ({"message_count": N, "output_path": "..."})--filter-date: Filtered messages JSON array to stdout, saved to output fileExit codes:
Script: scripts/slack/fetch_thread_replies.py
Purpose: Fetch thread replies using Slack Web API (conversations.replies)
Usage:
./scripts/slack/fetch_thread_replies.py <channel_id> <thread_ts> <output_path>
Parameters:
channel_id - Slack channel IDthread_ts - Thread timestamp (e.g., "1769005300.000000")output_path - Path to write JSON outputExample:
./scripts/slack/fetch_thread_replies.py "C08LVA9E1SS" "1769005300.000000" "/tmp/thread.json"
Output Format: JSON array of thread messages including the parent message and all replies:
[
{
"ts": "1769005300.000000",
"user": "U12345678",
"text": "Parent message...",
"thread_ts": "1769005300.000000"
},
{
"ts": "1769005400.000000",
"user": "U87654321",
"text": "Reply message...",
"thread_ts": "1769005300.000000"
}
]
Exit codes:
Script: scripts/slack/find_channel.py
Purpose: Find a Slack channel ID by name using Slack Web API (conversations.list)
Usage:
./scripts/slack/find_channel.py <channel_name>
Parameters:
channel_name - Channel name to search for (with or without #)Example:
./scripts/slack/find_channel.py my-team-alerts
./scripts/slack/find_channel.py "#general"
Output Format:
{
"id": "C04ABCD1234",
"name": "my-team-alerts",
"is_private": false,
"num_members": 12
}
Exit codes:
Script: scripts/slack/post_message.py
Purpose: Post messages to Slack channels using Slack Web API (chat.postMessage)
Usage:
./scripts/slack/post_message.py <channel_id> <message_text>
Parameters:
channel_id - Slack channel IDmessage_text - Message to post (supports markdown)Example:
./scripts/slack/post_message.py "C09G0CMTUNA" "Release completed successfully!"
Markdown Support: The message text supports Slack markdown formatting:
*bold* - Bold text_italic_ - Italic text~strikethrough~ - Strikethrough text`code` - Inline code```code block``` - Code block<url|text> - HyperlinksOutput Format: JSON response from Slack API:
{
"ok": true,
"channel": "C09G0CMTUNA",
"ts": "1704897000.123456",
"message": {
"text": "Release completed successfully!",
"user": "U12345678",
"type": "message",
"ts": "1704897000.123456"
}
}
Exit codes:
Script: scripts/parsing/convert_timestamp.py
Purpose: Convert Slack timestamps to ISO 8601 format
Usage:
./scripts/parsing/convert_timestamp.py <slack_timestamp>
Parameters:
slack_timestamp - Slack timestamp (e.g., "1704897000.123456")Output: ISO 8601 timestamp with UTC timezone (e.g., "2025-01-10T15:30:00Z")
Example:
ISO_TIME=$(./scripts/parsing/convert_timestamp.py "1704897000.123456")
echo "$ISO_TIME" # 2025-01-10T15:30:00Z
Slack Timestamp Format: Slack timestamps are Unix timestamps (seconds since epoch) with microseconds:
SSSSSSSSSS.MMMMMM1704897000.123456
1704897000 = Unix timestamp (seconds).123456 = Microseconds (not used in conversion)Exit codes:
Authentication:
SLACK_XOXC_TOKEN and SLACK_XOXD_TOKENSLACK_WORKSPACE)Error Handling:
Output Formats:
These utilities are designed to be imported and used by product-specific skills:
# In a product-specific skill
import sys
sys.path.append('/path/to/slack-utilities/scripts')
from slack.fetch_messages import fetch_messages
from parsing.convert_timestamp import convert_timestamp
Or called as standalone scripts:
# Fetch recent messages
/path/to/slack-utilities/scripts/slack/fetch_messages.py "C08LVA9E1SS" "1h" "/tmp/out.json"
# Fetch messages from last hour
./scripts/slack/fetch_messages.py "C08LVA9E1SS" "1h" "/tmp/messages.json"
# Parse the output
cat /tmp/messages.json | jq '.[].text'
# First, find a message with replies
MESSAGES=$(./scripts/slack/fetch_messages.py "C08LVA9E1SS" "1d" "/tmp/messages.json")
THREAD_TS=$(echo "$MESSAGES" | jq -r '.[0].thread_ts')
# Fetch the full thread
./scripts/slack/fetch_thread_replies.py "C08LVA9E1SS" "$THREAD_TS" "/tmp/thread.json"
# Post a simple message
./scripts/slack/post_message.py "C09G0CMTUNA" "Build completed successfully"
# Post a formatted message
./scripts/slack/post_message.py "C09G0CMTUNA" "*Build Status:* Success\n\`\`\`Version: 3.2.3-2025101401\`\`\`"
# Fetch messages
./scripts/slack/fetch_messages.py "C08LVA9E1SS" "1h" "/tmp/messages.json"
# Convert timestamps to human-readable format
cat /tmp/messages.json | jq -r '.[].ts' | while read ts; do
echo "Message at: $(./scripts/parsing/convert_timestamp.py $ts)"
done
Authentication errors (exit code 4):
SLACK_XOXC_TOKEN and SLACK_XOXD_TOKEN are setAPI errors (exit code 2):
Parsing errors (exit code 3):
No messages returned:
Python packages:
requests>=2.31.0 - For Slack API callsInstall Python dependencies:
pip3 install -r requirements.txt
Run the test suite:
cd tests/
pip3 install -r ../requirements-test.txt
pytest -v
Test timestamp conversion (no auth needed):
./scripts/parsing/convert_timestamp.py "1704897000.123456"
# Expected: 2024-01-10T14:30:00Z
Token Management:
Channel Access:
Data Handling:
v2.0.0 (2025-02-18)
--filter-date flag on fetch_messages.pyfilter_messages_by_date() functionv1.0.0 (2025-02-12)
pytest.ini (opens in a new tab)requirements-test.txt (opens in a new tab)requirements.txt (opens in a new tab)scripts/__init__.py (opens in a new tab)scripts/parsing/__init__.py (opens in a new tab)scripts/parsing/convert_timestamp.py (opens in a new tab)scripts/slack/__init__.py (opens in a new tab)scripts/slack/fetch_messages.py (opens in a new tab)scripts/slack/fetch_thread_replies.py (opens in a new tab)scripts/slack/find_channel.py (opens in a new tab)scripts/slack/post_message.py (opens in a new tab)tests/__init__.py (opens in a new tab)tests/conftest.py (opens in a new tab)tests/test_parsing.py (opens in a new tab)tests/test_slack.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/productization-skills:slack-utilitiesfrom productization-skills
productization-skills@opendatahub-skills is listed by opendatahub-io/skills-registry — review the source before installing
npx claudepluginhub opendatahub-io/skills-registry --plugin productization-skills18 skills in this plugin
/aws-log-analyzerTroubleshoot and analyze logs from AWS CloudWatch Logs. This skill should be used when the user asks to investigate logs, troubleshoot application issues, query log groups, analyze error patterns, or perform log analysis for machines writing to AWS CloudWatch. Uses the AWS CLI for CloudWatch Logs operations./gitlab-branch-managerCreate and protect GitLab branches. Use when the user asks to create a branch, protect a branch, or set up branch protection rules on GitLab. Uses the glab GitLab CLI. The script takes three required positional args in order: repo, branch-name, ref (no --ref flag)./gitlab-code-reviewOther plugins' skills for the same job
2 plugins in one repository ship this exact skill · first indexed Aug 12, 2026