setup-spa
Skill251 starsChanged 5 months agoApache-2.0View on GitHub
SPA (Spawn's Personal Agent) — Slack bot that pipes threads into Claude Code sessions
1 other project uses a version of this.
Adopted by
Most recently taken up by
- OpenRouterTeam/spawnword for word, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- OpenRouterTeam/spawn★ 251100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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.
In this repository9 other files it gives its agents.
- skills/junie/AGENTS.mdAGENTS.md
- skills/opencode/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- pclSkill
- update-metadataSkill
- update-teamSkill
- spawnSkill
- spawnSkill
- spawnSkill
The file
Files
SPA — Spawn's Personal Agent
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 App Setup
Option A: Create from manifest (recommended)
- Go to https://api.slack.com/apps
- Click Create New App > From a manifest
- Select your workspace
- Paste the contents of
slack-manifest.ymlfrom this directory - Click Create
- Socket Mode: Settings > Basic Information > scroll to "App-Level Tokens" > Generate Token and Scopes > add
connections:writescope > copy thexapp-...token - Install to Workspace: Features > OAuth & Permissions > Install > copy the
xoxb-...Bot User OAuth Token - Invite the bot to the target channel:
/invite @spa - Get the channel ID: Right-click channel name > View channel details > copy the ID (starts with
C)
Option B: Manual setup
- Go to https://api.slack.com/apps > Create New App > From scratch
- Name it
SPA, select the workspace - Socket Mode: Settings > Socket Mode > Enable > generate app-level token with
connections:writescope > savexapp-... - Event Subscriptions: Features > Event Subscriptions > Enable > subscribe to bot events:
app_mention,message.channels,message.groups - OAuth Scopes: Features > OAuth & Permissions > Bot Token Scopes:
app_mentions:read,channels:history,channels:read,groups:history,groups:read,chat:write,reactions:write - Install to Workspace > save
xoxb-...token - Invite bot to channel, get channel ID
Env Vars
| 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 Template
Create .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"Install
bun install # from repo root — workspace installSystemd Service
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.targetThen:
sudo systemctl daemon-reload
sudo systemctl enable --now spawn-spaVerify
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 sessionState
Thread-to-session mappings are persisted at ~/.config/spawn/slack-issues.json.
Troubleshooting
| 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 |
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.

