SKILL.md
Slack Ask + Thread Reply
Use scripts/slack.py to post a question and wait for the first reply, or to post a reply into an existing thread.
Run
uv run scripts/slack.py "Did you finish the task?" --interval 2 --follow-up-message "This counts as another ignore. Please reply in the thread."
uv run scripts/slack.py --mode reply --thread-ts 1700000000.000000 "Reply text"
Inputs
questionis the message text (question inaskmode, reply inreplymode).--modechooses behavior (askdefault,replyposts into a thread).--no-reply-hintskips appending "Reply in thread."--follow-up-messagesets the message to post when a reply is not received within the ignore window.
- Required in ask mode.
askmode:
- --interval sets polling interval in seconds (default: 2). - --thread-ts and --channel are not required.
replymode:
- --thread-ts is required. - --channel overrides SLACK_CHANNEL (accepts name or ID). - --interval is not used.
Outputs
Ask mode prints a single line:
{assistant_question: ..., user_answer: ..., is_answer: true|false, thread_ts: ..., message_ts: ...}
If no reply arrives before timeout, useranswer is null and isanswer is false.
Reply mode prints a single line:
{assistant_question: ..., user_answer: null, is_answer: false, thread_ts: ..., message_ts: ...}
Notes
- Requires
SLACKBOTUSEROAUTHTOKEN. - Optional
SLACKUSEROAUTH_TOKENis used for reading replies; if unset, the bot token is reused. - Missing history scopes will cause
missing_scopeerrors; addchannels:history,groups:history,im:history, andmpim:historyas needed. - The CLI unescapes
\n,\r, and\tsequences inquestionbefore sending. - Ask mode timeout is derived from env:
IGNORESPAN * REPLYCOUNT_LIMIT. askmode requires--follow-up-message.