baton
Skill2 starsChanged 4 months agoMITView on GitHub
View or change Pass the Baton configuration. Use for template switching, threshold adjustment, or inspecting current config.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- fullerzz/agent-skillstheir own version, first seen Nov 29, 2026
- xgbtxy/aptheir own version, first seen Nov 29, 2026
- alfabaykal/skillstheir own version, first seen Nov 22, 2026
- Harshit1garg1/Batontheir own version, first seen Nov 8, 2026
- matthewrball/batontheir own version, first seen Aug 14, 2026
- jeremyknows/batontheir own version, first seen Jul 20, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- fullerzz/agent-skills★ 2same name
- jeremyknows/baton★ 2same name
- xgbtxy/ap★ 2same name
- alfabaykal/skills★ 1same name
- Harshit1garg1/Baton★ 0same name
- matthewrball/baton★ 0same 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.
In this repositoryOne other file it gives its agents.
- install-batonSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
When installed as a plugin the command is namespaced: /pass-the-baton:baton.
“Common” is measured: kept by at least 6 in 10 of the 5 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
/baton - Configuration Dashboard
When installed as a plugin the command is namespaced: /pass-the-baton:baton. The bare /baton form is available only via the manual install.sh project-local install.
When to Use
- See the current Pass the Baton config (
/batonor/baton show) - Change a config value (
/baton set key=value) - Switch progress-file template (
/baton set template=factory) - Point the user at the interactive dashboard (
tools/baton-dashboard.sh tui) - it needs a real terminal, so hand them the command rather than running it yourself
Process
Show mode (default)
bash "${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR}/tools/baton-dashboard.sh" showPrints current global keys + active template's template_version. Does not modify anything.
Set mode
bash "${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR}/tools/baton-dashboard.sh" set <key>=<value> [<key2>=<value2> ...]Valid keys. show lists them grouped by category, and reads each with
env-var > config.json > default precedence (lib/config.sh).
[Existing]
| Key | Validation | Example |
template | One of: free, task, factory, or a custom template installed at $XDG_CONFIG_HOME/baton/templates/<name>.md | template=factory |
threshold_pct | Integer 1-99 | threshold_pct=35 |
display_name | Free-form string | display_name=myproject |
templates_dir | Free-form path | templates_dir=/path/to/templates |
project_context_file | Path relative to project root | project_context_file=.baton-project/project-context.json |
max_terminals_per_workstream | Non-negative integer | max_terminals_per_workstream=4 |
auto_continue_mode | One of: off, tmux, relaunch (selects the baton launcher's auto-continue driver) | auto_continue_mode=relaunch |
launch_alias | Alias name matching [A-Za-z_][A-Za-z0-9_-]*, not a shell builtin/keyword or a name already on PATH; writes/rewrites the alias <name>='bash <repo>/tools/baton-run.sh' rc block | launch_alias=baton |
[Paths] - non-empty string
| Key | Validation | Example |
BATON_DIR | Non-empty path | BATON_DIR=/srv/.baton |
BATON_PROGRESS_DIR | Non-empty path | BATON_PROGRESS_DIR=/srv/.baton/progress |
BATON_ARCHIVE_DIR | Non-empty path | BATON_ARCHIVE_DIR=~/.local/share/baton |
BATON_PROJECT_DIR | Non-empty path | BATON_PROJECT_DIR=/srv/repo |
[TTLs] - non-negative integer (regex ^[0-9]+$; NOT trimmed - 14 is rejected)
| Key | Validation | Example |
BATON_WORKSTREAM_TTL_DAYS | Integer ≥0 | BATON_WORKSTREAM_TTL_DAYS=30 |
BATON_TRACKING_TTL_DAYS | Integer ≥0 | BATON_TRACKING_TTL_DAYS=90 |
BATON_TMP_TTL_HOURS | Integer ≥0 | BATON_TMP_TTL_HOURS=48 |
BATON_SWEEP_INTERVAL_HOURS | Integer ≥0 | BATON_SWEEP_INTERVAL_HOURS=48 |
BATON_PROGRESS_COLD_DAYS | Integer ≥0 | BATON_PROGRESS_COLD_DAYS=14 |
[Opt-ins] - 0 or 1
| Key | Validation | Example |
BATON_TIMING | 0 or 1 | BATON_TIMING=1 |
BATON_OUTCOME_PROXIES | 0 or 1 | BATON_OUTCOME_PROXIES=1 |
BATON_PREWARM | 0 or 1 | BATON_PREWARM=1 |
BATON_EVENT_LOG_DISABLE | 0 or 1 | BATON_EVENT_LOG_DISABLE=1 |
[Event-log] - non-empty string
| Key | Validation | Example |
BATON_EVENT_LOG | Non-empty path | BATON_EVENT_LOG=/srv/hook-events.jsonl |
BATON_OTEL_EXPORT | Non-empty string | BATON_OTEL_EXPORT=otlp |
[Cost-model]
| Key | Validation | Example |
BATON_COST_MODEL | Non-empty string (resolved by cost.sh) | BATON_COST_MODEL=claude-sonnet-4-6 |
BATON_SUMMARY_MODEL | Non-empty string (resolved by cost.sh) | BATON_SUMMARY_MODEL=claude-sonnet-4-6 |
BATON_TOKEN_RATIOS | Non-empty string (= preserved in value) | BATON_TOKEN_RATIOS=input=3,output=15 |
[Statusline]
| Key | Validation | Example |
BATON_STATUSLINE_COLOR_MODE | One of: off, solid, bands | BATON_STATUSLINE_COLOR_MODE=bands |
On validation failure, the driver prints an error to stderr and exits 1 without modifying the config.
TUI mode
bash "${CLAUDE_PLUGIN_ROOT:-$CLAUDE_PROJECT_DIR}/tools/baton-dashboard.sh" tuiA tabbed interactive dashboard: Status (context fill, threshold, auto-continue mode, whether a checkpoint is owed, bound session), Config (the editable keys show prints), History (the last 10 cost entries), Workstreams (tracked progress files). 1-4 switch tabs, r redraws, q quits. On the Config tab up / down move the cursor and enter edits the selected key through the same validation path as set.
Do not run this for the user. The TUI requires stdin and stdout to both be real TTYs. A tool call has neither, so it falls back to plain show output - you would report a dashboard the user never saw. Give them the command to run in their own terminal instead.
BATON_DIR, BATON_PROJECT_DIR and template_version are read-only and do not appear on the Config tab.
Important
- Config file:
$XDG_CONFIG_HOME/baton/config.json(or~/.config/baton/config.jsonif XDG unset) - Atomic writes under flock
- Template switch is refused while a checkpoint is in flight (PENDING flag set) - retry after the progress file is written
- The PENDING check is scoped to THIS terminal's own session: the switch is refused only while this session has a live in-flight checkpoint - its own
/tmp/baton-pending-<session_id>flag (keyed on the resume-stablesession_id) with a fresh pct sibling inside the liveness window. A pending checkpoint in another terminal or project no longer blocks it. The flag clears on the next progress write (typically a singleWriteaway), and is ignored once the owning session ends, since its pct sibling stops refreshing and ages out of the window. - The shipped templates (
free,task,factory) are always available; custom templates require installation first pershare/templates/README.md
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.

