ilink-init

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

A command that starts an iLink story, where a story is a tracked piece of product work. It checks the required inputs and creates a folder with a requirements template for that story.

In plain words
What is it for?
Use it to create the initial requirements file for an iLink story and record its scope and acceptance criteria.
Why use it?
It gives a new piece of work a standard place and document structure before design or coding begins. It also prevents initialization when the story identifier or usage value is missing.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

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/zhoubengao/ilink/ilink-init
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-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-init.svg)](https://agentmods.dev/commands/zhoubengao/ilink/ilink-init)
Your own site
<a href="https://agentmods.dev/commands/zhoubengao/ilink/ilink-init"><img src="https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-init.svg" alt="Measured on agentmods" 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,053 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.01053
Opus 5 $0.00000 $0.00526
Sonnet 5 $0.00000 $0.00211
Haiku 4.5 $0.00000 $0.00105

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

Security

Grade A, and why

ilink-init 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 6d 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-init.md · 108 lines

How it starts

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

你现在执行 iLink 的 Story 初始化 操作。

参数解析

$ARGUMENTS 包含两个由空格分隔的参数:<story-id> <usage-value>

  • <story-id>:本次要初始化的 Story ID
  • <usage-value>:执行本命令前,用户在 Claude Code 中执行 /usage 查看到的"当前 session 已使用百分比"数值(仅数字,不含 % 号)

必填校验

如果 $ARGUMENTS 解析后不包含两个参数(即缺少 <usage-value>),MUST 拒绝执行,向用户输出:

❌ 缺少 usage-value 参数。请先在 Claude Code 中执行 /usage 查看"session 已用百分比",然后以下列格式重试:

  /ilink-init <story-id> <已用百分比数字>

例如,/usage 显示 "5%" 已用,则执行:/ilink-init kcia-1520 5

无法查询时允许传入 0(语义为"故意跳过",文件正常写入但 delta 标注不可信)。

允许 <usage-value>0,语义为"用户故意跳过查询"。

执行任务

步骤 1:检查

检查目录 iLink-doc/<story-id>/ 是否已存在。如果已存在,告知用户该 Story 已初始化,并建议执行 /ilink-status <story-id> 查看当前状态。

步骤 2:创建 Story 目录和需求定义模板

  1. 创建目录 iLink-doc/<story-id>/
  2. 创建文件 iLink-doc/<story-id>/<story-id>-requirement.md,内容如下:
# <story-id>:<请填写需求标题>

## 功能描述

<请描述本需求要解决的问题和预期效果>

## 功能范围

### In Scope(必须实现)

1. <功能点1>
2. <功能点2>

### Out of Scope(明确排除)

1. <排除项1>

## 验收标准

| AC-ID | 验收标准 | 验证方式 |
|-------|---------|---------|
| AC-01 | <Given... When... Then...> | 单元测试/代码审查 |
| AC-02 | <Given... When... Then...> | 单元测试/代码审查 |

## 约束备注

| 编号 | 约束类型 | 约束内容 |
|------|---------|---------|
| HC-01 | 技术 | <技术约束> |
| HC-02 | 业务 | <业务约束> |

## 假设与风险

| 编号 | 类型 | 内容 | 风险等级 |
|------|------|------|---------|
| AR-01 | 假设 | <假设条件> | M |

## 关联领域知识(可选)

<!-- 如果本需求涉及已有 Domain Knowledge 的模块,在此指定文件路径,PM 和 Designer 将纳入参考 -->
<!-- 示例:iLink-doc/domain/login-410301-domain-knowledge.md -->
<!-- 无关联时删除本节或留空 -->

步骤 3:创建 Usage 追踪文件(v1.6.0)

执行 shell 命令获取当前时间戳:TZ=Asia/Shanghai date +%Y-%m-%dT%H:%M:%S+08:00

创建文件 iLink-doc/<story-id>/<story-id>-usage.md,内容如下(将占位符替换为实际值):

# <story-id> — Usage Tracking

| 节点 | 时间戳 | Usage_Value | Usage_Unit |
|------|--------|------------|-----------|
| init | <实际时间戳> | <usage-value> | claude-5h-pct |

**Latest Delta**: (待 review 后计算)

> 说明:用户在 init 和每次 qa 执行前,查询 Claude Code 的 `/usage` 显示的"session 已用百分比"并传入命令。中间阶段不追踪。回流多次 qa 时按 review-1, review-2... 递增编号,Latest Delta 始终基于最后一次 review。

Read the full file on GitHub · 108 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. 6d ago First seen · 108 lines · 0 tokens per session scan A 81efeb57ef76

Subscribe to this mod's changes

ilink-init 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,053 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.