Setup pstack for Codex
Install optional custom-agent profiles without making them part of 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
projectoruserscope 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
namefields 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 each role should inherit the parent or request an explicit model plus reasoning_effort pair. If the user wants a reasoning budget, offer unlimited (max), large (xhigh), medium (high), and small (medium). A budget is a requested effort, not an entitlement. Validate it separately for every chosen model. Do not write an unsupported pair or silently replace the user's choice. Existing receipted model and effort choices remain the starting point.
If a supported Codex model-list surface is observable, convert it to JSON records shaped like:
[{"slug":"gpt-5.6-sol","reasoning_efforts":["low","medium","high","xhigh","max","ultra"]}]
Validate both values before writing them. If no supported model list is observable, do not guess or accept pasted entitlement claims as proof: omit both TOML fields, inherit the parent, and record unverified-inheritance with the requested pair in the receipt. A missing model or unsupported effort is a hard stop; let the user choose another pair or inheritance.
Profiles are a JSON object keyed by namespaced agent name:
{
"pstack-poteto-agent": {"model":"gpt-5.6-sol","reasoning_effort":"high"},
"pstack-comment-sicko": {"model":"gpt-5.6-terra","reasoning_effort":"medium"}
}
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 requested pairs and --models <json-file> only when the list came from an observable supported surface. Do not create temporary files containing secrets; these files contain model identifiers only.
On success, report the scope, written paths, receipt path, and each role's configuration status. Say that new profiles apply to newly spawned agents. When a panel inherits or loses distinct profiles, report reduced model 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.
Offer verification skills (optional)
After setup finishes, check whether the project already has a way to drive the real app for proof, such as a verify-* project 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."
Then check whether the project already has a formal verification skill, a project skill that runs a model checker, a proof, or another verifier against the code. If not, offer once: "want a formal verification skill, so agents can prove a key property of your code holds in every case in scope, not only the cases tests reach? I can generate one with $create-formal-verification-skill."
Run a generator only on an explicit yes. On no, move on without pushing. Profile setup does not authorize either generator.