Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Claudate/project-multilevel-index/plugin install project-multilevel-indexWrote 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.
[](https://agentmods.dev/commands/claudate/project-multilevel-index/init-index)<a href="https://agentmods.dev/commands/claudate/project-multilevel-index/init-index"><img src="https://agentmods.dev/badge/commands/claudate/project-multilevel-index/init-index.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02833 |
| Opus 5 | $0.00000 | $0.01417 |
| Sonnet 5 | $0.00000 | $0.00567 |
| Haiku 4.5 | $0.00000 | $0.00283 |
Grade A, and why
init-index 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.
How it starts
The opening of the file, as written. The whole thing — 400 lines — stays where its author put it; the contents beside it link to each section on GitHub.
命令: /init-index - 初始化索引系统
🎯 使用场景
用户首次在项目中运行,或想要重建整个索引系统。
📋 执行步骤
步骤 0: 加载语言配置
必须首先执行,详见 ../core/i18n.md
- 读取
.claude/locale-config.json - 加载语言文件到
LANG对象 - 如果失败,使用默认语言
zh-CN
步骤 1: 确认项目根目录
询问用户:
{{LANG.messages.commands.initIndex.confirmDirectory}}
将 {directory} 替换为当前工作目录(使用 pwd 或等效命令获取)。
示例输出:
- zh-CN: "当前目录是 /home/user/my-project, 确认这是项目根目录吗?"
- en-US: "Current directory is /home/user/my-project, confirm this is the project root?"
如果用户确认,继续;否则要求用户 cd 到正确目录后重试。
步骤 2: 扫描项目结构
输出: {{LANG.messages.commands.initIndex.scanning}}
使用 Glob 工具扫描所有代码文件:
排除目录 (从 LANG.skill.excludePatterns.directories):
node_modules, .git, dist, build, .next, target, vendor, __pycache__, .cache
支持的文件类型 (从 LANG.skill.excludePatterns.fileTypes):
.js, .jsx, .ts, .tsx, .py, .java, .kt, .rs, .go, .cpp, .c, .h, .php, .rb, .swift, .cs
Glob 模式示例:
**/*.{js,jsx,ts,tsx,py,java,kt,rs,go,cpp,c,h,php,rb,swift,cs}
报告扫描结果:
输出: {{LANG.messages.commands.initIndex.found}}
按语言分组统计:
{{LANG.messages.commands.initIndex.fileCount}} # 替换 {language} 和 {count}
输出总计:
{{LANG.messages.commands.initIndex.totalFiles}} # 替换 {count} 和 {folders}
示例输出(zh-CN):
发现:
- JavaScript/TypeScript: 45 文件
- Python: 12 文件
- 总计 57 个代码文件,分布在 8 个文件夹
示例输出(en-US):
Found:
- JavaScript/TypeScript: 45 files
- Python: 12 files
- Total 57 code files across 8 folders
步骤 3: 生成文件头注释
输出: {{LANG.messages.commands.initIndex.generating}}
对每个代码文件执行以下操作:
3.1 读取文件内容
使用 Read 工具读取文件。
3.2 分析依赖 (Input)
根据文件扩展名识别依赖语句:
| 语言 | 依赖关键字 | 示例 |
|---|---|---|
| JavaScript/TypeScript | import, require |
import { foo } from './bar' |
| Python | import, from |
from models import User |
| Java/Kotlin | import |
import java.util.List; |
| Rust | use |
use std::collections::HashMap; |
| Go | import |
import "fmt" |
| C/C++ | #include |
#include <vector> |
| C# | using |
using System.Collections.Generic; |
| PHP | use, require |
use Illuminate\Support\Facades\DB; |
| Ruby | require |
require 'active_record' |
| Swift | import |
import Foundation |
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.
- 6d ago First seen · 400 lines · 0 tokens per session scan A 3ab43ef0edd5
init-index is a command published in the GitHub repository Claudate/project-multilevel-index (139 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,833 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.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.