post-slack-message

Posts messages to Slack channels or threads via the chat.postMessage Web API.

11|1|Updated Jul 25, 2025
Ready to run
npx skills add https://github.com/tomzx/agents --skill post-slack-message-tomzx
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: post-slack-message
Source: https://github.com/tomzx/agents/tree/main/skills/post-slack-message
Command: npx skills add https://github.com/tomzx/agents --skill post-slack-message-tomzx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-dotenv, requests.

What problem does it solve? Posting updates to Slack from an agent workflow risks sending unreviewed or malformed messages. This Skill adds a compose-and-confirm flow on top of a deterministic send script, so nothing is posted until the user approves the exact message content. ## Core Features & Use Cases - Review-before-send flow: Writes the message to a temp file and asks the user to confirm, edit, or cancel before anything is posted. - Flexible targeting: Posts to a channel by id, Slack archive URL, or channel name, with optional thread replies via --thread-ts. - Immediate mode for automation: The --yes flag skips confirmation for pre-approved flows like scheduled start-day and end-day updates. - Use Case: After finishing a deploy, run /post-slack-message --channel C0BE3BM97B7 with a status update, review the drafted message in the temp file, and confirm to post it to the team channel. ## Quick Start Ask the agent to post a message to a Slack channel, for example: post "Deploy finished for v1.4.2" to the tom-rochette-updates Slack channel and let me review it first.

Frequently Asked Questions about post-slack-message

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I post a message to a Slack channel from a script?▼

Run the post_slack_message.py script with uv, passing --channel with a channel id and the message text. It calls the Slack chat.postMessage API and prints the posted message permalink to stdout.

How to reply in a Slack thread using the Slack API?▼

Pass --thread-ts with the parent message timestamp, or use --channel-url with a Slack archive URL pointing at a thread message, which auto-detects the thread timestamp. The script includes thread_ts in the chat.postMessage payload.

What Slack token do I need for chat.postMessage?▼

A bot token starting with xoxb- only requires SLACK_TOKEN. A web token starting with xoxc- also needs SLACK_COOKIE containing the matching xoxd- value from the same browser session. Both can be set in the environment or a .env file.

Can I test a Slack message without actually sending it?▼

Yes, use the --dry-run flag. It resolves the target channel and prints what would be posted to stderr without calling chat.postMessage, which is useful for validating credentials and targeting.

Why does Slack posting fail with rate limit errors?▼

Slack returns HTTP 429 or a ratelimited error when too many requests are sent. The script automatically retries up to 5 times, waiting the Retry-After interval, and stops with an error if the limit persists.