/kstack:k-setupfrom K-stack
Configures K-stack's role-to-tier routing (Haiku/Sonnet/Opus effort per role). Writes a managed block into CLAUDE.md for session persistence.
Ships in K-stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Write the kstack-routing block in ~/.claude/CLAUDE.md. k-mode and every k-* skill read it. To switch between presets without the checks below, /kstack:k-effort does it in one command.
List the agent types available in this session. Confirm all eleven kstack:k-* tiers from ../k-mode/references/routing.md are present. If any are missing, stop. Tell the user to run /plugin update kstack (or /plugin install kstack@k-stack) and start a new session. There is no Sonnet Max tier; it is forbidden. If a stale kstack:k-sonnet-max still appears, tell the user to run /plugin update kstack and never dispatch it.
Then check what the aliases resolve to. Dispatch kstack:k-haiku-medium, kstack:k-sonnet-low and kstack:k-opus-medium in one message, each with the prompt Reply with only your exact model ID. Report all three. If Sonnet is not 5.5, say that the routing still works but its benchmark basis was Sonnet 5.5, and that claude update plus account access moves it there automatically. If Haiku is not 5.5 (Bedrock, Google Cloud and Foundry still serve Haiku 4.5, which has no effort control), say so and plan to write the block with --haiku off, so every Haiku role runs as sonnet-low.
Read ~/.claude/CLAUDE.md. If a block between <!-- kstack-routing: begin --> and <!-- kstack-routing: end --> exists, its # preset line and role lines are the current choices. Otherwise start from Balanced.
Legacy config from the pstack port: ~/.claude/pstack-models.md and ~/.claude/agents/opus-{low,medium,high,xhigh,max}.md. If any exist, note them for step 6. Do not touch them yet.
Ask with AskUserQuestion. Name the current preset when one is recorded.
Balanced (recommended): Haiku for lookups and mechanical edits, Sonnet High for everyday code, Sonnet XHigh for hard code, Opus Medium for exploration, Opus High for design and review, Opus XHigh for sweeps.Lean: every role one effort step lower, and docs move to Haiku.Quality: every role one step higher, capped at XHigh. Mechanical edits move back to Sonnet.Custom: start from Balanced and change individual roles.Build the table from the matching column in routing.md. For Custom, show every role with its tier. Offer the ten non-Max tiers and inherit (the role runs on the lead's model, and model is omitted on the Agent call). Max tiers are never offered, since Burn reaches them per task.
Show the final role → tier table and ask to accept it or change specific roles.
Write it with the k-effort script, which replaces the existing block or appends one and leaves the rest of CLAUDE.md byte-for-byte unchanged:
node "${CLAUDE_PLUGIN_ROOT}/skills/k-effort/scripts/k-effort.js" --data "${CLAUDE_PLUGIN_DATA}" --session-id "${CLAUDE_SESSION_ID}" set <lean|balanced|quality> [role=tier ...] [--haiku off]
For Custom, pass Balanced as the base and one role=tier per changed role; the script records # preset: custom. Add --haiku off when step 1 found Haiku 4.5. If the output starts with k-effort error:, fix the choice with the user and run it again.
Re-read the file and confirm the block appears exactly once.
If step 2 found legacy files, list them. Ask once whether to move them to ~/.claude/backups/pstack-legacy-<date>/. Only move on yes. Never delete them.
Ask once with AskUserQuestion: Optimise token use too? with Yes (Recommended) and Skip. On yes, run the /kstack:k-tokens apply screen from ../k-tokens/SKILL.md. On skip, say that /kstack:k-tokens audit shows where tokens go whenever they want it.
Say the block was written and which preset is active. It is also active in this session from now on, and other sessions pick it up when they restart. Mention /kstack:k-effort for switching levels later, and /kstack:k-tokens if token settings were applied or skipped. Recommend Opus 5.5 at High as the lead model (/model opus, effort high) if the session is on something else.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kasempiternal/k-stack --plugin kstack14 skills in this plugin
/k-agent-timeUse when asked to improve, optimize, redesign or solve an open-ended technical problem, or before dismissing an option as too big, slow or costly. Prices effort for agents, not human-hours./k-cursor-architectDelegate focused implementation or investigation from Claude Code to the Cursor Agent CLI (cursor-agent) running Grok 4.7. Use when the user invokes /k-cursor-architect, asks Claude to hand work to Cursor or Grok, or enables session-only delegation. Session mode makes Cursor the exclusive delegation backend and blocks native Claude teammates. Never enables a global or persistent mode./k-designDesign before implementing. Opus produces the data shape, interface, file plan, failure cases, tests, and verification commands for a change, and runs a competing-designs bakeoff when the design is contested or has no precedent. Use for architecture, system or API design, implementation plans, repo restructuring, RFC-grade decisions, or from k-mode before code that crosses a function boundary.Other plugins' skills for the same job