setup
Skill2 starsChanged 3 months agoMITView on GitHub
Configure the Claude agent dispatch system for a new project. Use when setting up for the first time or reconfiguring.
- Reads credentials
193 other projects use a version of this.
Adopted by
Most recently taken up by
- onetapstudiogames/1f3d9-citylifetheir own version, first seen Oct 7, 2026
- prathish-ks/isthmustheir own version, first seen Oct 6, 2026
- michielvandermeer/skillstheir own version, first seen Oct 4, 2026
- qbeka/jev-job-searchtheir own version, first seen Oct 4, 2026
- ProjectAJ14/eklavyatheir own version, first seen Oct 4, 2026
- nanocoai/nanoclawtheir own version, first seen Oct 4, 2026
Used with
Projects with it also use add-slack, add-parallel and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 6 projects that use this
MicrosoftSkilladd-parallel
Also in 5 projects that use this
sskarzSkilladd-telegram-swarm
Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".
Also in 5 projects that use this
- +9 more from microsoft
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- feder-cr/invisible_playwright_mcp★ 32ksame name
- nanocoai/nanoclaw★ 31ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- Q00/ouroboros★ 6.2ksame name
- agenticnotetaking/arscontexta★ 3.5ksame name
- aws/agent-toolkit-for-aws★ 2.8ksame name
- Shpigford/chops★ 1.9ksame name
- skyllwt/AutoSci★ 1.7ksame name
- microsoft/power-platform-skills★ 961same name
- SethGammon/Citadel★ 922same name
183 more not listed
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 repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- discord-bot/AGENTS.mdAGENTS.md
- prompts/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- slack-bot/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- discord-bot/CLAUDE.mdCLAUDE.md
- prompts/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- slack-bot/CLAUDE.mdCLAUDE.md
- sp-post-mergeSkill
- sp-reviseSkill
- sp-statusSkill
- sp-workSkill
- testSkill
- troubleshootSkill
- updateSkill
- sp-cleanupSkill
- sp-implementSkill
- sp-reviewSkill
- sp-reviseSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
33 rules. 0 are common, 18 are distinctive, and 15 are very specific to this project.
0
Common
Most of the 171 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before starting, run the prerequisites check:
- Very specific: line 20
If any required tools are missing, help the user install them before continuing.
- Very specific: line 24
Use the AskUserQuestion tool to ask the user which mode they prefer:
- Very specific: line 27
All scripts, prompts, config, and workflows are copied directly into the user's repo under .sandbox-pal-dispatch/
- Distinctive: line 28
No upstream dependency — the user owns every file and can modify freely
- Distinctive: line 29
No automatic updates — the user manages their own copy
- Very specific: line 40
Use the AskUserQuestion tool to collect the following.
- Very specific: line 55
Create the .sandbox-pal-dispatch/ directory in the user's target repo.
- Distinctive: line 111
Do they want to customize any prompts now, or start with defaults and customize later?
- Distinctive: line 118
Run the label creation script against their target repo:
- Very specific: line 129
Read each template in this skill's templates/ directory (the caller-*.yml files, NOT the standalone/ subdirectory):
- Very specific: line 133
Read each template in templates/standalone/:
- Very specific: line 139
Write it to the user's target repo at .github/workflows/
- Distinctive: line 141
Ask the user where their target repo is cloned locally so you can write the files there.
- Very specific: line 145
If any automation will trigger the agent while authenticated as the bot account -- the Discord bot (see docs/notifications.md), an …
- Distinctive: line 168
If the user hasn't created a bot account or PAT yet, walk them through:
- Distinctive: line 169
Create a new GitHub account for the bot
- Distinctive: line 170
Create a fine-grained PAT with scopes: Contents (rw), Issues (rw), Pull requests (rw), Metadata (r)
- Distinctive: line 171
Add the bot as a collaborator on their target repo
- Distinctive: line 185
Ask the user if they already have a self-hosted runner configured for this repo.
- Distinctive: line 189
Ask: Is the target repo under a personal account or an organization?
- Very specific: line 192
Personal account repo: Only repo-level registration is available (GitHub does not support user-level runners).
- Distinctive: line 206
Check if the user already has runner directories on the machine:
- Distinctive: line 210
If found, offer to reuse the binary — they only need a new directory and registration.
- Very specific: line 233
If the user chose a method that uses environment variables, the runner's .env file (in the runner installation directory, not ~/.bashrc — …
- Very specific: line 235
Verification: After the runner service is restarted in Step 9f, have the user run claude /status on the runner (as the runner user).
- Distinctive: line 252
Check that the required tools are available:
- Distinctive: line 258
If any are missing, help the user install them.
- Distinctive: line 291
Reference mode: Commit and push the workflow files to the target repo
- Very specific: line 292
Standalone mode: Commit and push .sandbox-pal-dispatch/ and .github/workflows/ to the target repo
- Very specific: line 296
Create a test issue on the target repo and add the agent label.
- Distinctive: line 309
If any step was skipped, list it with instructions for completing it later.
- Very specific: line 315
Do not copy the example over an active agent-profiles.json, replace saved .agent-profile selection, or enable AGENT_ENGINE_PROFILES during …
“Common” is measured: kept by at least 6 in 10 of the 171 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Setup: Configure Agent Dispatch for a Project
Walk the user through configuring the agent dispatch system for their GitHub repository.
Prerequisites
Before starting, run the prerequisites check:
bash ${CLAUDE_SKILL_DIR}/../../scripts/check-prereqs.shIf any required tools are missing, help the user install them before continuing. If config.env doesn't exist yet, that's expected — we'll create it in this flow.
Step 1: Choose Setup Mode
Use the AskUserQuestion tool to ask the user which mode they prefer:
Standalone mode (recommended):
- All scripts, prompts, config, and workflows are copied directly into the user's repo under
.sandbox-pal-dispatch/ - No upstream dependency — the user owns every file and can modify freely
- No automatic updates — the user manages their own copy
- Best for: most users, full control, easy to customize, no external dependencies
Reference mode:
- Thin workflow files in the user's repo call back to this upstream repo via
uses: jnurre64/sandbox-pal-action/...@v1 - Scripts run from a clone of this repo on the runner (
~/agent-infra/) - Updates come automatically via version tags and
git pull - Best for: users who want automatic updates and minimal files in their repo
Step 2: Gather Project Information
Use the AskUserQuestion tool to collect the following. If the user provided an owner/repo argument, use that instead of asking.
- Target repository (owner/repo format) — the repo where the agent will work on issues
- Bot account username — the GitHub account that will comment, push, and create PRs (recommend a dedicated bot account, not their personal account)
- Default branch — usually
main, but confirm - Test command (optional) — command to run before creating PRs (e.g.,
npm test,pytest,cargo test). If not set, the pre-PR test gate is skipped. - Extra tools (optional) — project-specific tools the agent needs (e.g.,
Bash(npm:*)for Node.js,Bash(cargo:*)for Rust,Bash(Godot:*)for Godot) - Local clone path (standalone mode only) — where the target repo is cloned on this machine
Step 3: Generate Configuration
Reference mode
Read the template at config.defaults.env.example (in the repo root). Fill in the user's answers and write to config.env in the repo root (reference mode uses a single file since it's not committed to a repo). Show the user the generated config and ask if they want to adjust anything.
Standalone mode
Create the .sandbox-pal-dispatch/ directory in the user's target repo. Copy:
scripts/sandbox-pal-dispatch.shandscripts/cleanup.sh→.sandbox-pal-dispatch/scripts/scripts/lib/*.sh→.sandbox-pal-dispatch/scripts/lib/scripts/check-prereqs.shandscripts/create-labels.sh→.sandbox-pal-dispatch/scripts/prompts/*.md→.sandbox-pal-dispatch/prompts/labels.txt→.sandbox-pal-dispatch/- Generated
config.defaults.env→.sandbox-pal-dispatch/config.defaults.env(non-sensitive project config, committed)
Important: Configuration uses a layered approach:
config.defaults.env— committed to the repo. Contains non-sensitive project config (bot username, timeouts, tool permissions, test commands). This file MUST NOT contain secrets, tokens, or credentials.config.env— gitignored, optional. Contains sensitive overrides (Discord tokens, webhook URLs, GitHub tokens). Values here overrideconfig.defaults.env.- Environment variables — highest precedence, override both files.
Critical: emit every assignment using the ${VAR:-default} form. The dispatch
script sources config.defaults.env after the workflow's env: block has already
set variables, so plain assignments (AGENT_NOTIFY_BACKEND="bot") silently
overwrite workflow overrides. The conditional-assign pattern preserves them:
# ✗ wrong — overwrites workflow env: and config.env
AGENT_NOTIFY_BACKEND="bot"
# ✓ right — defers to any pre-set value
AGENT_NOTIFY_BACKEND="${AGENT_NOTIFY_BACKEND:-bot}"Copy values from the config.defaults.env.example template (which already uses
this pattern) and substitute the user's answers into the default slot only.
Migration note for existing consumers: a consumer repo that was generated by
an older version of /setup may still have plain assignments. It's safe to
rewrite each assignment into the ${VAR:-…} form — there is no behavior change
when no workflow override is set. Offer this rewrite only if the user is running
/setup against a pre-existing .sandbox-pal-dispatch/config.defaults.env; leave
other customizations untouched.
Make all scripts executable after copying.
Gitignore check: Many .gitignore templates (e.g., VisualStudio, Node) include *.env which will block config.defaults.env from being committed. After copying files, check if the target repo's .gitignore excludes *.env. If so, add an exception:
!.sandbox-pal-dispatch/config.defaults.envWarn the user about this and make the change for them.
Step 4: Review Default Prompts
Show the user the default prompts in prompts/ (repo root). Explain what each one does:
triage.md— How the agent investigates issues and writes plansimplement.md— How the agent implements approved plans with TDDreply.md— How the agent evaluates human replies to its questionsreview.md— How the agent addresses PR review feedback
Ask the user:
- What test framework does their project use? The implement and review prompts reference
$AGENT_TEST_COMMANDwhich they set in Step 2. - Does their project have a CLAUDE.md? The prompts instruct the agent to read it. If not, recommend creating one with coding conventions and architecture overview.
- Do they want to customize any prompts now, or start with defaults and customize later?
For standalone mode: customizations are made directly in .sandbox-pal-dispatch/prompts/.
For reference mode: customizations go in separate files pointed to by AGENT_PROMPT_* in config.env.
Step 5: Create Labels
Run the label creation script against their target repo:
bash ${CLAUDE_SKILL_DIR}/../../scripts/create-labels.sh OWNER/REPOReplace OWNER/REPO with the actual value from Step 2. Confirm the labels were created successfully.
Step 6: Generate Workflows
Reference mode
Read each template in this skill's templates/ directory (the caller-*.yml files, NOT the standalone/ subdirectory):
caller-triage.yml,caller-implement.yml,caller-reply.yml,caller-review.yml,caller-cleanup.yml
Standalone mode
Read each template in templates/standalone/:
sandbox-pal-triage.yml,sandbox-pal-implement.yml,sandbox-pal-reply.yml,sandbox-pal-review.yml,sandbox-pal-cleanup.yml
For each template:
- Replace
{{BOT_USER}}with the bot username from Step 2 - Show the user the generated workflow
- Write it to the user's target repo at
.github/workflows/
Ask the user where their target repo is cloned locally so you can write the files there. For standalone mode, this was already collected in Step 2.
Programmatic dispatch (optional)
If any automation will trigger the agent while authenticated as the bot account -- the Discord bot (see docs/notifications.md), an orchestrator session, or scripts using the bot PAT -- also deploy the dispatch template:
- Reference mode:
caller-dispatch.yml - Standalone mode:
sandbox-pal-dispatch.yml(fromtemplates/standalone/)
This "Agent Dispatch (programmatic)" workflow is the official programmatic on-ramp: repository_dispatch with event types agent-triage, agent-implement, and agent-reply. Label events applied by the bot account are filtered by the anti-self-trigger guard, so bot-driven automation must use this path. The Discord bot's Approve, Retry, Comment, and Request Changes actions are one caller of it. See docs/architecture.md, "Programmatic Triggering (repository_dispatch)".
Step 7: Guide Secret Setup
The target repo needs these GitHub Actions secrets:
AGENT_PAT— Fine-grained PAT for the bot account (required)AGENT_GIST_PAT— Classic PAT withgistscope for the cleanup workflow (optional)
Walk the user through setting them:
# Set the bot's PAT (this will prompt securely)
gh secret set AGENT_PAT --repo OWNER/REPO
# Optional: set gist PAT for cleanup
gh secret set AGENT_GIST_PAT --repo OWNER/REPOIf the user hasn't created a bot account or PAT yet, walk them through:
- Create a new GitHub account for the bot
- Create a fine-grained PAT with scopes: Contents (rw), Issues (rw), Pull requests (rw), Metadata (r)
- Add the bot as a collaborator on their target repo
Step 8: Validate
Summarize everything that was set up:
- Setup mode chosen (reference vs standalone)
- Config file location
- Labels created
- Workflow files generated and where they were written
- Secrets that need to be set (if not done in Step 7)
- For standalone: list of files copied to
.sandbox-pal-dispatch/
Step 9: Self-Hosted Runner Setup
Ask the user if they already have a self-hosted runner configured for this repo. If yes, skip to Step 9e (verify prerequisites). If no, walk them through the full setup.
Step 9a: Determine runner scope
Ask: Is the target repo under a personal account or an organization?
- Organization repo: Recommend org-level runner registration. One runner serves all org repos. Token source:
https://github.com/organizations/<org>/settings/actions/runners/new - Personal account repo: Only repo-level registration is available (GitHub does not support user-level runners). Token source:
https://github.com/<owner>/<repo>/settings/actions/runners/new
If the repo is public, display this warning:
⚠️ Security risk: GitHub warns against using self-hosted runners on public repositories. Anyone who forks the repo and opens a PR can potentially execute code on your runner, accessing environment variables, API keys, and the filesystem. Consider making the repo private, or review the hardening steps in docs/security.md.
Step 9b: Download and extract the runner
Direct the user to the GitHub UI page for their scope (org or repo). The page shows the correct download URL and checksum for their platform. Tell them to follow the download and extraction steps shown there.
Suggest a directory naming convention:
~/actions-runner-<repo-name>/for single-repo setups~/actions-runner-<org>-agent/for org-level setups
Check if the user already has runner directories on the machine:
ls -d ~/actions-runner-* 2>/dev/nullIf found, offer to reuse the binary — they only need a new directory and registration.
Step 9c: Register the runner
The user must get a registration token from the GitHub UI (it expires in 1 hour). Tell them to navigate to the URL from Step 9a, copy the token, and then run:
./config.sh \
--url https://github.com/<owner-or-org> \
--token <TOKEN_FROM_GITHUB_UI> \
--name <descriptive-name> \
--labels self-hosted,agent \
--work _workThe --labels self-hosted,agent is required — the dispatch workflows use runs-on: [self-hosted, agent].
Since this requires a token the user must paste, tell them to run the command themselves. In Claude Code, they can use ! ./config.sh ... to run it in the session.
Step 9d: Configure credentials
The Claude Code CLI needs to be authenticated on the runner. The dispatch scripts do not prescribe a method — point the user to Anthropic's Claude Code authentication docs for the available options, or authentication.md for the project's summary and Terms-of-Service pointers.
If the user chose a method that uses environment variables, the runner's .env file (in the runner installation directory, not ~/.bashrc — systemd services do not source shell profiles) is the right place to set them. Any .env holding credentials must be chmod 600.
Verification: After the runner service is restarted in Step 9f, have the user run claude /status on the runner (as the runner user). It should report that the runner is authenticated with the expected account.
Node/Claude path — If using nvm, the claude binary won't be in PATH for systemd services. Add the path to .env:
echo "PATH=$HOME/.nvm/versions/node/$(node -v)/bin:$PATH" >> .envGit identity — Configure git for the bot account:
git config --global user.name "<bot-username>"
git config --global user.email "<bot-username>@users.noreply.github.com"Step 9e: Verify prerequisites
Check that the required tools are available:
claude --version && gh --version && git --version && jq --version && echo "All tools found"If any are missing, help the user install them. See docs/runners.md for the full list.
Step 9f: Install systemd service
sudo ./svc.sh install $(whoami)
sudo ./svc.sh start
sudo ./svc.sh statusThe service name follows the pattern actions.runner.<org-or-owner>.<runner-name>.service.
Step 9g: Verify in GitHub UI
Direct the user to check that the runner appears in the GitHub UI:
- Org:
https://github.com/organizations/<org>/settings/actions/runners - Repo:
https://github.com/<owner>/<repo>/settings/actions/runners
It should show as Idle with the labels self-hosted and agent.
Step 9h: Reference mode only — clone upstream and copy config
For reference mode, the dispatch scripts run from a clone of this repo on the runner:
git clone https://github.com/jnurre64/sandbox-pal-action.git ~/agent-infra
cp <path-to-config.env> ~/agent-infra/config.envStep 10: Test and Finish
Commit and push
- Reference mode: Commit and push the workflow files to the target repo
- Standalone mode: Commit and push
.sandbox-pal-dispatch/and.github/workflows/to the target repo
Dry run
Create a test issue on the target repo and add the agent label. Watch the agent triage it, write a plan, and wait for approval.
Summary
Summarize everything that was set up:
- Setup mode (reference or standalone)
- Config file locations
- Labels created
- Workflows generated
- Secrets configured
- Runner registered and running
- For standalone: list of files in
.sandbox-pal-dispatch/
If any step was skipped, list it with instructions for completing it later. Reference docs/runners.md for the full runner documentation.
Named dispatch profile assets
The shared installation inventory delivers and checksums
agent-profiles.example.json, scripts/agent-profile.sh and its library modules.
Do not copy the example over an active agent-profiles.json, replace saved
.agent-profile selection, or enable AGENT_ENGINE_PROFILES during setup/update.
Preserve existing project configuration on repeated setup. Add .agent-profile
(or the configured selection path) and the catalog capture lock directory to
the consuming project's ignore rules. For explicit adoption, follow
docs/configuration.md → “Named dispatch profiles”: migrate legacy Codex
settings, capture actual legacy routing, preview, then select a profile.
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.

