About reindex
GitNexus Reindex is a CLI-oriented skill for rebuilding or updating the GitNexus knowledge graph for a repository and checking the resulting status and statistics. It is intended for developers refreshing an index after substantial changes or when it is reported as stale.
Key features
- 01Check index status against HEAD
- 02Run incremental analysis
- 03Force a full index rebuild
- 04Verify updated index status
- 05Report index statistics
Use cases
- 01Refresh after a large refactor
- 02Update after merging a large pull request
- 03Resolve a reported stale index
MCP support
The skill explicitly states that no MCP server exists and uses the GitNexus CLI rather than `gitnexus://` MCP resources.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ terrylica/ cc-skills --skill reindexAfter installing, type/reindexin Claude Code to confirm it loaded.
Details
From the project READMEGitNexus Reindex
CLI ONLY — no MCP server exists. Never use
readMcpResourcewithgitnexus://URIs.
Re-index the current repository's GitNexus knowledge graph and verify the updated stats.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
When to Use
- After significant refactors (5+ files changed)
- When staleness hook reports index is behind
- After merging a large PR
- "Refresh the knowledge graph"
Workflow
Step 0: Pre-flight — Ensure CLI Is Callable
The gitnexus binary is installed via npm/mise. The mise shim may fail if node isn't active in the current project. Run this pre-flight before any gitnexus command:
# Test if gitnexus is actually callable (not just a broken shim)
gitnexus --version 2>/dev/null || mise use [email protected]
All commands below run from the repo root. If multiple repos are indexed in the workspace, add --repo <repo-name> to specify the target. Otherwise --repo is optional.
Step 1: Check Current Status
gitnexus status
If already current (lastCommit matches HEAD), report "Index is up to date" and stop.
Step 2: Run Indexer
gitnexus analyze
Use --force if the index appears corrupted or if a normal analyze doesn't pick up changes:
gitnexus analyze --force
This may take 30–120 seconds depending on codebase size.
Step 3: Verify New Index
gitnexus status
Step 4: Report Stats
Present the updated stats:
## GitNexus Reindex Complete
| Metric | Before | After |
| ----------- | ------ | ----- |
| Nodes | ... | ... |
| Edges | ... | ... |
| Communities | ... | ... |
| Flows | ... | ... |
| Last Commit | ... | ... |
Index is now current with HEAD.
Notes
- The
analyzecommand runs locally — no network calls - KuzuDB database is stored in
.gitnexus/at the repo root - Large codebases (10k+ files) may take 2+ minutes
- The
--forceflag rebuilds from scratch; without it, incremental analysis is used
Post-Execution Reflection
After this skill completes, reflect before closing the task:
- Locate yourself. — Find this SKILL.md's canonical path before editing.
- What failed? — Fix the instruction that caused it.
- What worked better than expected? — Promote to recommended practice.
- What drifted? — Fix any script, reference, or dependency that no longer matches reality.
- Log it. — Evolution-log entry with trigger, fix, and evidence.
Do NOT defer. The next invocation inherits whatever you leave behind.