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.
npx agentmods add commands/ysicing/code-pilot/re-initgit clone --depth 1 https://github.com/ysicing/code-pilotWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00022 | $0.00728 |
| Opus 5 | $0.00011 | $0.00364 |
| Sonnet 5 | $0.00004 | $0.00146 |
| Haiku 4.5 | $0.00002 | $0.00073 |
Grade A, and why
re-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 2d 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.
What it actually says
用法
/re-init <项目摘要或名称>
目标
以"根级简明 + 模块级详尽"的混合策略初始化项目 AI 上下文:
- 在仓库根生成/更新
CLAUDE.md(高层愿景、架构总览、模块索引、全局规范)。 - 在识别的各模块目录生成/更新本地
CLAUDE.md(接口、依赖、入口、测试、关键文件等)。 - ✨ 为了提升可读性,会在根
CLAUDE.md中自动生成 Mermaid 结构图,并为每个模块CLAUDE.md添加导航面包屑。
编排说明
步骤 1:调用 get-current-datetime 子智能体获取当前时间戳。
步骤 2:调用一次 init-architect 子智能体,输入:
project_summary: $ARGUMENTScurrent_timestamp: (来自步骤1的时间戳)
执行策略(由 Agent 自适应决定,不需要用户传参)
- 阶段 A:全仓清点(轻量) 快速统计文件与目录,识别模块根(package.json、pyproject.toml、go.mod、apps/、packages/、services/* 等)。
- 阶段 B:模块优先扫描(中等) 对每个模块做"入口/接口/依赖/测试/数据模型/质量工具"的定点读取与样本抽取。
- 阶段 C:深度补捞(按需) 若仓库较小或模块规模较小,则扩大读取面;若较大,则对高风险/高价值路径分批追加扫描。
- 覆盖率度量与可续跑
输出"已扫描文件数 / 估算总文件数、已覆盖模块占比、被忽略/跳过原因",并列出"建议下一步深挖的子路径"。重复运行
/init-project时按上次索引做增量更新与断点续扫。
安全与边界
- 只读/写文档与索引,不改源代码。
- 默认忽略常见生成物与二进制大文件。
- 结果在主对话打印"摘要",全文写入仓库。
输出要求
- 在主对话中打印"初始化结果摘要",包含:
- 根级
CLAUDE.md是否创建/更新、主要栏目概览。 - 识别的模块数量及其路径列表。
- 每个模块
CLAUDE.md的生成/更新情况。 - ✨ 明确提及"已生成 Mermaid 结构图"和"已为 N 个模块添加导航面包屑"。
- 覆盖率与主要缺口。
- 若未读全:说明"为何到此为止",并列出推荐的下一步(例如"建议优先补扫:packages/auth/src/controllers")。
- 根级
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.
- 2d ago First seen · 54 lines · 22 tokens per session scan A b5a2c76e72ae
re-init is a command published in the GitHub repository ysicing/code-pilot (38 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 22 tokens to every session and 728 once invoked, about $0.0001 per session on Opus 5. 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.
Other commands, from other repositories
specify
Create or update the feature specification from a natural language feature description.
speckit.git.validate
Validate current branch follows feature branch naming conventions.
pr-address
Address PR review comments on current branch.
enforce_standards
CRITICAL: Before running the code standards enforcer, we must prepare the stack properly and abort if there are merge conflicts.
OPSX: Verify
Verify implementation matches change artifacts before archiving.
OPSX: Continue
Continue working on a change - create the next artifact (Experimental).