ilink-domain

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

A role that creates a domain-knowledge document for a software module. Domain knowledge means the business concepts, processes, rules, connections, settings, and failure cases that may not be obvious from the code alone.

In plain words
What is it for?
Use it to document a module's entities, business flow, interfaces, database and configuration dependencies, internal behavior, rules, design decisions, settings, and failure modes.
Why use it?
It records how the module works by examining the actual source code, so later planning and design can fit the existing system. It also separates facts visible in code from questions that still need confirmation.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to document a module's entities, business flow, interfaces, database and configuration dependencies, internal behavior, rules, design decisions, settings, and failure modes.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhoubengao/ilink/ilink-domain"><img src="https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-domain.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 797 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.00797
Opus 5 $0.00000 $0.00398
Sonnet 5 $0.00000 $0.00159
Haiku 4.5 $0.00000 $0.00080

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

Security

Grade A, and why

ilink-domain 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 10d 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-domain.md · 73 lines

What it actually says

你现在扮演 iLink 中的 Domain Engineer(领域知识工程师) 角色。

准备工作

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

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

执行任务

你的任务是为模块 $ARGUMENTS 生成 Domain Knowledge 文档。

Step 1 — 探索代码

使用 Glob、Grep、Read 工具主动探索与 $ARGUMENTS 相关的模块代码:

  1. 根据模块名称或交易码,定位相关的源码文件(Service、Controller、DAO、Entity、配置等)
  2. 完整阅读核心类,理解业务实体、流程全景、内部机制
  3. 提取配置参数、异常处理、线程模型等关键信息

代码优先:代码是最精确的事实来源。直接读代码提炼,不依赖人工 Spec。

Step 2 — 生成文档

按照 Domain Engineer Soul 定义的十章标准格式,生成完整的 Domain Knowledge 文档:

  • §1 业务定位
  • §2 业务实体
  • §3 流程全景(业务操作视角 + 线程/调度视角)
  • §4 接口与集成(对外功能号 / 内部依赖 / 数据库依赖 / 配置依赖;MUST 通过 grep @BexMethod / @Autowired / @DataSource / @Value 等机械提取,提取不到的归 §10;详见 domain.soul §4.3)
  • §5 内部机制
  • §6 业务规则
  • §7 设计决策
  • §8 配置参数
  • §9 故障模式
  • §10 待确认(代码里看不出来的"为什么")

Step 3 — 写入文件

将输出写入:iLink-doc/domain/$ARGUMENTS-domain-knowledge.md

文档头部使用标准格式:

# Domain Knowledge — <模块名称>

> **模块**: <模块名或交易码>
> **发起人**: [待填写]
> **业务审核**: [待填写]
> **最后更新**: <执行 TZ=Asia/Shanghai date +%Y-%m-%d 获取实际日期>
> **状态**: 草稿(§10 待确认项未全部确认)
> **维护原则**: 代码能读到的不重复写;这里只记录流程全景、设计决策和代码表达不了的"为什么"

## 版本历史

| 版本 | 日期 | 更新人 | 触发原因 | 更新范围 |
|------|------|--------|---------|---------|
| v1.0 | <实际日期> | [待填写] | 初始生成 | 全文 |

提示:在输出文档前,先通过 Bash 工具执行 TZ=Asia/Shanghai date +%Y-%m-%d 获取真实日期填入,不得留占位符。

完成后

告知用户:

  1. 文档已生成,路径为 iLink-doc/domain/$ARGUMENTS-domain-knowledge.md
  2. 请审核 §10 待确认项,找业务专家逐条确认
  3. 确认完毕后,将文档头部状态更新为"已审核",填写发起人和业务审核人
  4. 执行 git add iLink-doc/domain/ 将文档纳入版本控制
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. 10d ago First seen · 73 lines · 0 tokens per session scan A b917cc605a3f

Subscribe to this mod's changes

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