Skip to main content
rule CX Codex

index-sync — Claude Code rule for keeping indexes in sync

The index-sync rule ties changes in guide/ to updates in machine-readable indexes and link checks. Use it when those indexes feed an MCP server or the site search palette.

CC-BY-SA-4.0 ★ 6,529 updated 2026-10-22

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/index-sync.md
Open on GitHub

What index-sync does

When someone adds a page, section, concept, or tool to guide/, the rule calls for corresponding index updates. Add a deep_dive entry with an anchor in machine-readable/reference.yaml, then copy the change manually to mcp-server/content/reference.yaml. A new top-level guide area also affects llms-full.txt; the two coverage lists in llms.txt must remain identical.

Run python3 scripts/check-index-coverage.py --check and python3 scripts/validate-reference-yaml.py --ci to check coverage and references. CI runs both checks. Changes to a deep_dive entry also require pnpm build:search in the landing repository, or the palette keeps its previous entry. The .claude/hooks/index-sync-reminder.sh hook warns at the end of a turn; it does not block edits.

What it helps with

  • update indexes after adding a guide page
  • point a reference entry to a stable anchor
  • check guide coverage and resolve broken references
  • get a reminder when guide edits lack index updates

Example prompts for the agent

  • I added a page to guide/; update the indexes required by this rule.
  • Check reference anchors and guide coverage after my changes.
  • I changed a deep_dive entry; tell me what to rebuild for search.

How to install index-sync

Manually: put the files in place

.claude/rules/index-sync.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about index-sync

How do I install index-sync in Claude Code?

Place the rule file at .claude/rules/index-sync.md.

What does the index-sync rule do?

It describes which indexes to update when guide/ changes and which checks to run. Its hook gives a reminder without stopping the turn.

Do I need to rebuild search after changing deep_dive?

Yes. Run pnpm build:search in the landing repository so the palette can serve the updated entry.

Similar IDE rules

All IDE rules for Writing and docs →

From the same set45

The whole set →
source-command-ccguide-diff-docs source-command-ccguide-diff-docs — a skill for Claude Code and Codex that compares a baseline Anthropic docs snapshot against the current one. Reads local index files only, so no network call is made. CX Codex +1 ★ 6,529repo stars daily A daily digest of Anthropic docs diffs and Claude Code CLI releases. CX Codex +1 ★ 6,529repo stars whitepaper-coherence whitepaper-coherence is a Claude Code subagent that checks a whitepaper for logical consistency. It runs on requests to audit a file or inspect its reasoning. CX Codex ★ 6,529repo stars source-command-ccguide-daily source-command-ccguide-daily runs a daily check across Anthropic documentation updates and compiles recent Claude Code CLI releases. CX Codex +1 ★ 6,529repo stars whitepaper-density whitepaper-density — a subagent that calculates the percentage of useful content in a technical document and identifies empty rhetoric, repetition, and sections without facts. CX Codex ★ 6,529repo stars source-command-update-infos-release source-command-update-infos-release tracks new Claude Code CLI releases within the guide repository and manages documentation version increments when needed. CX Codex +1 ★ 6,529repo stars changelog This command reads CHANGELOG.md and displays recent release entries. Use it to check project changes without scanning the whole file. CX Codex +1 ★ 6,529repo stars source-command-changelog source-command-changelog prints the most recent CHANGELOG.md entries into the agent reply — version, date, sections. Handy when you need the release history without opening the file. CX Codex +1 ★ 6,529repo stars

More in the catalog

Project sponsors

Companies that keep this analytics open