用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/OpenRouterLabs/spawn --skill setup-spa命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | setup-spa |
| description | SPA (Spawn's Personal Agent) — Slack bot that pipes threads into Claude Code sessions |
| disable-model-invocation | true |
Slack bot that listens in #proj-spawn via Socket Mode. When @mentioned, it collects the full thread, pipes it into a claude -p session, and streams Claude Code's responses back to the Slack thread in real-time.
Subsequent thread replies in tracked threads auto-trigger new Claude Code runs.
slack-manifest.yml from this directoryconnections:write scope > copy the xapp-... tokenxoxb-... Bot User OAuth Token/invite @spaC)SPA, select the workspaceconnections:write scope > save xapp-...app_mention, message.channels, message.groupsapp_mentions:read, channels:history, channels:read, groups:history, groups:read, chat:write, reactions:writexoxb-... token| Var | Description |
|---|---|
SLACK_BOT_TOKEN | Bot User OAuth Token (xoxb-...) |
SLACK_APP_TOKEN | App-Level Token for Socket Mode (xapp-...) |
SLACK_CHANNEL_ID | Channel ID to listen in (e.g. C0123456789) |
GITHUB_REPO | Target repo context (default: OpenRouterLabs/spawn) |
REPO_ROOT | Working directory for Claude Code (default: cwd) |
GitHub auth uses the gh CLI — run gh auth login before starting.
start-spa.sh TemplateCreate .claude/skills/setup-spa/start-spa.sh (gitignored):
#!/bin/bash
set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SLACK_BOT_TOKEN="xoxb-YOUR-BOT-TOKEN"
export SLACK_APP_TOKEN="xapp-YOUR-APP-TOKEN"
export SLACK_CHANNEL_ID="C0000000000"
export GITHUB_REPO="OpenRouterLabs/spawn"
export REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
exec bun run "${SCRIPT_DIR}/main.ts"
bun install # from repo root — workspace install
Create /etc/systemd/system/spawn-spa.service:
[Unit]
Description=SPA — Spawn's Personal Agent
After=network.target
[Service]
Type=simple
User=lab
Group=lab
WorkingDirectory=/home/lab/spawn/.claude/skills/setup-spa
ExecStart=/bin/bash /home/lab/spawn/.claude/skills/setup-spa/start-spa.sh
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
Environment="PATH=/home/lab/.local/bin:/home/lab/.bun/bin:/usr/local/bin:/usr/bin:/bin"
[Install]
WantedBy=multi-user.target
Then:
sudo systemctl daemon-reload
sudo systemctl enable --now spawn-spa
sudo systemctl status spawn-spa
journalctl -u spawn-spa -f
# Test: @mention spa in channel → Claude Code runs, response streams back
# Test: Reply and @mention again → resumes same session
Thread-to-session mappings are persisted at ~/.config/spawn/slack-issues.json.
| Symptom | Fix |
|---|---|
ERROR: SLACK_BOT_TOKEN env var is required | Set all required env vars in start-spa.sh |
| Bot doesn't respond to @mentions | Verify bot is invited to the channel; check SLACK_CHANNEL_ID |
| Claude errors with permission denied | Ensure --dangerously-skip-permissions is working, or run in a sandbox |
| Responses truncated | Slack has ~4000 char limit per message; long responses show the tail |
| Hourglass reaction | A Claude run is already active for that thread; wait for it to finish |