mcpField
S
setup-pstack

setup-pstack

github.com/potetoAgent 工作流13390 次安装21 周前更新
代码仓库

关于 setup-pstack

用于配置 pstack 各角色模型的技能,会创建或更新 `~/.cursor/rules/pstack-models.mdc`。它先检查可用模型标识并验证选择,再写入供后续会话使用的规则。

主要功能

  1. 01检测可用模型标识
  2. 02读取现有角色分配
  3. 03映射模型与角色并供确认
  4. 04写入前验证选择
  5. 05幂等覆盖规则文件

适用场景

  1. 01按角色配置 pstack 模型
  2. 02为新会话更新模型选择
  3. 03核对分配是否属于可用模型

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/poteto/plugins --skill setup-pstack

安装后在 Claude Code 中输入/setup-pstack确认已加载。

详细介绍

设置 pstack

编写 ~/.cursor/rules/pstack-models.mdc,创建一条始终应用的规则,为每个角色设置 pstack 的模型。技能会读取此规则;若某行缺失,则回退到技能内置的默认值,因此这是一个覆盖层,而非必需配置。

步骤

1. 检测可用模型

列出本次会话中可传递给 Task 子代理的模型 slug;这是可靠的数据来源。如果 Cursor 还提供可列出用户有权使用的模型的 API 或 CLI,请优先使用,以确保完整性。如果无法检测到任何模型,请让用户粘贴他们有权使用的 slug。绝不要写入未经确认可用的 slug。

2. 加载当前状态

默认的角色到模型映射格式如步骤 5 所示。如果 ~/.cursor/rules/pstack-models.mdc 已存在,请读取并将其中的值视为当前选择。否则,使用这些默认值。

3. 映射并确认

显示每个角色及其当前模型,并将模型不在检测结果中的角色标记为需要选择。询问用户是接受当前设置,还是更改特定角色,并提供检测到的模型作为选项。优先使用 AskQuestion,而非自由文本。对于面板角色(how critics、arena runners、architect runners、interrogate reviewers),其值为列表,每个模型会运行一个子代理,因此列表长度决定数量。

4. 验证

写入的每个 slug 都必须在检测结果中。如果选定的 slug 不可用,请停止并再次询问。指向用户无法使用的模型的规则会破坏读取该规则的所有委派。

5. 写入规则

将 ~/.cursor/rules/pstack-models.mdc 写入 alwaysApply: true,并为每个角色写入一行,使用 poteto-mode 使用的相同标签。覆盖整个文件,以确保重复运行具有幂等性。格式:

---
description: pstack per-role model choices (overrides skill defaults)
alwaysApply: true
---
# pstack model configuration. One line per role. Delete a line to fall back to the skill default.
feature, refactoring: composer-2.5-fast
bug-fix, perf-issue: gpt-5.5-high-fast
judgment and prose: claude-opus-4-8-thinking-xhigh
how explorer: composer-2.5-fast
how explainer: claude-opus-4-8-thinking-xhigh
how critics: claude-opus-4-8-thinking-xhigh, gpt-5.5-high-fast, composer-2.5-fast
why investigators: composer-2.5-fast
why synthesizer: claude-opus-4-8-thinking-xhigh
reflect tooling: composer-2.5-fast
reflect judgment, divergent, synthesizer: claude-opus-4-8-thinking-xhigh
arena runners: claude-opus-4-8-thinking-xhigh, gpt-5.5-high-fast, composer-2.5-fast
architect runners: claude-opus-4-8-thinking-xhigh, gpt-5.5-high-fast, composer-2.5-fast
interrogate reviewers: claude-opus-4-8-thinking-xhigh, gpt-5.5-high-fast, composer-2.5-fast
6. 确认

告知用户规则已写入,并且会应用于新会话。再次运行此技能即可更新规则。

评论

支持 Markdown