zehuichan

setup-zstack

Configure which model runs each zstack role (planning, coding, review). Detects the models this host can run and writes an always-applied user rule that overrides the defaults. Use for /setup-zstack, "configure zstack models", or changing which model plans, codes, or reviews.

zehuichan 0 Updated 4h ago

Resources

1
GitHub

Install

npx skillscat add zehuichan/zstack/setup-zstack

Install via the SkillsCat registry.

SKILL.md

Setup zstack

Write ~/.cursor/rules/zstack-models.mdc, an always-applied user rule that names the model for each zstack role. Models are a property of the user's host and plan, so they never go into a project profile.

Steps

  1. Detect the models. List the model slugs this session can pass to a subagent; that is the dependable source. When none can be detected, ask the user to paste the slugs they can use. Never write a slug you have not confirmed. inherit-parent is always valid: the role runs on the chat's own model.

  2. Load the current choices. When the rule exists, read its role lines as the current choices; otherwise start from the defaults in zstack.

  3. Propose a mapping.

    • planning: the strongest detected model, at its highest reasoning level.
    • coding: a mid-tier detected model, at a high reasoning level.
    • review: the strongest detected model from a family different from coding's. When every detected model is one family, write none and say that high-risk reviews will record "not run".
  4. Confirm. Show each role with its model and ask, with AskQuestion, whether to accept it or change a role, offering the detected slugs and inherit-parent. Planning and coding sessions are chats the user starts, so their lines tell the user which model to pick; the review line is passed to subagents as is.

  5. Validate. Every written slug is in the detected set or is inherit-parent or none, and review is not the same family as coding. Ask again otherwise.

  6. Write the rule, overwriting the whole file so a rerun stays idempotent:

    ---
    description: zstack per-role models (overrides the skill defaults)
    alwaysApply: true
    ---
    # zstack models. One line per role; delete a line to fall back to the skill default.
    # planning and coding: the model to start that session's chat on. review: passed to the reviewing subagent.
    planning: <slug>
    coding: <slug>
    review: <slug or none>
  7. Report that the rule applies to new chats, and that rerunning this skill changes it.