preview

preview is a command for coding agents from dhslegen/digital-delivery-team. It costs 26 tokens per session (684 once invoked), scanned B, original, MIT.

A command that summarizes the output of one or all nine project phases and shows how files differ from the last Git commit. A phase is one stage of the delivery process, such as planning, design, testing, or release preparation.

In plain words
What is it for?
Use it to review project requirements, tasks, design details, implementation counts, test results, review findings, fixes, packaging, or the overall delivery report.
Why use it?
It lets you check the important results before a decision without opening many files. This makes it easier to spot changes, risks, failed tests, and incomplete work quickly.

Command

Part of the digital-delivery-team plugin — 13 skills, 21 commands, 9 agents, 8 hooks shipped together

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.

agentmods
npx agentmods add commands/dhslegen/digital-delivery-team/preview
Clone the repo
git clone --depth 1 https://github.com/dhslegen/digital-delivery-team

Or install digital-delivery-team, the plugin that ships this one along with the rest of its 13 skills, 21 commands, 9 agents, 8 hooks.

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 preview

README.md
[![agentmods](https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/preview.svg)](https://agentmods.dev/commands/dhslegen/digital-delivery-team/preview)
Your own site
<a href="https://agentmods.dev/commands/dhslegen/digital-delivery-team/preview"><img src="https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/preview.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00026 $0.00684
Opus 5 $0.00013 $0.00342
Sonnet 5 $0.00005 $0.00137
Haiku 4.5 $0.00003 $0.00068

Measured 5d ago against content hash 1f9ceb2f66ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

preview scanned grade B with 1 finding 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 5d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT=$(cat "${HOME}/.claude/delivery-metrics/.ddt-plugin-root" 2>/dev/null)
commands/preview.md · 56 lines

What it actually says

/preview

输出指定 phase 产物的关键指标摘要 + vs 上次 commit 的 diff stat,让你不用打开多个文件就能决策。

通常在决策门触发前主动跑一次:

/preview prd      → 看 PRD 摘要 → 决定是否接受
/preview design   → 看架构 / 契约 / 数据模型 → 决定
/preview all      → 9 个 phase 全部摘要一次性输出

执行

[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT=$(cat "${HOME}/.claude/delivery-metrics/.ddt-plugin-root" 2>/dev/null)
[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT="${HOME}/.claude/plugins/marketplaces/digital-delivery-team"
[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || { echo "❌ DDT plugin root 未解析"; exit 1; }
export DDT_PLUGIN_ROOT
node "$DDT_PLUGIN_ROOT/bin/preview.mjs" $ARGUMENTS

各 phase 摘要内容

Phase 输出指标
prd 用户故事数 / Given/When/Then 验收数 / P0/P1 优先级分布 / 文件大小 / vs HEAD diff
wbs 任务数 / 关键路径 / 总工时 / 风险条目
design ADR 数 / API endpoint 数 / 数据模型实体 / 契约 lint hint
impl 后端 ts/js 文件数 + 测试数 / 前端组件 + 测试数
test 覆盖率 / 通过率 / 失败用例
review 阻塞级 / 警告级 / 建议级条目数 / Fix Log 段落存在性
fix fixed / deferred / blocked 条目数
package README 行数 / 部署步骤数 / Demo 时长
report 总提效 / 阶段对比数 / 质量劣化警告
all 全部 9 个 phase 一次输出

与决策门的关系

/preview <phase>决策门前的辅助工具,不强制:

  • 用户在 AskUserQuestion 决策门弹出后觉得 preview 字段信息不够 → 跑 /preview <phase> → 看完再决定
  • decision-gate skill 推荐 LLM 在 AskUserQuestion 的 preview 字段里填 1-2 段摘要,不需要用户额外跑 /preview

可重入

只读命令,可任意多次调用。

$ARGUMENTS

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. 5d ago First seen · 56 lines · 26 tokens per session scan B 1f9ceb2f66ea

Subscribe to this mod's changes

preview is a command published in the GitHub repository dhslegen/digital-delivery-team (1 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 684 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.