ilink-design

ilink-design is a command for Claude Code from zhoubengao/iLink. It costs 0 tokens per session (1,257 once invoked), scanned A, original, Apache-2.0.

A design-writing command for iLink, a workflow that moves a development task through requirements, planning, design, coding, and review. It creates the technical design after the planning document is approved.

In plain words
What is it for?
Use it to define interfaces, logic flows, error handling, data entities, tests, key design decisions, and exact files to change.
Why use it?
It turns business requirements into concrete system behavior while checking the existing code and related domain knowledge. This reduces the chance that coding instructions conflict with the current architecture.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to define interfaces, logic flows, error handling, data entities, tests, key design decisions, and exact files to change.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/zhoubengao/ilink/ilink-design
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/zhoubengao/iLink

Made for: Claude Code.

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 ilink-design

README.md
[![agentmods](https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-design/github.svg)](https://agentmods.dev/commands/zhoubengao/ilink/ilink-design)
Your own site
<a href="https://agentmods.dev/commands/zhoubengao/ilink/ilink-design"><img src="https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-design/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 ilink-design

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhoubengao/ilink/ilink-design"><img src="https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,257 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.00000 $0.01257
Opus 5 $0.00000 $0.00629
Sonnet 5 $0.00000 $0.00251
Haiku 4.5 $0.00000 $0.00126

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

Security

Grade A, and why

ilink-design 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 9d 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.

src/.claude/commands/ilink-design.md · 92 lines

How it starts

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

你现在扮演 iLink 中的 Designer(设计师) 角色。

准备工作

依次读取以下文件,作为你的角色知识和行为规范:

  1. project-context.md(项目知识库)
  2. iLink/souls/universal.soul.md(全局行为规范)
  3. iLink/souls/design.soul.md(Designer 角色规范)

前置检查

读取上游文档:iLink-doc/$ARGUMENTS/$ARGUMENTS-pm.master.md

如果该文件不存在,提示用户先执行 /ilink-pm $ARGUMENTS

检查 pm.master.md 末尾的 Metadata:

  • 如果 Status 为 STAGING,提示用户 PM 文档尚未通过审核,需要先审核并手动将 Status 改为 PENDING_DESIGNER
  • 如果 Status 为 PENDING_DESIGNER,继续执行

关联领域知识检查

读取上游需求定义 iLink-doc/$ARGUMENTS/$ARGUMENTS-requirement.md,检查是否包含"关联领域知识"字段且指定了文件路径。如果有,读取该 Domain Knowledge 文件(重点参考 §2 业务实体、§4 接口与集成、§7 设计决策),帮助做出与现有架构一致的技术设计。

执行任务

按照 Designer Soul 的要求执行以下工作:

  1. 解析 PM 的 B 层业务合同,提取范围契约、硬约束、需求追踪表、验收标准、风险
  2. 转化为系统逻辑行为模型:接口定义 → 逻辑流 → 异常分支 → 错误码 → 数据实体
  3. 在项目中精确定位变更模块,结合 project-context.md 的模块依赖层次和代码结构
  4. 主动探索相关源码:使用 Grep/Glob/Read 工具查看 [TASK_ALLOCATION] 涉及的现有代码,确保设计与现有代码兼容
  5. 输出 design.master.md,严格按照 Designer Soul 定义的结构:
    • 系统逻辑分析(接口清单、交互时序、逻辑流、异常分支、数据实体)
    • 技术设计(模块与类设计、方法签名、类间协作)
    • 数据与接口设计(数据库变更、API 注册、缓存设计、配置变更)
    • 测试设计
    • [DESIGN_DECISIONS](关键决策 + 硬约束落地 + 高风险假设,不得省略)
    • [TASK_ALLOCATION](修改文件 + 新增文件 + 配置文件 + SQL 脚本,路径精确到文件名)
  6. 严格遵守 B1 范围契约:Out of Scope 的内容不得出现在设计中
  7. 传递所有 H/M 级风险到 [DESIGN_DECISIONS] 风险应对表

将输出写入:iLink-doc/$ARGUMENTS/$ARGUMENTS-design.master.md

design 快照(v1.6.0 起 MUST 执行)

写入 design.master.md 之后,立即执行以下命令为 Coach 子流程留底:

mkdir -p iLink-doc/$ARGUMENTS/.snapshots
cp iLink-doc/$ARGUMENTS/$ARGUMENTS-design.master.md \
   iLink-doc/$ARGUMENTS/.snapshots/design.master.$(TZ=Asia/Shanghai date +%Y%m%d-%H%M%S).md

快照供 /ilink-approve 触发的 Coach 子流程检测人类对 design.master.md 的直接编辑。.snapshots/ 目录 MUST 加入 .gitignore,SHALL NOT 提交到 git(详见 Root Spec §4.6.9)。

重要提醒

[TASK_ALLOCATION] 是 Coder 的唯一工作授权。务必:

  • 列出 Coder 需要修改或创建的每一个文件(包括测试类、配置文件、SQL 脚本)
  • 使用项目相对路径(参照 project-context.md 中的目录结构)
  • 路径精确到文件名,不使用通配符

Metadata 印章

输出 design.master.md 时,请在文档末尾添加 Metadata 区块:

---
# ILINK-PROTOCOL-METADATA
Protocol_Version: v1.8.0
Role: DESIGNER
AI_Vendor: Claude
AI_Model: <你的实际模型 ID,如 claude-sonnet-4-6>
Current_Timestamp: <执行 TZ=Asia/Shanghai date +%Y-%m-%dT%H:%M:%S+08:00 获取实际时间>
Upstream_SHA1: <执行 shasum iLink-doc/$ARGUMENTS/$ARGUMENTS-pm.master.md 取第一列>
Target_Files:
Status: STAGING
---

Read the full file on GitHub · 92 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. 9d ago First seen · 92 lines · 0 tokens per session scan A b300ffa5eed4

Subscribe to this mod's changes

ilink-design is a command published in the GitHub repository zhoubengao/iLink (22 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,257 tokens. 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-30.