Slack webhook alerter
Skill baronguyen001/ai-automation-skills/skills/slack-webhook-alerter
8 production-tested Claude skills: automation, Gemini cost/structured output, OSS bounty scouting, ML validation.
npx -y skills add baronguyen001/ai-automation-skills --skill slack-webhook-alerterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Post run results to a Slack incoming webhook from Python - webhook URL from env, Block Kit sections plus a colored attachment, no Slack SDK. Use when the user asks to send a slack alert, notify slack, post to a slack channel, mirror telegram alerts to slack, or wire a script to push a status message to Slack.
SKILL.md
2.8 KB, 585 tokens by cl100k_base, as published. Nobody here has run it
Slack Webhook Alerter
Use this skill when a Python script needs to post a status or result to Slack and you do not want the full Slack SDK or a bot token - an incoming webhook is enough. It builds a Block Kit message with a colored attachment (green/red by status) and posts it with a stdlib request, retrying on transient failures. It mirrors telegram-alerter so the same run can fan out to both channels.
When to invoke
- User says: "send a slack alert", "notify slack", "post to a slack channel", "mirror my telegram alerts to slack".
- Code in the conversation already pushes a run summary somewhere and should also reach a Slack channel.
When NOT to invoke
- The user wants Telegram, Discord, or email instead - use the matching alerter.
- The user needs interactive Slack features (slash commands, modals, threads, reactions); a one-way incoming webhook cannot do those - reach for a bot token and the Slack API.
Concrete example
User input:
After my nightly job finishes, post a green or red Slack message with the item count and a dashboard link.
Output:
# Copy assets/slack_alert.py into your project, then:
from slack_alert import send_slack
ok = send_slack(
title="Nightly scrape finished",
text="Processed 42 items in 18 minutes.",
status="ok", # ok -> green, error -> red, warn -> yellow
fields={"Items": "42", "Duration": "18m"},
link=("Open dashboard", "https://example.com/dash"),
)
if not ok:
print("Slack delivery failed after retries")
The helper reads SLACK_WEBHOOK_URL from the environment. The webhook URL is itself a secret (it grants posting to that channel), so it is never hardcoded.
Pattern to apply
- Keep the incoming-webhook URL in
SLACK_WEBHOOK_URLonly - it is a secret, treat it like a token. - Map a status string to an attachment color so green/red is readable at a glance.
- Build a
header+sectionblock for the title and body, and a fields list for key/value pairs. - Post the JSON payload with a short timeout and retry transient failures with exponential backoff.
- Escape or trust the text you pass; Slack renders a limited mrkdwn subset, so keep user content plain.
Reference: assets/slack_alert.py.
Source
Distilled from production use across the author's automation projects. v1.0.0. See also: [[telegram-alerter]], [[http-retry-session]], [[pipeline-orchestrator]].
→ Build the full runnable bot with Trawlkit.