ilink-refine

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

A guided revision command for an iLink document awaiting decisions. STAGING means the document is waiting for review or unresolved choices before the next workflow stage.

In plain words
What is it for?
Use it to find a Story's STAGING planning, design, or review document, review its blockers, and apply the decisions needed to continue.
Why use it?
It identifies the document's blocking questions and supports targeted edits instead of recreating the whole document. This helps move a Story forward when planning, design, or review has stopped for confirmation.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to find a Story's STAGING planning, design, or review document, review its blockers, and apply the decisions needed to continue.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhoubengao/ilink/ilink-refine"><img src="https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-refine.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,044 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.01044
Opus 5 $0.00000 $0.00522
Sonnet 5 $0.00000 $0.00209
Haiku 4.5 $0.00000 $0.00104

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

Security

Grade A, and why

ilink-refine 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-refine.md · 103 lines

How it starts

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

你现在执行 iLink 的 STAGING 修订对话(ilink-refine) 操作。

准备工作

依次读取以下文件:

  1. project-context.md
  2. iLink/souls/universal.soul.md
  3. iLink/iLink-root-spec.md §6.3(ilink-refine 修订协议)

步骤 1:确认 Story 存在

检查 iLink-doc/$ARGUMENTS/ 目录是否存在,不存在则提示用户先执行 /ilink-init $ARGUMENTS

步骤 2:识别 STAGING 文档

按优先级依次检查以下文档的 Metadata Status:

  1. iLink-doc/$ARGUMENTS/$ARGUMENTS-review.master.md
  2. iLink-doc/$ARGUMENTS/$ARGUMENTS-design.master.md
  3. iLink-doc/$ARGUMENTS/$ARGUMENTS-pm.master.md

找到第一个 Status 为 STAGING 的文档,即为本次修订目标。

如果没有找到 STAGING 文档,告知用户当前 Story 无需修订,建议执行 /ilink-status $ARGUMENTS 查看状态。

步骤 3:加载上下文,进入修订模式

根据 STAGING 文档的角色,读取对应 Soul 文件:

  • pm.master.md → iLink/souls/pm.soul.md
  • design.master.md → iLink/souls/design.soul.md
  • review.master.md → iLink/souls/qa.soul.md

读取完整的 STAGING 文档内容。

进入修订模式:你的职责是"定点修改",不是"重新生成"。

步骤 4:汇总阻塞项

根据文档类型,找到所有阻塞项:

文档 阻塞项位置
pm.master.md B5 中的 [待确认] 项 + C1 的 NOTIFY_ITEMS
design.master.md [DESIGN_DECISIONS] 中高风险项的 [待确认] 标记
review.master.md [UPSTREAM_BLOCKERS] 中的所有条目

以列表形式逐条呈现给用户,格式示例:

检测到 STAGING 文档:$ARGUMENTS-pm.master.md
共 N 个阻塞项需要决策:

1. [B5-风险-1] 第三方支付回调超时处理方式未确认
   当前标记:[待确认]
   风险等级:H

2. [B5-风险-3] 并发场景下的幂等方案
   当前标记:[待确认]
   风险等级:M

请针对第 1 项给出决策:

步骤 5:逐条决策

每次只呈现一项,等待用户给出决策后:

  1. [待确认] 更新为 [已确认 <YYYY-MM-DD>: <用户给出的决策依据>]
  2. 根据决策内容调整风险等级(H → M 或 M → L)
  3. 使用 Edit 工具就地更新文档对应位置
  4. 明确告知用户:"已更新第 X 项"
  5. 继续呈现下一项

修订模式约束(MUST 严格遵守)

  • MUST 保留文档所有已有内容,仅更新被讨论的阻塞项
  • SHALL NOT 重新生成整个文档
  • SHALL NOT 修改未被讨论的条目
  • MUST 在每次修改后明确告知用户已更新的条目编号

步骤 6:清理 NOTIFY_ITEMS(仅限 pm.master.md)

每确认一项后,从 C1 的 NOTIFY_ITEMS 列表中移除对应条目。 所有 NOTIFY_ITEMS 条目均被确认后,写入 NOTIFY_ITEMS: NONE

步骤 7:清理阻塞项(不修改 Status)

所有阻塞项处理完毕后:

  • 若所有 [待确认] 项已消解 → 移除文档中残留 [待确认] 标记,更新 B5/C1 中的风险标记
  • 若仍有未解决的 H 级项 → 维持文档 STAGING 状态不变

注意ilink-refine 只修订文档内容,不修改 Status。状态推进由 ilink-approve 统一负责。

使用 Edit 工具就地更新文档中被讨论的条目。

步骤 8:提示下一步

修订完成。所有阻塞项已消解。

下一步:执行 `/ilink-approve $ARGUMENTS` 正式推进流水线。

Read the full file on GitHub · 103 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 · 103 lines · 0 tokens per session scan A 9af1d0593d64

Subscribe to this mod's changes

ilink-refine 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,044 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.