360 Secure SkillHub
360 安全技能中心

pstack-harness

该 Skill 为 pstack 的委派与资源原语提供宿主适配说明,覆盖定位技能、启动子代理、设置模型、并行分支、只读模式、结构化提问、工作清单、循环、转录和进程检查,并支持多种 CLI 宿主。

分类:自动化
mdsmithaustin
热度 0.00
最近更新 2026-12-05 11:59:40

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add mdsmithaustin/pstack/pstack-harness
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
可选出网
Metadata
name
pstack-harness
description
Maps pstack's delegation and portable resource primitives to the current CLI (Claude Code, Codex, Hermes, Grok Build, or any other harness). Covers how to locate installed skills and fresh trunk resources, spawn a subagent, set a per-subagent model, parallelize arms, go read-only, ask a structured question (AskQuestion), track a worklist, loop, locate the transcript store, write shell commands, and inspect running processes. Read whenever a pstack skill says spawn, Task tool, subagent_type, per-subagent model, AskQuestion, or worklist, names a sibling skill you cannot find, or runs a path from a playbook. Every primitive is named differently per harness, so read this before concluding your harness has no such capability or resource.

Harness adapters

A cut-off read is no read. A return that is shortened, warns that it was cut, or that you capped with head, tail, or a line limit leaves the file or diff unread. Read the missing part before you act. This file too. On Codex, follow Read files.

Your tool inventory and CLI help are authoritative. Never invent a tool. Report the mechanism when it affects execution or evidence.

Select the action

Read each selected reference in full before its action. Select only the actions the next step needs. Read a link inside a reference only when its described operation applies.

Action Required references
worklist Worklist procedure
question Structured questions
spawn The Spawn a role recipe below, Delegation and isolation, and the current runtime adapter below. Read Role resolution and handoffs only for a handoff, a recovery, a trail reviewer, or a resolver that fails or prints a note, and Portable resource path contract only when PSTACK_SKILLS_ROOT is unset
role-handoff Role resolution and handoffs
persona Persona contract when the spawn names a persona
loop Loops and wake-ups
wait Wait for a change
transcript Workspace transcripts and the current runtime adapter below
portable-paths Portable resource path contract when a command uses PSTACK_SKILLS_ROOT, PSTACK_SOURCE_ROOT, or PROJECT_ROOT

Runtime adapters

For spawn or transcript, read only the current runtime column for that action. Other actions need a runtime adapter only where their reference links one.

Runtime Spawn adapter Transcript location
claude-code Claude Code Transcript location
codex Codex Transcript location
hermes Hermes Transcript location
grok Grok Build Transcript location
other Other runtime Transcript location

Resolve portable resources

Resolve only the roots that the next command needs. Keep the exact command forms in generated plans and restore the recorded roots across owners, delegates, wake-ups, and later ticks.

Preserve roles across handoffs

Read the role resolution and handoffs reference selected above before a role handoff or recovery.

Spawn a role

Every pstack spawn runs a role from the models config, such as feature or how explorer, sometimes under a persona. A spawn outside any playbook step resolves the default role, unless a skill names another. The config is ~/.agents/pstack-models.md plus the project's .agents/pstack-models.md. A section for the current CLI beats flat lines, and within each kind the project's file outranks the user's. Rule 1 of the models config reference in the setup-pstack skill gives the full order. The resolver is the only check for whether a config is loaded and what a role gets. Its source field names the file and section that set each value.

  1. Take the role from the skill or playbook step. A step that names none uses default. A subagent_type of poteto-agent or comment-sicko names a persona, and general-purpose names none.

  2. Resolve it once per task, and again after the harness or config changes. Run the resolver from the project root, or pass --project <root>, since it reads that directory's .agents/pstack-models.md. Do not read the config files to pick values.

    python3 "${PSTACK_SKILLS_ROOT:-<pstack-harness base directory>/..}/setup-pstack/scripts/check-models-config.py" --resolve --harness <claude-code|codex|grok|hermes> <role>
    

    Failure signal: nonzero exit. It prints one JSON line per arm with model, effort, and source, plus notes to relay in the reply. If it fails or prints a note, or the role is trail reviewer, follow Spawn a role in roles.md. Never drop a spawn because the resolver failed. Spawn with model and effort omitted and report it.

  3. Build the call from the current runtime adapter. inherit-parent in a field means omit that field.

  4. For a persona, put its complete briefing at the top of the prompt, from python3 "${PSTACK_SKILLS_ROOT:-<pstack-harness base directory>/..}/pstack-harness/scripts/subagents.py" brief <persona>, unless the live agent catalog lists the persona's native name.

  5. Report the model and effort each arm ran on, and label a review same-model when it matches the work's model.

Universal rules

  • Use named sibling skills yourself. "Call the Skill tool with architect" tells you to load the pstack skill architect and follow it. A following "follow its" or "use its" names the part of that skill the step needs, after the whole skill loads. The name is a sibling directory under the installed skills root, the directory that holds this skill's own directory. Any other pstack mention of a skill by name, such as "the leaf skill" or "the arena skill", names one the same way.
    • On Claude Code, call the Skill tool with the bare name, such as architect. The call works when the listing shows the name only, with no description, and a name-only listing never means the skill is missing.
    • Codex, Grok Build, and any other harness have no tool named Skill for these skills. There, the same phrase means read <installed skills root>/<name>/SKILL.md in full, then read the files it references when its steps need them. On Hermes, use skill_view(name) instead when the index lists the name, because compression marks only that load for reload. On Codex, a $name mention in a user prompt injects that skill's SKILL.md, so do not read that file again unless the injected copy was cut.
    • A principle-* skill checks a decision that is still open. Load it before you make the decision its step or trigger covers. Then hold your current plan against its body, and write one line in the worklist or reply: what it changed, or why the plan already meets it. If you load it after its decision, reopen that decision.
    • Never ask the user to type a skill that a pstack skill names. Never edit a skill's files or the listing settings to change how it loads.
  • Tool names in skill text describe intent, never a required tool. Task, Glob, Grep, Read, a worklist, and Cursor-era parameters like readonly name capabilities: realize each with whatever your session provides (a search tool, a shell command, a read-only brief). A missing optional tool never cancels the step and needs no announcement. A subagent_type in skill text names a persona or none, and Spawn a role turns it into the concrete type.