check-index

check-index is a command for Claude Code from Claudate/project-multilevel-index. It costs 0 tokens per session (1,401 once invoked), scanned A, original, MIT.

A consistency-check command for a codebase index. It checks file headers, folder indexes, dependency links, and the overall project index structure.

In plain words
What is it for?
Use it to audit code files and indexes, confirm that indexed files still exist, find new unindexed files, and detect dependency problems.
Why use it?
It finds missing or outdated index entries, circular dependencies, broken references, and incomplete file metadata before they cause confusion.

Command for Claude Code

Written for Claude Code: a Claude Code plugin manifest.

Part of the project-multilevel-index plugin — 1 skill, 4 commands shipped together

Good fit Use it to audit code files and indexes, confirm that indexed files still exist, find new unindexed files, and detect dependency problems.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/claudate/project-multilevel-index/check-index
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/Claudate/project-multilevel-index

Made for: Claude Code.

Or install project-multilevel-index, the plugin that ships this one along with the rest of its 1 skill, 4 commands.

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 check-index

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/claudate/project-multilevel-index/check-index"><img src="https://agentmods.dev/badge/commands/claudate/project-multilevel-index/check-index.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,401 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.01401
Opus 5 $0.00000 $0.00700
Sonnet 5 $0.00000 $0.00280
Haiku 4.5 $0.00000 $0.00140

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

Security

Grade A, and why

check-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 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.

.claude-plugin/commands/check-index.md · 229 lines

How it starts

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

命令: /check-index - 一致性检查

🎯 使用场景

验证索引系统的完整性和一致性,发现潜在问题。


📋 执行步骤

步骤 0: 加载语言配置

必须首先执行,详见 ../core/i18n.md


步骤 1: 检查文件头完整性

输出: {{LANG.messages.commands.checkIndex.checking}}

扫描所有代码文件,验证是否包含完整的文件头注释。

检查项:

  • 是否有注释块
  • 是否包含 Input: 字段
  • 是否包含 Output: 字段
  • 是否包含 Pos: 字段

统计结果:

{{LANG.messages.commands.checkIndex.fileHeaderIntegrity}}:
- {{LANG.messages.commands.checkIndex.allGood}}  # 全部正常
或
- {{LANG.messages.commands.checkIndex.missing}}  # 替换 {count}
  - 列出缺失的文件路径

步骤 2: 检查文件夹索引

对每个包含代码文件的文件夹:

检查项:

  1. 是否存在 FOLDER_INDEX.md
  2. 索引中列出的文件是否都存在
  3. 是否有文件未被索引(新增文件)
  4. 自指声明是否存在

统计结果:

{{LANG.messages.commands.checkIndex.folderIndex}}:
- ✅ {count}/{total} 正常
- ⚠️ 缺失的索引: 列出路径
- ⚠️ 过期的条目: 列出不存在的文件

步骤 3: 检查依赖关系

分析所有文件的 import 语句:

检查项:

  1. 循环依赖检测:

    • 构建依赖图
    • 使用深度优先搜索(DFS)检测环
    • 列出所有循环依赖链
  2. 断链检测:

    • 验证被依赖的文件是否存在
    • 列出找不到的依赖

统计结果:

{{LANG.messages.commands.checkIndex.dependencies}}:
- ✅ 无循环依赖
或
- {{LANG.messages.commands.checkIndex.circularDep}}  # 替换 {count}
  - 列出循环: A → B → C → A

- ⚠️ 断链依赖: 列出找不到的文件

步骤 4: 检查索引结构

验证整体结构:

检查项:

  1. PROJECT_INDEX.md 是否存在于根目录
  2. 依赖关系图是否有效(Mermaid 语法)
  3. 所有 FOLDER_INDEX.md 是否被 PROJECT_INDEX.md 引用

步骤 5: 生成报告

输出: {{LANG.messages.commands.checkIndex.title}}

完整报告格式:

{{LANG.messages.commands.checkIndex.title}}
===================

{{LANG.messages.commands.checkIndex.fileHeaderIntegrity}}: 55/57
  - src/utils/legacy.js
  - src/temp/test.ts

{{LANG.messages.commands.checkIndex.folderIndex}}: 8/8 ✅

{{LANG.messages.commands.checkIndex.dependencies}}:
  ⚠️ {{LANG.messages.commands.checkIndex.circularDep}}  # {count} = 1
    - src/a.ts → src/b.ts → src/c.ts → src/a.ts

{{LANG.messages.commands.checkIndex.structure}}: ✅

{{LANG.messages.commands.checkIndex.suggestions}}:
1. {{LANG.messages.commands.checkIndex.runUpdate}}
2. {{LANG.messages.errors.circularDep}}

如果一切正常:

{{LANG.messages.commands.checkIndex.perfect}}

Read the full file on GitHub · 229 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 · 229 lines · 0 tokens per session scan A 75afb4c49694

Subscribe to this mod's changes

check-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 1,401 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.