Réindexer GitNexus

VérifiéPrudence

Réindexer le graphe de connaissances GitNexus du dépôt via CLI. Outil exclusif en ligne de commande pour analyser et mettre à jour les statistiques du graphe de code.

Spar Skills Guide Bot
Data & IAIntermédiaire
3002/06/2026
Claude Code
#gitnexus#knowledge-graph#reindex#code-analysis#cli

Recommandé pour

Notre avis

Ré-indexe le graphe de connaissances GitNexus d'un dépôt via la CLI, sans serveur MCP.

Points forts

  • Analyse incrémentale rapide pour les changements quotidiens
  • Option --force pour reconstruire complètement l'index
  • Statistiques détaillées avant/après pour valider la mise à jour
  • Fonctionne localement sans appels réseau

Limites

  • Nécessite que le dépôt ait déjà été initialisé avec GitNexus
  • Les gros codebases (>10k fichiers) peuvent prendre plusieurs minutes
  • Aucun serveur MCP disponible, uniquement en ligne de commande
Quand l'utiliser

Après un refactoring majeur, une fusion de grosse PR, ou lorsque l'index est signalé comme obsolète.

Quand l'éviter

Pour des modifications mineures qui ne justifient pas une réindexation complète, ou si GitNexus n'est pas configuré dans le projet.

Analyse de sécurité

Prudence
Score qualité85/100

The skill uses Bash to run npx gitnexus@latest, which fetches and executes code from npm. While the tool is described as local-only, supply chain risk exists. No destructive or exfiltration instructions are present, but caution is warranted due to external code execution.

Points d'attention
  • Runs npx gitnexus@latest which downloads and executes remote code from npm. If the package is compromised, it could exfiltrate data or perform malicious actions.
  • The skill does not verify the integrity of the package beyond npm's default mechanisms.

Exemples

Standard reindex
Re-index the GitNexus knowledge graph for this repo using incremental analysis.
Force reindex
Force a full rebuild of the GitNexus index because it appears corrupted.
Check reindex results
Run a status check after reindexing the GitNexus knowledge graph.

name: reindex description: "Re-index the GitNexus knowledge graph via CLI (npx gitnexus@latest). CLI ONLY - NO MCP server exists, never use readMcpResource with gitnexus:// URIs. TRIGGERS - reindex, refresh index, update knowledge graph, gitnexus analyze." allowed-tools: Bash, Read model: haiku

GitNexus Reindex

CLI ONLY — no MCP server exists. Never use readMcpResource with gitnexus:// URIs.

Re-index the current repository's GitNexus knowledge graph and verify the updated stats.

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 1: Check Current Status

Run from the repo root (the CLI auto-detects the repo from cwd):

npx gitnexus@latest status

If already current (lastCommit matches HEAD), report "Index is up to date" and stop.

Step 2: Run Indexer

npx gitnexus@latest analyze

Use --force if the index appears corrupted or if a normal analyze doesn't pick up changes:

npx gitnexus@latest analyze --force

This may take 30–120 seconds depending on codebase size.

Step 3: Verify New Index

npx gitnexus@latest 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 analyze command runs locally — no network calls
  • KuzuDB database is stored in .gitnexus/ at the repo root
  • Large codebases (10k+ files) may take 2+ minutes
  • The --force flag rebuilds from scratch; without it, incremental analysis is used
Skills similaires