slack-notifylisted
Install: claude install-skill chenwei791129/agent-skills
# Slack Notify
Send messages to Slack channels via Incoming Webhook with mrkdwn formatting support.
## Prerequisites
A Slack Incoming Webhook URL is required. Provide it via either:
1. **Environment variable** (recommended for repeated use):
```bash
export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/T.../B.../xxx"
```
2. **`--webhook-url` argument** (for one-off or per-channel sends):
```bash
uv run scripts/send_slack.py --webhook-url "https://hooks.slack.com/services/..." --text "hello"
```
The `--webhook-url` argument takes priority over the environment variable when both are present.
## Usage
Send a simple message:
```bash
uv run scripts/send_slack.py --text "Deployment complete :rocket:"
```
Send with mrkdwn formatting:
```bash
uv run scripts/send_slack.py --text "*Build succeeded*\nBranch: \`main\`\nCommit: <https://github.com/org/repo/commit/abc123|abc123>"
```
Send a multiline message via stdin (useful for longer content):
```bash
cat <<'EOF' | uv run scripts/send_slack.py
*Daily Report* :bar_chart:
> Total requests: 12,345
> Error rate: 0.02%
> P99 latency: 120ms
_Generated at 2025-03-22 09:00 UTC_
EOF
```
Send to a specific webhook (overrides env var):
```bash
uv run scripts/send_slack.py --webhook-url "https://hooks.slack.com/services/T.../B.../xxx" --text "Alert!"
```
## Arguments
| Argument | Description |
|----------|-------------|
| `--text`, `-t` | Message text in mrkdwn format |
| `--webhook-url` | Incoming Webhook URL (