Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Setup?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jueyi6-setup)
---
name: setup
description: Set up empstack, including subagent model and effort.
disable-model-invocation: true
---
# Set up empstack
Assume the user has just installed empstack and knows none of its words.
- Speak in the user's language.
- Before each choice, say in plain words what it changes in their daily use, what it costs, and which answer you recommend and why.
- Never ask with a term you have not explained.
- Put the explanation in the question and in each option's description.
- Mark the recommended option `(Recommended)` and list it first. With a switchboard already there, also mark the current value `(current)`.
- Call a subagent a subagent everywhere, in the explanations, the questions and the options, in the user's language (서브에이전트 in Korean). Use no other word for it.
## The words to explain first
Open with these, in a few plain sentences, before the first question.
- **Subagent.** Another Claude that this one starts for one piece of the work. It gets a short written brief, works on its own, and hands back a report. Each one starts fresh, so each adds token usage.
- **Switchboard.** One settings file, `~/.claude/empstack/switches.md`, or `empstack/switches.md` under `CLAUDE_CONFIG_DIR` when Claude Code runs with that set. No chat loads it, so it costs no tokens. empstack's hooks, small scripts Claude Code runs by itself at set moments, read it each time a subagent starts, and the next prompt names any line that changed. A change applies from the next subagent on. The empstack sidebar shows and edits it.
- **Switch.** One place in empstack's workflows where subagents start, such as `bug-fix`, the subagent that writes a bug fix, or `verifier`, the subagent that checks a change it did not write. A switch says which model its subagents run on and how hard they think.
- **Model and effort.** The model is which Claude runs. `opus` is the strongest, `sonnet` is faster and cheaper, and `haiku` and `fable` are other Claude models. Each name means its newest version. Effort is how long the model thinks before it acts: `low`, `medium`, `high`, `xhigh` or `max`. More effort is more careful, slower, and uses more tokens.
## 0. Python and Node
Explain first. empstack includes TokenEconomizer, which lowers what each chat costs: it learns which tools a repository never uses and stops loading them, and it stops a turn that is stuck in a loop. It needs Python 3.10 or newer on this computer. Without it, the rest of empstack works and TokenEconomizer does nothing.
Run `"${CLAUDE_PLUGIN_ROOT}/te/scripts/te" doctor`, which picks a Python the way the hooks do. Its first line gives the version, `python <version> ok`, or says the Python is too old, or nothing answers.
Find the stable release in `https://endoflife.date/api/v1/products/python/`. Under `result.releases`, it is the newest release whose `releaseDate` has passed, and `isEol` marks the versions past end of life. If the lookup fails, take the newest `Python.Python.3.<minor>` that `winget search --id Python.Python.3` lists, or Homebrew's `python`.
When the Python is missing, older than 3.10, or past end of life, ask with `AskUserQuestion` whether to install the stable release, and recommend yes. Say which Python was found and why it falls short, for example that its security fixes have stopped. Say that the new one installs beside the old one, removes nothing, and applies to chats opened afterward. On yes, run the line for this OS, where `<minor>` is the stable release's minor version.
- Windows: `winget install -e --id Python.Python.3.<minor>`
- macOS: `brew install python@3.<minor>`
- Linux: the distribution's `python3.<minor>` package, or its newest `python3` when it has none, for example `sudo apt install python3`
empstack needs Node 22.18 or newer. The PR watcher Babysit and Shipping use to follow a pull request's checks, `../empstack/scripts/watch-pr/watch-pr`, is TypeScript, which Node runs from that version on. Run `node -p process.features.typescript`. If it prints neither `strip` nor `transform`, tell the user that watching pull requests will not work until Node is upgraded, and let them upgrade it the way they installed it.
## 1. Read what is there
If the switchboard exists, its settings and pinned switches are the current choices. Old names become new ones with the same value: `grandchildren` becomes `nested subagents`, `approval` becomes `subagent approval`, and `side fixes` becomes `autonomous scope`, its old value `all` becoming `nearby`. Any other switch not in the shape below is retired. Drop its line and tell the user.
Look for an old models file in `~/.claude/rules/`: `empstack-models.md`, `mpstack-models.md`, or `pstack-models.md`. Every session loads it; no hook reads it. If one exists, show its role lines and ask with `AskUserQuestion` whether to start every switch at `auto` or carry its values over as pins. Recommend `auto`. Copy no line as it is. To carry a value over:
- `feature, refactoring` sets both `feature` and `refactoring`. Another role whose name is a switch keeps its name.
- `auto` and `inherit-parent` become `inherit`, because they ran the role on the session's model.
- `arena cross-judge pool` leaves `arena cross-judge` at `auto`, where the AI picks the judge's model.
- `judgment and prose` and any other role with no switch are dropped. The ladder covers them.
## 2. Ask the four settings
Ask all four in one `AskUserQuestion` call, one question each, from these explanations. The first option under each is the default and the recommendation.
**`mode`: how much of the work Claude hands to subagents.** `../empstack/references/subagents.md` has the full rule.
- `balanced`: Claude plans and reviews, hands each well-defined piece of the coding to a subagent, and checks the subagent's diff. The main chat stays on design and review, and each subagent adds some tokens.
- `focused`: Claude writes the code itself, and uses subagents only for large searches, reviews and independent checks. Fewer tokens, and slower on large tasks.
- `solo`: Claude does everything itself, and starts a subagent only when the user asks for one, which includes typing a skill such as `/empstack:how`. The fewest tokens. A step that needs someone other than the author, such as an independent review, is skipped, and Claude says so.
- `swarm`: Claude splits the work across many subagents that run at once, and mostly coordinates. Fastest on a large task with separate parts, and the most tokens.
**`subagent approval`: whether Claude asks before it starts subagents.**
- `off`: Claude says in one sentence which subagents it will start and on which model, then starts them. The user can stop it at any time.
- `on`: Claude shows that plan and waits for a yes before the first subagent, and asks again before it moves to a stronger model or adds a step. More control, and more interruptions.
**`nested subagents`: whether a subagent may start subagents of its own.**
- `autopilot`: only inside Autopilot, empstack's hands-off mode that takes a set of pull requests all the way to merge. There one owner subagent per pull request starts its own builders and checkers. Everywhere else a subagent does its work itself.
- `on`: any subagent Claude started may start its own, when its brief says it may.
- `off`: no subagent may, Autopilot's owners included, so each owner does all of its pull request's work itself.
In every setting, a nested subagent never starts another one.
**`autonomous scope`: what a long unattended run fixes besides its goal.** An Autonomous run is a long job Claude does without stopping to ask, such as "keep going until the tests pass" or work left running overnight. Either way, a problem outside the code, tests and tools the run works in is only listed for the user.
- `goal`: fix only what the goal cannot be reached without, or what makes reaching it much slower. List the rest for the user as follow-ups. The change stays small and easy to review.
- `nearby`: also fix the problems it finds in the code, tests and tools it works in, even when the goal does not need them, each in its own pull request. More gets done, with more pull requests to review.
## 3. Ask about adaptive autocompact
Explain first. A chat holds a limited amount of text, its context. When it reaches a set size, its autocompact point, Claude Code compacts it: it writes a summary of everything so far and carries on from the summary.
Then ask with `AskUserQuestion`. The first option is the default and the recommendation.
**`adaptive autocompact`: whether Claude may also decide when the chat compacts.**
- `on`: Claude decides too. When a request does not build on the chat so far, it compacts at once and carries on with the request. When a little unfinished work needs what is only in the chat, it moves this chat's autocompact point up to 25% past the set size, and the next compaction puts it back. Main chat only. Applies from the next chat.
- `off`: Claude Code compacts at the autocompact point, as it always has.
## 4. Ask about models
Explain the three values a switch takes and the optional size, then ask with `AskUserQuestion` whether to keep every switch automatic or pin some. Recommend automatic, or keeping the user's pins when the switchboard has some.
- `auto`: the AI that starts each subagent picks its model and effort, judging the job. Its starting point is the ladder in `../empstack/references/subagents.md`: a one-fact check on `sonnet high`, routine work on `opus medium`, plans, reviews and the hardest work on `opus xhigh`, and the rest on `opus high`.
- `inherit`: the subagent runs on its agent type's own default, which for most subagents is the model of the chat that started it.
- `<model> <effort>`, a pin: that switch always runs on this model, for example `sonnet` to save usage or `opus xhigh` for care. A hook replaces the call's model, and its effort when the pin names one. The effort may be left off.
- Any value may end with a size such as `150k`, `auto 150k` included: that switch's subagents that run as `poteto-agent` auto-compact there. It only lowers the size their model's autocompact line gives them, and a size under `100k` reads the whole value as `auto`.
`mcp idle` is not a switch, and setup does not ask about it. With a line such as `mcp idle: 60m`, empstack routes the Claude desktop app's local MCP servers through its idle proxy at each session start: a server starts on its first tool call and stops after that much idle time, which saves its memory but makes the next call wait for the start. `mcp idle keep: a, b` keeps the servers named always on, and `off` puts every server back. Each change needs a desktop app restart. With no line, empstack never touches the desktop app's config.
To pin, show every switch as one table, with what its subagents do (the comments in the shape below) and its current value, and ask which to change. Two switches are panels: `arena runners` and `interrogate reviewers`, where several subagents take the same question separately, each from its own angle, and none sees another's answer. A panel pin is a comma-separated list with one entry per subagent. A value the Agent tool would reject reads as `auto`.
## 5. Write the switchboard
Write the file in this shape, with every switch the user did not pin at `auto`. Keep any comment lines the user added to an existing switchboard below the header. Keep `sidebar` (`pane` in an older switchboard) as an existing switchboard sets it, else `on`; setup does not ask about it. Keep each autocompact line (`<model> window` in an older switchboard) as an existing switchboard sets it, else `auto`. Keep any `<agent type> autocompact` line (`poteto-agent autocompact: 150k`; `adaptive autocompact` is the setting from step 3, not an agent type) as an existing switchboard sets it, after the autocompact lines, and write none otherwise. Keep `mcp idle` and `mcp idle keep` lines as an existing switchboard sets them, else write `mcp idle` commented out as below.
```
# empstack switchboard. Hooks read it at every subagent spawn. No session loads it.
# auto: the AI picks per call. inherit: the agent type's default model. Pin with "<model> <effort>".
# A panel switch takes a list, one entry per seat.
# An autocompact line (a size, or auto) syncs both ways with settings.json; a change applies from the next session.
mode: balanced # solo | focused | balanced | swarm
subagent approval: off # on: the first subagent waits for the person's yes
nested subagents: autopilot # which subagents may start their own: off | autopilot (Autopilot's PR owners) | on
autonomous scope: goal # nearby: an autonomous run also fixes what it finds in the code it works on
sidebar: on # off: the empstack sidebar opens only by /empstack-sidebar
adaptive autocompact: on # off: Claude Code compacts only at the autocompact point
haiku autocompact: auto # where a Haiku session or subagent auto-compacts; kept in step with settings.json
sonnet autocompact: auto # where a Sonnet session or subagent auto-compacts; kept in step with settings.json
opus autocompact: auto # where an Opus session or subagent auto-compacts; kept in step with settings.json
fable autocompact: auto # where a Fable session or subagent auto-compacts; kept in step with settings.json
# mcp idle: 60m # without the first #: the Claude desktop app's local MCP servers start on first use and stop after 60 idle minutes
default: auto # a spawn whose brief names no switch below
bug-fix: auto # writes a bug fix
feature: auto # writes feature code
refactoring: auto # carries out a refactor
perf-issue: auto # writes a performance fix
hillclimb: auto # one try at raising a measured score
autopilot owner: auto # takes one pull request from build to merge in Autopilot
watcher: auto # waits for an event that takes judgment to spot
artifact parser: auto # boils a large trace, profile or log down to the cause
transcript reader: auto # reads an old chat's transcript
swarm workers: auto # one slice of a parallel fan-out
verifier: auto # checks a change it did not write
visual-parity workers: auto # rebuilds one UI component to match a reference
arena runners: auto # panel: competing attempts at one task
arena cross-judge: auto # judges the arena's attempts
interrogate reviewers: auto # panel: reviewers who challenge a design
comment-sicko: auto # deletes needless code comments
explorer: auto # read-only search that explains code
research: auto # reads outside sources into a cited file
history reader: auto # searches the user's past chats
record investigator: auto # searches tickets, PRs and docs on a topic
feature reader: auto # explains one feature from its source
trail reviewer: auto # reviews a long run's record before hand-back
figure-it-out workers: auto # one workstream of a large cross-cutting task
```
If an old models file exists, ask whether to delete it, and delete it only on yes. While it stays, every session still loads its lines.
## 6. Offer the autocompact tour
Ask with `AskUserQuestion` whether the user wants a short tour of autocompact, the sizes at which chats compact. Recommend no for a user who has not changed a size before; they can ask any time. On yes, explain in a few plain sentences, pointing at the sidebar's autocompact block, where each row shows its size and takes a new one:
- `<model> autocompact`, one line per model: where sessions and subagents on that model compact, as a size such as `200k`, or `auto` for the model's own limit. empstack keeps it in step with `modelSettings.<model id>.autoCompactWindow` in Claude Code's `settings.json`, both ways, and a change applies from the next session.
- `<agent type> autocompact`, such as `poteto-agent autocompact: 150k` or one for an agent the user wrote in `~/.claude/agents/`: where subagents of that type compact, when lower than their model's sessions. The sidebar lists `poteto-agent` and every agent file in `~/.claude/agents/` and the project's `.claude/agents/`. Claude Code's built-in types follow the session size. For `poteto-agent`, a switch's own size, the value's last token, wins over it.
- This session alone: `/empstack-session-autocompact 400k` or the sidebar's `this session` row sets it at once, and `default` puts it back. Asking in words works too.
- With `adaptive autocompact: on`, Claude may move this session's point up to 25% past the set size, and the next compaction puts it back.
## 7. Reply language
Optional. Explain that empstack can catch a reply that comes out mostly in English instead of the user's language and send it back once to be rewritten. Ask whether to turn that on. On a language, read `../language/SKILL.md` and follow it with that language.
## 8. Finish
Show what was set as one short table: the five settings, and "all automatic" or the pins, each with what it means in a few words. Say where the file is, that the sidebar shows and edits every line, and that `/empstack:setup` changes it again at any time. Anything installed in step 0 applies to chats opened from now on. Questions about empstack go to `/empstack:help`.