AGENT SKILL

setup-pstack

Install, update, remove, or inspect pstack's Codex agent profiles and per-role model registry. Use for setup-pstack or requests to configure pstack agents and models.

License 许可
MIT
最近更新
2026-09-28
Stars
★ 1
Forks
0

01 前言 Front Matter

name
setup-pstack
description
Install, update, remove, or inspect pstack's Codex agent profiles and per-role model registry. Use for setup-pstack or requests to configure pstack agents and models.

02 资源文件 6

03 SKILL.md 正文

Setup pstack for Codex

Install two persona-specific custom agents and a complete per-role model registry without adding them to the plugin manifest. Codex loads project profiles from .codex/agents/*.toml and user profiles from ~/.codex/agents/*.toml. This skill's agents/openai.yaml is UI metadata only.

Read references/model-profile.md before changing configuration. The portable prompts in the owning skills remain authoritative and work without installed profiles.

Safety contract

  • Require explicit user intent for install, upgrade, or uninstall.
  • Ask for project or user scope when it is not clear. Project scope is the safer default only when the user says to configure the current repository.
  • Scan both project and user agent directories before a write. Stop on duplicate TOML name fields regardless of filename or layer.
  • Never overwrite another owner. Update or remove only files whose current SHA-256 matches this setup's receipt.
  • A modified, missing, or relocated receipted file requires review; leave profiles and receipt untouched.
  • Configuration is not runtime proof. Never claim the served model, effort, effective permissions, connector set, or skill availability unless a supported live surface reports it.

Model policy

Ask whether to keep the current mapping or change specific roles. Read the complete role list and runtime resolution rules in references/model-profile.md. A single role accepts one lane. A panel role accepts one or more lanes, and its list length controls fanout.

Each lane is skill-default, inherit-parent, auto, or an explicit requested configuration. An explicit lane contains model and reasoning_effort. It may contain service_tier; omission leaves the inherited tier unconstrained. Fast mode requests "priority". Treat these values as one configuration. skill-default returns to the bundled choice in references/model-defaults.json. The inheritance aliases omit explicit spawn overrides.

Reasoning budget

Ask for one reasoning budget before you show the roles. Prefer a multiple-choice question. Offer these labels, and name the recorded budget when the registry already has one.

  • unlimited — keep the effort each lane already carries
  • large — xhigh reasoning
  • medium — high reasoning
  • small — medium reasoning

A budget sets one target reasoning effort for every lane that names a model, panel entries included. Inheritance aliases never change. When the detected model does not support the target, setup uses that model's highest detected effort at or below it. When no detected effort qualifies, setup keeps the current effort and reports the role as needing a choice. Ask the user to pick another model or effort for those roles.

Setup records the chosen budget in the registry and the receipt. A later run without a budget keeps the recorded one. unlimited restores the bundled effort of every skill-default lane. It does not rewrite a lane the user set explicitly; use skill-default for that role to return it to the bundled choice.

If a supported Codex model-list surface is observable, convert it to JSON records shaped like:

[{"slug":"gpt-5.6-luna","reasoning_efforts":["low","medium","high","xhigh","max"],"service_tiers":["priority"]}]

Validate model, effort, and any requested tier through supported live discovery. Follow the setup-evidence and runtime-capability rules in references/model-profile.md. The helper accepts spawn_service_tier_override and profile_service_tier_override booleans for those specific mechanisms. Do not claim either mechanism from inheritance evidence. If the helper cannot validate the request, report its unverified-inheritance result and retained request. That result does not establish runtime unavailability or authorize weaker settings for a task. An abbreviated model list is not a complete entitlement check.

Persona profiles are a JSON object keyed by namespaced agent name:

{
  "pstack-poteto-agent": {"model":"gpt-6-astra","reasoning_effort":"high"},
  "pstack-comment-sicko": {"model":"gpt-5.6-terra","reasoning_effort":"medium"}
}

Role choices are a second JSON object keyed by the exact role labels from references/model-profile.md. It can contain only the roles being changed. Single roles accept one value. Panel roles accept an array:

{
  "feature, refactoring": {"model":"anthropic/claude-opus-5","reasoning_effort":"high"},
  "how critics": [
    {"model":"anthropic/claude-fable-5-1","reasoning_effort":"high"},
    {"model":"gpt-5.6-luna","reasoning_effort":"max","service_tier":"priority"},
    "inherit-parent"
  ]
}

Execute

The helper is scripts/manage-agents.mjs relative to this skill.

node scripts/manage-agents.mjs scan --project-root <repo> --user-home <home>
node scripts/manage-agents.mjs install --scope project --project-root <repo> --user-home <home>
node scripts/manage-agents.mjs install --scope user --project-root <repo> --user-home <home>
node scripts/manage-agents.mjs uninstall --scope project --project-root <repo> --user-home <home>

Add --profile <json-file> for persona pairs, --roles <json-file> for role changes, and --models <json-file> only when the list came from an observable supported surface. Add --capabilities <json-file> when a fast request is present. Add --budget <unlimited|large|medium|small> for the chosen reasoning budget. Omitted roles keep their current mapping. On a fresh setup, omitted roles use references/model-defaults.json. Do not create temporary files containing secrets; these files contain model identifiers only.

Setup writes .codex/pstack-models.json at project scope or ~/.codex/pstack-models.json at user scope. The project registry overrides the user registry. On success, report the scope, profile paths, registry path, receipt path, the recorded budget, and each role's setup status. Report every clamped or unmet role from budgetPolicies. Say that the new mapping applies to newly spawned agents. When a panel inherits or repeats one model, report reduced diversity instead of claiming which model served it.

On review-required or any collision, stop. Show the exact paths and do not suggest force deletion.

04 同仓库更多 Skills