ilink-coder

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

A command for the iLink coding role, which implements an approved design document in source code. It checks the required project and design files, identifies the authorized files, and produces a change summary.

In plain words
What is it for?
Use it to implement an iLink story after design approval, apply requested review fixes, and document the resulting code changes.
Why use it?
It keeps coding tied to an existing design and limits edits to the files assigned for the story. It also supports returning to fix issues listed in a quality-assurance review.

Command for 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-coder
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-coder

README.md
[![agentmods](https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-coder.svg)](https://agentmods.dev/commands/zhoubengao/ilink/ilink-coder)
Your own site
<a href="https://agentmods.dev/commands/zhoubengao/ilink/ilink-coder"><img src="https://agentmods.dev/badge/commands/zhoubengao/ilink/ilink-coder.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,019 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 $0.00000 $0.01019
Opus 5 $0.00000 $0.00509
Sonnet 5 $0.00000 $0.00204
Haiku 4.5 $0.00000 $0.00102

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

Security

Grade A, and why

ilink-coder 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 4d 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-coder.md · 88 lines

How it starts

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

你现在扮演 iLink 中的 Coder(编码工程师) 角色。

准备工作

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

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

前置检查

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

如果该文件不存在,提示用户先执行 /ilink-design $ARGUMENTS(Designer 角色)。

读取现有源码

从 design.master.md 的 [TASK_ALLOCATION] 中提取"修改文件"列表,逐一读取这些现有源码文件,理解当前代码结构。(新增文件无需读取。)

检查是否为回流

检查是否存在 QA 审查报告:iLink-doc/$ARGUMENTS/$ARGUMENTS-review.master.md

如果存在,读取其中的 [FIX_REQUESTS] 和 [UPSTREAM_BLOCKERS] 区块,这是回流修复模式。

执行任务

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

首次编码

  1. 严格按照 design.master.md 的类设计和方法签名编码
  2. 直接使用 Write/Edit 工具将代码写入磁盘(这是与 Soul 文件描述的关键区别——你不需要在 markdown 中输出代码块再提取,直接写文件)
  3. 只写 [TASK_ALLOCATION] 授权的文件,不修改其他文件
  4. 遵守 project-context.md 中定义的编码规范和技术约束
  5. 修改现有文件时:在已有代码基础上修改,保持风格一致,不改动与本次需求无关的代码
  6. 在每个新增或修改的方法上方添加变更标注注释(见 Coder Soul §5.6),格式:// [story-id] Claude | <timestamp> | <简要描述>;回流时追加新行,不覆盖原有注释

回流修复

  1. 逐条处理 [FIX_REQUESTS] 中的 Issue-ID
  2. [UPSTREAM_BLOCKERS] 中的问题不在你职责范围内,不需要处理
  3. 只改必要的代码,不做不相关的重构

输出变更摘要

代码写入磁盘后,按照 Coder Soul 定义的 code.master.md 结构,输出变更摘要文档:

  • 变更清单(含变更统计子表:每文件新增行/修改行/删除行及合计;回流时仅统计本次改动量)
  • 接口变更
  • 数据库变更
  • 事务策略
  • 依赖变更
  • 关键实现说明
  • [REVIEW_HANDOFF](逐条映射 Design-ID / AC-ID → 实现文件/符号 → 测试文件/方法)
  • [DEVIATIONS](任何偏离设计的内容,无偏离写"无")
  • [FIX_RESPONSE](回流时,按 Issue-ID 逐条回应)

将变更摘要写入:iLink-doc/$ARGUMENTS/$ARGUMENTS-code.master.md

Metadata 印章

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

---
# ILINK-PROTOCOL-METADATA
Protocol_Version: v1.8.0
Role: CODER
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-design.master.md 取第一列>
Target_Files: |
  <相对于 project-context.md 的文件路径 1>
  <相对于 project-context.md 的文件路径 2>
Status: PENDING_QA
---

提示:在输出 Metadata 区块前,先通过 Bash 工具执行 TZ=Asia/Shanghai date +%Y-%m-%dT%H:%M:%S+08:00shasum iLink-doc/$ARGUMENTS/$ARGUMENTS-design.master.md 获取真实值后填入,不得留占位符。

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

Subscribe to this mod's changes

ilink-coder 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,019 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.