Add .claude/skills/ask-forum/SKILL.md (usage contract, correlation model, forum-only scope, access/permissions) and route to it from CLAUDE.md (skill-first covered domains) + SKILL_ROUTING.md, so sessions invoke the skill instead of hand-rolling the Discord API — the footgun that produced a broken background wait. Capture that footgun as memory feedback_background_task_no_ampersand (run_in_background, never a shell &). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
47 lines
2.4 KiB
Markdown
47 lines
2.4 KiB
Markdown
---
|
|
name: ask-forum
|
|
description: Ask a teammate (e.g. Mike) a question in the private #ct-forum Discord forum and BLOCK until a human answers, then act on the reply — a live three-way between the user, this same Claude session, and the teammate. No second bot, no DMs, one tool call (the wait runs server-side in bash).
|
|
---
|
|
|
|
# /ask-forum — human-in-the-loop question via #ct-forum
|
|
|
|
Entry point to the `ask-forum` skill — full contract in `.claude/skills/ask-forum/SKILL.md`.
|
|
Engine: `.claude/scripts/ask-forum.sh`. Lets THIS session put a question
|
|
to a human in the private #ct-forum forum and get their answer back in-session, so it
|
|
can keep going. The forum post's thread id is the correlation key — the session reads
|
|
only the thread it created, so an answer is never confused with another question's.
|
|
|
|
Forum-only by design (Mike's call, 2026-07-08): DM replies are intentionally not used,
|
|
so answers stay visible to the team. The BEAST bot ignores #ct-forum, so the asking
|
|
session is the only agent that consumes replies there.
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# Ask and block until a human replies (default timeout 600s, poll 8s):
|
|
bash .claude/scripts/ask-forum.sh "your question" --tag @264814939619721216
|
|
|
|
# Re-read a thread you already asked in (one-shot, no waiting):
|
|
bash .claude/scripts/ask-forum.sh --read <thread_id>
|
|
|
|
# Resume blocking on a thread already posted (e.g. after a timeout):
|
|
bash .claude/scripts/ask-forum.sh --wait <thread_id> --timeout 1800 --poll 10
|
|
```
|
|
|
|
Flags: `--title "short title"` (forum post name; defaults to first 60 chars of the
|
|
question), `--timeout SEC`, `--poll SEC`, `--tag @<discord_id>` (repeatable — pings
|
|
that person; ids in `.claude/users.json`: mike 264814939619721216,
|
|
howard 624667664501178379, winter 624666486362996755, rob 261978810713505792).
|
|
|
|
## How to run it well
|
|
|
|
- **Long waits → background it** with `run_in_background: true` (NO shell `&` — that
|
|
forks the wait off and exits early). You get the answer when the human replies.
|
|
- Only **non-bot** replies count as answers, so bot chatter can never be mistaken for
|
|
the human's answer.
|
|
- Exit codes: 0 answered · 2 no token · 3 Discord API error · 4 timeout (thread stays
|
|
open — resume with `--wait <thread_id>`).
|
|
|
|
Channel: #ct-forum (`1522960388432465950`), private — @everyone denied; Howard, Mike,
|
|
and the bot allowed. Add someone via a channel permission overwrite if they need access.
|