ps-exec

ps-exec is a command for Claude Code, Codex from qqabcv520/my-claude-marketplaces. It costs 27 tokens per session (4,634 once invoked), scanned A, original, MIT.

A command for carrying out implementation plans created by project-spec, with staged work, delegated tasks, progress tracking, review, and full verification.

In plain words
What is it for?
Use it to resume or execute a plan, delegate individual implementation steps, run project-wide checks, and finish review and Git handoff tasks.
Why use it?
It keeps dependent steps from running after failures and records task status and validation as work progresses.

Command for Claude CodeCodex

Written for Claude Code and Codex: argument-hint in frontmatter, but also runs codex exec. Also seen: mentions subagents; names the AskUserQuestion tool; mentions Codex.

Part of the project-spec plugin — 1 skill, 3 commands, 1 agent shipped together

Good fit Use it to resume or execute a plan, delegate individual implementation steps, run project-wide checks, and finish review and Git handoff tasks.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/qqabcv520/my-claude-marketplaces/ps-exec
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/qqabcv520/my-claude-marketplaces

Made for: Claude Code, Codex.

Or install project-spec, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ps-exec

README.md
[![agentmods](https://agentmods.dev/badge/commands/qqabcv520/my-claude-marketplaces/ps-exec/github.svg)](https://agentmods.dev/commands/qqabcv520/my-claude-marketplaces/ps-exec)
Your own site
<a href="https://agentmods.dev/commands/qqabcv520/my-claude-marketplaces/ps-exec"><img src="https://agentmods.dev/badge/commands/qqabcv520/my-claude-marketplaces/ps-exec/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ps-exec

Your own site · 80×15
<a href="https://agentmods.dev/commands/qqabcv520/my-claude-marketplaces/ps-exec"><img src="https://agentmods.dev/badge/commands/qqabcv520/my-claude-marketplaces/ps-exec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.04634
Opus 5 $0.00014 $0.02317
Sonnet 5 $0.00005 $0.00927
Haiku 4.5 $0.00003 $0.00463

Measured 11d ago against content hash c7f358a9d19c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ps-exec scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/project-spec/commands/ps-exec.md · 533 lines

How it starts

The opening of the file, as written. The whole thing — 533 lines — stays where its author put it; the contents beside it link to each section on GitHub.

计划执行命令

此命令用于执行 /ps-plan 创建的计划文件。目标不是“自己写代码”,而是稳定编排执行、持续写回 task.md、完成全局验证和独立 review,再做收尾

使用方法

/ps-exec [可选:计划文件路径]

示例:

/ps-exec docs/spec/20260311-1030-user-auth.md
/ps-exec

执行铁律

  1. 优先续执:先检查 docs/spec/*.task.md,有 进行中已暂停 的任务时,优先继续最近更新的那个。
  2. 主 Agent 只负责编排与收口:主 Agent 负责选计划、建 worktree、维护 task.md、做全局验证、发起独立 review、处理 merge/PR/暂停。
  3. project-spec:implement 只做局部验证:subAgent 只能验证与当前步骤改动直接相关的 lint、typecheck、测试,不做全量验证。
  4. ps-exec 必做全局验证:所有步骤完成后,主 Agent 必须运行项目级完整验证链路。
  5. 失败步骤阻断后续依赖:任一步骤失败或局部验证失败时,不得解锁依赖它的后续步骤;只能重试该步骤或暂停。
  6. task.md 必须实时写回:步骤状态、全局验证记录、独立 Review 记录都要立即写回;不要批量补写。
  7. 已完成 只能最后写:只有全局验证通过、独立 review 结束、并且收尾动作成功或用户明确选择“标记执行完成”后,才能把 task.md 写成 已完成
  8. 原地执行模式不做自动 Git 收尾:没有 worktree / branch 信息时,可以执行实现、验证、review,但不执行自动 merge 或自动创建 PR
  9. 后台任务必须全部等待完成:启动 run_in_background: true 的 subAgent 或 Bash 后,必须对每个 task_id 调用 TaskOutput(block: true) 等待返回,禁止在所有后台任务完成前结束当前 turn

标准执行主路径

1. 续执检查与计划定位

  1. 搜索 docs/spec/*.task.md
  2. 读取 frontmatter 中的 statusupdated
  3. 如果有 进行中已暂停 的任务:
    • 选择最近更新的 task.md
    • 直接进入“第 4 步:批次执行步骤”
  4. 如果没有未完成 task.md:
    • 如果用户传入了计划路径,直接使用
    • 否则搜索 docs/spec/*.md,并排除 *.task.md
    • 如果找到多个未开始的计划文件,使用 AskUserQuestion 让用户选择
    • 如果一个也没有,提示用户先运行 /ps-plan

2. 确定执行目录

目标:优先在隔离 worktree 中执行;无法使用 Git 时,允许降级到原地执行模式。

2.1 已有 worktree 的续执
  • 如果续执的 task.md frontmatter 里已有 worktree,直接复用该 worktree
  • 如果 worktree 为空,说明之前就是原地执行模式,本次继续在当前项目目录执行
2.2 新任务的 worktree 判定
  1. 运行:
git rev-parse --is-inside-work-tree
  1. 如果 Git 可用:
    • 记录当前分支:
git branch --show-current
  • git rev-parse --show-toplevel 获取项目根目录
  • 分支名:feature/<计划文件名去掉 .md>
  • worktree 路径:<项目根目录同级>/<项目目录名>-<计划文件名去掉 .md>
  • 创建 worktree:
git worktree add "<WORKTREE_PATH>" -b "<BRANCH_NAME>"
  • 如果分支已存在,重试:
git worktree add "<WORKTREE_PATH>" "<BRANCH_NAME>"
  • 创建后运行:
git worktree list

Read the full file on GitHub · 533 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 533 lines · 27 tokens per session scan A c7f358a9d19c

Subscribe to this mod's changes

ps-exec is a command published in the GitHub repository qqabcv520/my-claude-marketplaces (2 stars, last pushed 5mo ago), licensed MIT. It adds 27 tokens to every session and 4,634 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.