Install any skill in seconds. Free to start, no credit card required.
Get Started Free →How a saved preset becomes the running default, first-run/setup choice semantics, propagation, and what /refresh actually switches.
.claude/skills/lingtai-ai-preset-skill-op-activation-session-refresh/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -27% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -14% | 0% |
Evidence: tui/internal/tui/firstrun.go:4022-4205, tui/internal/tui/app.go:857-906.
enterAgentPresets() (firstrun.go:4032-4133) lists only saved presets (Source == SourceSaved via preset.IsTemplate), never raw templates. A built-in template isn't "endorsed" onto this surface until the user has edited and saved it — which materializes a saved preset. See reference/operations/saved-presets/SKILL.md for the save mechanics that put a preset here in the first place.
The wizard defaults to "nothing allowed except the one the user's cursor was on when they entered this step" — the schema invariant is that default must be a member of allowed, and the default row is always forced into presetAllowed. allowedPresetRefs() (firstrun.go:4175-4190) writes the default preset first, then the rest of the user-checked rows in row order, into manifest.preset.{default,allowed}.
Re-running /setup on an agent that already has an init.json hydrates presetAllowed/presetDefaultIdx from the existing manifest.preset.{default,allowed} (firstrun.go:4078-4116) rather than resetting to "nothing allowed" — so re-running setup only changes what the user explicitly changes. Path comparison is normalized (~/... vs absolute) via presetRefMatches (firstrun.go:4143-4168) so the same file referenced two different ways still matches. A preset the wizard's cursor now points at, but which isn't in the existing allowed list (e.g. just created in the editor), is auto-checked so it doesn't silently stay unauthorized — the user can still uncheck it.
propagatePresetPolicyToNetwork() (firstrun.go:4192-4206) treats /setup as a network-wide preset-policy reset: the wizard's chosen {default, allowed} surface is pushed to every other agent in the project, not just the one being edited. This is best-effort — failures are not surfaced as a user-visible error because the primary agent's save already succeeded.
/refresh — three forms, one thing they don't doapp.go:857-906 handles three /refresh invocations:
/refresh all — hard-refreshes every non-human agent in the projectat its current preset; failures per-agent are collected and reported, the operation doesn't stop on the first failure.
/refresh <preset> — resolves <preset> against the target agent'smanifest.preset.allowed list first (resolvePresetInAllowed); an unresolvable name surfaces a clear status-bar error and does nothing destructive. On success, hard-refreshes the target agent switched to that preset.
/refresh — hard-refreshes the target agent at its currentpreset (no switch).
Saving a preset alone does not switch a running session. A saved or even newly-activated (default) preset only takes effect on the next launch/refresh of a given agent — an explicit /refresh [preset], relaunch, or new service construction is required to pick it up. This mirrors the codex-pool selection-at-construction rule in reference/codex-pool/SKILL.md — that pool selection is one more thing an in-place preset/pool-file edit does not retroactively touch on an already-running session.
For why Save no longer requires a live-probe pass before a preset becomes eligible here (structural validation only), see reference/operations/availability-save-gate/SKILL.md. For the Load/Save/Delete contract, see reference/operations/saved-presets/SKILL.md.
Other measured skills in the registry, with their headline benchmark lift.