setup-pstack

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Setup pstack

配置pstack

Write
~/.claude/pstack-models.md
, a per-role model override sheet you include from your global
CLAUDE.md
. Each pstack skill names a default model inline; the override sheet is the layer that adapts those defaults to the models you actually have access to.
Platform note. On Codex, the override sheet is
~/.codex/pstack-models.md
, the slugs are your Codex models (for example
gpt-5.5
) not
claude-*
, and you load it by adding the sheet's contents to
~/.codex/AGENTS.md
(Codex has no
@
-include into a rules file). The role rows in step 5 are identical; only the slugs, the file path, and the load mechanism change. Detect Codex slugs from
~/.codex/config.toml
(
model = ...
) plus whatever the user confirms. See
codex-tools.md
.
Claude Code has no auto-applied "rules" mechanism like Cursor's
.mdc
. Inclusion is explicit: the user adds a line to
~/.claude/CLAUDE.md
(or their project
CLAUDE.md
) such as:
text
@~/.claude/pstack-models.md
so the file is loaded as context for every session.
写入
~/.claude/pstack-models.md
文件,这是一个按角色划分的模型覆盖表,您可以将其引入全局的
CLAUDE.md
中。每个pstack技能都会在代码内指定默认模型;该覆盖表用于将这些默认模型适配为您实际可访问的模型。
平台说明:在Codex上,覆盖表路径为
~/.codex/pstack-models.md
,模型标识为您的Codex模型(例如
gpt-5.5
)而非
claude-*
,您需要将该表的内容添加到
~/.codex/AGENTS.md
中(Codex不支持在规则文件中使用
@
引入)。步骤5中的角色行内容完全相同;仅模型标识、文件路径和加载机制有所不同。从
~/.codex/config.toml
文件的
model = ...
字段检测Codex模型标识,同时结合用户确认的内容。详情请参阅
codex-tools.md
Claude Code没有类似Cursor的
.mdc
那样自动应用的“规则”机制,必须显式引入:用户需要在
~/.claude/CLAUDE.md
(或项目级的
CLAUDE.md
)中添加一行内容,例如:
text
@~/.claude/pstack-models.md
这样该文件就会在每个会话中作为上下文加载。

Steps

步骤

1. Detect available models

1. 检测可用模型

Enumerate the model slugs you can pass to an
Agent
subagent in this session — that is the dependable source. The currently available Claude models and the default panel are listed in Models below; the quad is chosen for cross-family, cross-tier diversity, and the single-role default stays out of the panels because it already covers the single-model roles. Ask the user to confirm or paste any additional slugs they want available. 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; both mean the role runs on the parent session's model, which the
Agent
call expresses by omitting
model
.
列举在本次会话中可传递给
Agent
子代理的模型标识——这是可靠的数据源。当前可用的Claude模型和默认面板列表如下文的模型部分所示;选择这四个模型是为了实现跨系列、跨层级的多样性,单角色默认模型未纳入面板是因为它已经覆盖了单模型角色的需求。请用户确认或粘贴任何他们希望添加的其他模型标识。切勿写入未确认可用的真实模型标识。
inherit-parent
auto
这两个别名始终有效,即使它们无法被检测到;两者都表示该角色使用父会话的模型,
Agent
调用时会省略
model
参数。

2. Load current state

2. 加载当前状态

The default role-to-model mapping is the rule shape shown in step 5 below. If
~/.claude/pstack-models.md
already exists, read it and treat its values as the current choices. Otherwise start from those defaults.
默认的角色-模型映射采用下文步骤5所示的规则格式。如果
~/.claude/pstack-models.md
文件已存在,请读取该文件并将其值作为当前选择。否则从默认值开始。

3. Map and confirm

3. 映射并确认

Show every role with its current model, marking any real slug not in the detected set as needing a choice. Ask whether to accept as-is or change specific roles, offering the detected models plus
inherit-parent
and
auto
as the options. Prefer
AskUserQuestion
over free text. For panel roles (how critics, 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.
arena cross-judge pool
is also a list, but Arena selects one value from it whose model family differs from the parent's when possible.
swarm workers
is the default model for every worker unless a race or comparison assigns another model per arm.
展示每个角色及其当前使用的模型,标记所有不在检测集合中的真实模型标识,提示用户需要选择。询问用户是接受当前设置还是修改特定角色,提供检测到的模型以及
inherit-parent
auto
作为选项。优先使用
AskUserQuestion
而非自由文本输入。对于面板角色(how critics、arena runners、architect runners、interrogate reviewers),其值为列表,每个列表项对应一个子代理,别名条目也会被计入,因此列表长度决定了代理数量。
arena cross-judge pool
同样是列表,但Arena会尽可能从中选择一个与父模型系列不同的值。
swarm workers
是所有工作者的默认模型,除非竞赛或对比为每个分支分配了其他模型。

4. Validate

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. An override pointing at a model the user cannot use breaks every delegation that reads it.
写入的所有真实模型标识必须属于检测集合;
inherit-parent
auto
始终通过验证。如果选择的真实模型标识不可用,请停止操作并重新询问。指向用户无法使用的模型的覆盖配置会导致所有依赖它的代理任务失败。

5. Write the override sheet

5. 写入覆盖表

Write
~/.claude/pstack-models.md
with the shape below. Overwrite the whole file so re-runs stay idempotent.
markdown
undefined
按以下格式写入
~/.claude/pstack-models.md
文件。覆盖整个文件,确保重复执行该操作时结果一致。
markdown
undefined

pstack model configuration

pstack model configuration

Per-role model overrides for pstack skills. Each pstack SKILL.md names its defaults in a Models section; the values here override those defaults. Delete a line to fall back to the skill default. A value of
inherit-parent
or
auto
runs that role on the parent session's model (the
Agent
call omits
model
); an alias entry in a panel list still counts toward that panel's fan-out.
feature, refactoring: claude-opus-5 bug-fix: claude-fable-5 perf-issue: claude-fable-5 hillclimb: claude-fable-5 judgment and prose: claude-opus-5 strongest judgment: claude-fable-5 how explorer: claude-opus-5 how explainer: claude-opus-5 how critics: claude-opus-5, claude-fable-5, claude-sonnet-5 why investigators: claude-opus-5 why synthesizer: claude-opus-5 reflect tooling: claude-opus-5 reflect judgment, divergent, synthesizer: claude-opus-5 arena runners: claude-opus-5, claude-fable-5, claude-sonnet-5 arena cross-judge pool: claude-opus-5, claude-fable-5, claude-sonnet-5 swarm workers: claude-opus-5 architect runners: claude-opus-5, claude-fable-5, claude-sonnet-5 interrogate reviewers: claude-opus-5, claude-fable-5, claude-sonnet-5
undefined
Per-role model overrides for pstack skills. Each pstack SKILL.md names its defaults in a Models section; the values here override those defaults. Delete a line to fall back to the skill default. A value of
inherit-parent
or
auto
runs that role on the parent session's model (the
Agent
call omits
model
); an alias entry in a panel list still counts toward that panel's fan-out.
feature, refactoring: claude-opus-5 bug-fix: claude-fable-5 perf-issue: claude-fable-5 hillclimb: claude-fable-5 judgment and prose: claude-opus-5 strongest judgment: claude-fable-5 how explorer: claude-opus-5 how explainer: claude-opus-5 how critics: claude-opus-5, claude-fable-5, claude-sonnet-5 why investigators: claude-opus-5 why synthesizer: claude-opus-5 reflect tooling: claude-opus-5 reflect judgment, divergent, synthesizer: claude-opus-5 arena runners: claude-opus-5, claude-fable-5, claude-sonnet-5 arena cross-judge pool: claude-opus-5, claude-fable-5, claude-sonnet-5 swarm workers: claude-opus-5 architect runners: claude-opus-5, claude-fable-5, claude-sonnet-5 interrogate reviewers: claude-opus-5, claude-fable-5, claude-sonnet-5
undefined

6. Wire it in

6. 完成集成

If
~/.claude/CLAUDE.md
does not already include
~/.claude/pstack-models.md
, append the
@~/.claude/pstack-models.md
line so it loads on every session. If the user prefers project scope, add the include to the project's
CLAUDE.md
instead.
如果
~/.claude/CLAUDE.md
尚未引入
~/.claude/pstack-models.md
,请追加
@~/.claude/pstack-models.md
一行,使其在每个会话中自动加载。如果用户偏好项目级作用域,请改为将引入语句添加到项目的
CLAUDE.md
中。

7. Confirm

7. 确认告知

Tell the user where the override was written and how it loads (via the
@
include in CLAUDE.md). Re-running this skill updates the override sheet.
告知用户覆盖文件的写入位置以及加载方式(通过CLAUDE.md中的
@
引入)。重新执行该技能会更新覆盖表。

Models

模型

Stamped from
plugins/pstack/models.json
(edit there, rerun
tools/generate.mjs
).
  • Available Claude models: Opus 5 (
    claude-opus-5
    ), Opus 4.8 (
    claude-opus-4-8
    ), Opus 4.6 (
    claude-opus-4-6
    ), Fable 5 (
    claude-fable-5
    ), Sonnet 5 (
    claude-sonnet-5
    ), Sonnet 4.6 (
    claude-sonnet-4-6
    ), Haiku 4.5 (
    claude-haiku-4-5
    )
  • Default panel:
    claude-opus-5
    ,
    claude-fable-5
    ,
    claude-sonnet-5
  • Single-role default:
    claude-opus-5
源自
plugins/pstack/models.json
(如需修改请编辑该文件,重新运行
tools/generate.mjs
)。
  • 可用Claude模型:Opus 5 (
    claude-opus-5
    )、Opus 4.8 (
    claude-opus-4-8
    )、Opus 4.6 (
    claude-opus-4-6
    )、Fable 5 (
    claude-fable-5
    )、Sonnet 5 (
    claude-sonnet-5
    )、Sonnet 4.6 (
    claude-sonnet-4-6
    )、Haiku 4.5 (
    claude-haiku-4-5
    )
  • 默认面板:
    claude-opus-5
    ,
    claude-fable-5
    ,
    claude-sonnet-5
  • 单角色默认模型:
    claude-opus-5