setup-pstack
Configure which models pstack uses per role. Detects your available models and writes an always-applied rule that overrides the skill defaults. Use for /setup-pstack, "configure pstack models", or changing pstack's model choices.
1How It Works & Mechanism
The sole artifact produced is a user-level rule file: ~/.cursor/rules/pstack-models.mdc, with alwaysApply: true, declaring 'role → model' line-by-line.
Write `~/.cursor/rules/pstack-models.mdc`, an always-applied rule that sets pstack's model per role.
Model discovery relies on 'which slugs the Task tool in this session accepts' as the single source of truth; if undetectable, it prompts the user to paste them, strictly prohibiting unconfirmed slugs from being written.
Enumerate the model slugs you can pass to a `Task` subagent in this session. That is the dependable source. If Cursor also exposes a models API or CLI that lists the user's entitled models, prefer it for completeness. If you cannot detect any, ask the user to paste the slugs they have access to. Never write a real slug you have not confirmed is available. The aliases `inherit-parent` and `auto` are always valid even though they are not detected slugs.
The second-level validation is independent of the discovery phase: Before writing, it double-checks that 'every real slug is within the detected set', halting and re-asking if not.
Every real slug written must be in the detected set. `inherit-parent` and `auto` always pass. If a chosen real slug is not available, stop and ask again.
Interactions prioritize structured choices (AskQuestion) over free text, presenting existing configurations as 'current selections' for role-by-role confirmation.
Ask whether to accept as-is or change specific roles, offering the detected models plus `inherit-parent` and `auto` (both mean: this role runs on the parent chat model, which is how Auto users stay on Auto) as the options. Prefer AskQuestion over free text.
Full-file overwrite ensures idempotency: Re-running will not accumulate duplicate or contradictory role lines.
Overwrite the whole file so re-runs stay idempotent. Shape:
The values for panel-style roles are **lists**, and list length directly dictates child agent fan-out quantity—this is the skill's most substantial semantic (configuration equals concurrency).
For panel roles (arena runners, architect runners, interrogate reviewers) the value is a list, and one subagent runs per entry, alias entries included, so the list length sets the count.
An optional final step laterally triggers another skill: When detecting that the project lacks the capability to 'drive real apps for verification', it asks once whether to generate an in-project verification skill.
Check whether the project has a way to drive the real app for proof (a `verify-*` skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /create-verification-skill." On yes, invoke `/create-verification-skill` (resolves wherever pstack is installed: workspace, user, or plugin). On no, move on without pushing.
The activation timing is explicitly stated: Rules take effect on new sessions, requiring a new chat to be opened.
After setup, start a new chat. The model rule applies to new sessions.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| api | Cursor Task 子代理的模型枚举(作为可用 slug 的探测源) |
| network | 用户级规则文件 ~/.cursor/rules/pstack-models.mdc(读+写) |
| package | AskQuestion(宿主交互工具,用于结构化询问而非自由文本) |
4Recommended Governance & Evidence
- 本地工作目录: File I/O and artifact output: ~/.cursor/rules/pstack-models.mdc (full-file overwrite, alwaysApply: true, user home directory-level persistent configuration; sole file produced
5Second-Pass Verification
- [ok] 「写一个 always-applied 规则」是否属实 — SKILL.md Step 5 原文给出 `alwaysApply: true`,且位于规则文件 frontmatter 形状中;docs/guide/01-setup.md 复述 'It writes `~/.cursor/rules/pstack-models.mdc`, a small rule every pstack skill reads.'。
- [ok] 「每个真实 slug 必须已被确认可用」的双重校验 — Step 1 'Never write a real slug you have not confirmed is available.' 与 Step 4 'Every real slug written must be in the detected set. `inherit-parent` and `auto` always pass. If a chosen real slug is not available, stop and ask again.' 两处独立存在,非同一句的重复表述。
- [ok] 本 skill 是否读取凭证或环境变量 — 全文无 API_KEY/token/secret/env 命中;模型可用性靠「本会话能否 spawn」这一运行时事实,不需读凭证。第一遍的 blue 档依据成立。
- [ok] 首遍写入的「18 行角色」计数 — 逐行数 Step 5 模板:feature, refactoring / bug-fix / perf-issue / hillclimb / judgment and prose / hardest tasks / how explorer / how explainer / why investigators / why synthesizer / reflect tooling / reflect judgment, divergent, synthesizer / arena runners / arena cross-judge pool / swarm workers / architect runners / interrogate reviewers = 17 行(另有 2 行注释说明)。首遍写「18 行」为计数偏差,实际 17 行;已在此更正,不影响其他结论。
- [ok] 「配置即扇出规模」的说法 — SKILL.md Step 3 明写面板角色(arena runners、architect runners、interrogate reviewers)'the value is a list, and one subagent runs per entry, alias entries included, so the list length sets the count';interrogate 的 SKILL.md 亦复述同一语义('one reviewer per entry, extending or shrinking the Reviewer A/B/C/D labels'),两端一致。
- [ok] 尾步是否可能未经同意就动手 — 原文 'offer once ... On yes, invoke /create-verification-skill ... On no, move on without pushing',明确单次提议 + 需 yes;docs/guide 亦写 'Say yes and it writes … Say no and setup moves on.'。
- [ok] 是否存在未披露的文件写入 — 全文写入指令只有一处(规则文件);写规则时 'Overwrite the whole file' 明确是覆写而非追加,故不会形成多处散落写入。间接写入(.cursor/skills/verify-<app>/)发生在另一个 skill 内,已单列并标注归属。
- [ok] 元数据(license/stars/install) — license MIT 来自 pstack/LICENSE 与 plugin.json;stars 7799 / last_push 2026-09-15T03:14:54Z 来自 gh api repos/cursor/plugins(仓库根无 LICENSE,故 gh license 为 null);installs=3 取自 pool.json 的 skills.sh-hot 计数,明显为低值采样,不据此下任何结论。
6Verdict & Scenarios
21a003c19c3e95ac…