design

design is a command for Claude Code from dhslegen/digital-delivery-team. It costs 22 tokens per session (2,851 once invoked), scanned B, original, MIT.

A command that creates a draft system architecture, an OpenAPI document describing web-service endpoints, and a data model from prepared product requirements and work plans.

In plain words
What is it for?
Use it during the design phase to define service interfaces, data structures, and the overall architecture.
Why use it?
It turns agreed requirements into technical documents that developers can use to design and build the system.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

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/design
Clone the repo
git clone --depth 1 https://github.com/dhslegen/digital-delivery-team

Made for: Claude Code.

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 design

README.md
[![agentmods](https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/design.svg)](https://agentmods.dev/commands/dhslegen/digital-delivery-team/design)
Your own site
<a href="https://agentmods.dev/commands/dhslegen/digital-delivery-team/design"><img src="https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/design.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,851 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.1 $0.00022 $0.02851
Opus 5 $0.00011 $0.01425
Sonnet 5 $0.00004 $0.00570
Haiku 4.5 $0.00002 $0.00285

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

Security

Grade B, and why

design 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/design.md · 248 lines

How it starts

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

/design

输入:$ARGUMENTS


Phase 1 — 前置校验

test -f docs/prd.md || { echo "❌ docs/prd.md 不存在,请先运行 /prd"; exit 1; }
test -f docs/wbs.md || { echo "❌ docs/wbs.md 不存在,请先运行 /wbs"; exit 1; }
[ -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 未解析。可能原因:(1) 插件未安装;(2) shell 中 DDT_PLUGIN_ROOT 指向无效路径,请 unset DDT_PLUGIN_ROOT 后重启会话;(3) 运行 /digital-delivery-team:doctor 自检"; exit 1; }
export DDT_PLUGIN_ROOT

if printf '%s' "$ARGUMENTS" | grep -q -- '--dry-run'; then
  node "$DDT_PLUGIN_ROOT/bin/print-dry-run.mjs" --phase design --inputs "docs/prd.md,docs/wbs.md,project-brief.md" --outputs "docs/arch.md,docs/api-contract.yaml,docs/data-model.md,.ddt/tech-stack.json" --next "/design-brief (spa) | /impl (server-side|none)"
  exit 0
fi
node "$DDT_PLUGIN_ROOT/bin/emit-phase.mjs" --phase design --action start
"$DDT_PLUGIN_ROOT/bin/check-blockers.sh" || exit 2

docs/api-contract.yaml 已存在且未传 --refresh,进入增量修订模式。

Phase 2 — 解析技术栈(M3-3 优先级链 + M6.3 交互式问卷)

Step 2a:先尝试自动解析

# 提取参数中的 --preset 与 --ai-design(如果有)
PRESET_FLAG=$(printf '%s' "$ARGUMENTS" | grep -oE -- '--preset [a-zA-Z0-9_-]+' | head -1 | awk '{print $2}')
AIDESIGN_FLAG=$(printf '%s' "$ARGUMENTS" | grep -oE -- '--ai-design [a-zA-Z0-9_-]+' | head -1 | awk '{print $2}')

node "$DDT_PLUGIN_ROOT/bin/resolve-tech-stack.mjs" \
  ${PRESET_FLAG:+--preset "$PRESET_FLAG"} \
  ${AIDESIGN_FLAG:+--ai-design "$AIDESIGN_FLAG"} \
  --write

Step 2b:M6.3 交互式问卷(关键)

LLM 必须执行:检查 project-brief.md 中的 "技术栈预设" 字段:

  • 若值为 interactivecustom必须AskUserQuestion 工具发起 Spring Initializr 等价 4 步问卷
  • 若值为具体 preset(如 java-modern)但 project-brief.md 同时含 "后端框架"、"前端框架"等具体字段且与 preset 默认值冲突:用 AskUserQuestion 问 1 题确认偏好
  • 若值为 noneinteractive 且 brief 无具体字段:强制走 4 步问卷,不允许 LLM 自行选栈

Read the full file on GitHub · 248 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. 5d ago First seen · 248 lines · 22 tokens per session scan B 8bd57c2925dd

Subscribe to this mod's changes

design is a command published in the GitHub repository dhslegen/digital-delivery-team (1 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 2,851 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.