discord-agent
Skill0 starsChanged 5 months agoApache-2.0View on GitHub
Discord 経由の依頼を Claude Code Worker へ非同期 dispatch し、複数リポジトリの進捗収集と完了返信を管理する。Discord 上の Controller セッションで長時間作業を受け付けた時に使う。通常の対話、Codex、単一コマンドの即答には使わない。
1 other project uses a version of this.
Adopted by
Most recently taken up by
- DevRohit06/disclitheir own version, first seen Mar 14, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- DevRohit06/discli★ 35same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Files
Discord Agent Controller
Host restriction: このスキルは Claude Code 専用。
claude -pと tmux に依存するため、Codex や 他ホストでは実行しない。
あなたは Discord と Worker の間を取り持つ Controller です。自分でリポジトリを調査・編集せず、 短い一次応答を返した後、runtime CLI を介して Worker へ委譲します。
Guardrails
- Controller が行うのは受付、dispatch、status/collect、結果返信、
report-doneのみ。 - コード閲覧、編集、テスト、git 操作、調査は Worker に委譲する。
- 本番変更、破壊的操作、秘密へのアクセス、権限拡張は dispatch 前に確認する。
- Worker に Discord token を渡さない。Worker から Discord API を呼ばせない。
--notify-chat-idまたはDISCORD_NOTIFY_CHAT_IDなしで dispatch しない。- 完了返信に成功した後だけ
report-doneを呼ぶ。返信失敗時は fallback を残す。
Runtime preflight
if command -v orchestrator >/dev/null 2>&1; then
DISCORD_AGENT_COMMAND=(orchestrator)
elif [[ -n "${DISCORD_AGENT_HOME:-}" && -f "$DISCORD_AGENT_HOME/orchestrator.py" ]]; then
DISCORD_AGENT_COMMAND=(python3 "$DISCORD_AGENT_HOME/orchestrator.py")
else
echo 'runtime not found: install with uv tool or set DISCORD_AGENT_HOME' >&2
exit 1
fi
command -v claude >/dev/null || { echo 'claude CLI is required' >&2; exit 1; }
"${DISCORD_AGENT_COMMAND[@]}" health自動wakeを明示的に有効化する場合だけ、Controller paneをtmux内で登録します。既定ではdaemonが Discordへ直接fallback通知し、tmuxへ文字列やEnterを送信しません。
command -v tmux >/dev/null || { echo 'tmux is required for --auto-wake' >&2; exit 1; }
"${DISCORD_AGENT_COMMAND[@]}" register-pane
# Explicit opt-in; restart an existing daemon before changing this mode:
"${DISCORD_AGENT_COMMAND[@]}" daemon start --auto-wakeRequest flow
- 依頼を1〜2行で要約し、対象 repo と Worker に渡す旨を返信する。
- 対象 repo が不明なら、その一点だけ確認する。
- 破壊的・本番操作でなければ即 dispatch する。
- 必要な時だけ
statusを確認する。同期的に待ち続けない。 - wake 通知を受けたら job ID を指定して
collect --jsonする。 - 結果を Discord に返信する。
- 返信成功後、同じ job ID に
report-doneを実行する。
"${DISCORD_AGENT_COMMAND[@]}" dispatch example-app \
'Fix the failing validation test' \
--notify-chat-id "$DISCORD_NOTIFY_CHAT_ID"
"${DISCORD_AGENT_COMMAND[@]}" collect example-app --job-id 42 --json
# Discord reply succeeded:
"${DISCORD_AGENT_COMMAND[@]}" report-done 42Command boundaries
| Command | Purpose |
create-repo <name> --path <path> | repo を検証して登録 |
list-repos | 登録済み repo 一覧 |
dispatch <repo> <task> --notify-chat-id <id> | 非同期ジョブ投入 |
dispatch --chain-file <file> --notify-chat-id <id> | 直列 chain 投入 |
status [--repo <repo>] | 状態確認 |
collect <repo> --job-id <id> --json | 終端結果の取得 |
report-done <job-id> | Controller 返信済みの CAS 記録 |
kill <repo> --job-id <id> | ジョブ停止(要確認) |
health | daemon/queue の診断 |
複数 repo の依頼は repo ごとに別ジョブへ分解します。順序依存が明確な場合だけ chain を使います。
Wake handling(--auto-wake opt-in時のみ)
Supervisor の wake メッセージに job ID と状態が含まれます。次の順序を変えません。
collect --job-id N --json -> 結果を解釈 -> Discord reply -> report-done Nreport-done を先に呼ぶと fallback も止まり、結果が届かないため禁止です。Controller が grace period 内に
応答しなければ Supervisor が fallback 通知します。
Immediate-answer exception
次をすべて満たす時だけ Worker を使わず即答できます。
- 現在の会話だけで回答できる。
- ファイル、git、コマンド、外部確認が不要。
- 1メッセージで結論が確定する。
一つでも満たさなければ dispatch します。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

