Aller au contenu
Skillpedia
Programmation générale48k · #3609

gitnexus-impact-analysis

Ce qu’il fait

Cette compétence guide votre agent pour cartographier le code qui dépend d'un élément avant que vous ne le modifiiez. Elle s'adresse aux développeurs qui veulent éviter de casser d'autres parties d'un projet.

Quand l’utiliser

  • ✓Quand vous êtes sur le point de modifier une fonction et voulez savoir ce qui en dépend.
  • ✓Quand vous voulez voir le rayon d'impact d'une modification avant de faire un commit.
  • ✓Quand vous demandez si une modification peut être faite sans risque.

Lien du skill

https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-impact-analysis/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/abhigyanpatwari/GitNexus/blob/main/.claude/skills/gitnexus-impact-analysis/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Est-il sûr de modifier les paramètres de cette fonction, et qu'est-ce qui l'utilise d'autre ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent confirme le dépôt, puis recherche le code qui appelle la cible ou en dépend, et signale le risque. Il vérifie aussi les modifications locales pour que vous sachiez ce qu'elles touchent.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Impact Analysis with GitNexus

When to Use

  • "Is it safe to change this function?"
  • "What will break if I modify X?"
  • "Show me the blast radius"
  • "Who uses this code?"
  • Before making non-trivial code changes
  • Before committing — to understand what your changes affect

Bind the repository first

Impact analysis is the gate that authorizes an edit, so it must answer for the repository you are about to edit.

Call list_repos {} before the first tool call. With one indexed repository, use the examples below as written. With more than one, pass repo on every call: an omitted repo normally errors, but under an MCP policy with a configured default it resolves to that default silently. If you cannot tell which repository is meant, stop and ask — every result below an ambiguous identity inherits the ambiguity. list_repos is paginated, so page with offset: pagination.nextOffset until hasMore is false before concluding a repository is absent.

detect_changes takes worktree when your changes are in a linked worktree the MCP server was not launched from. The server auto-detects a worktree only when it was launched from inside one; otherwise git diff runs in the wrong checkout and reports zero changed symbols — a false clean check that carries none of the degradation flags described below. In the CLI fallbacks, --repo . means the current checkout; pass the intended repository path instead when you are not standing in it.

State the bound identity with your risk report:

Repository: <name> (<path>)   Worktree: <path>   Index: <commit>, <n> behind HEAD

Workflow

0. list_repos {}                                           → Bind repo (and worktree)
1. impact({target: "X", direction: "upstream"}) or `node .gitnexus/run.cjs impact "X" --direction upstream --repo .`
2. READ gitnexus://repo/{name}/processes                   → Check affected execution flows
3. detect_changes({scope: "all"}) or `node .gitnexus/run.cjs detect-changes --scope all --repo .`
4. Assess risk and report to user, echoing repo/worktree/index identity

If "Index is stale" → run node .gitnexus/run.cjs analyze in terminal. Hot-tool staleness names which index answered (branch/lastCommit) and how fresh it is (status). Re-analyze only for behind or diverged — current is identity, unknown is unmeasurable. If .gitnexus/run.cjs is missing, replace node .gitnexus/run.cjs with npx gitnexus in the fallback commands.

Checklist

- [ ] list_repos {} — bind repo; explicit repo when >1 indexed, ask if ambiguous
- [ ] impact({target, direction: "upstream"}) or CLI fallback to find dependents
- [ ] Review d=1 items first (these WILL BREAK)
- [ ] Check high-confidence (>0.8) dependencies
- [ ] READ processes to check affected execution flows
- [ ] detect_changes({scope: "all"}) or CLI fallback for pre-commit check
- [ ] Confirm the checkout you edited is the checkout that was diffed
- [ ] Assess risk level and report, stating repo/worktree/index identity

Understanding Output

Depth Risk Level Meaning
d=1 WILL BREAK Direct callers/importers
d=2 LIKELY AFFECTED Indirect dependencies
d=3 MAY NEED TESTING Transitive effects

Risk Assessment

Affected Risk
<5 symbols, few processes LOW
5-15 symbols, 2-5 processes MEDIUM
>15 symbols or many processes HIGH
Critical path (auth, payments) CRITICAL
Zero callers found UNKNOWN

UNKNOWN is not a low rung on this scale — it means the walk could not answer. An empty caller set is equally consistent with "genuinely unused" and "the callers are not resolvable by the index" (plain-object property access, dynamic dispatch, cross-language calls), so few-callers ⇒ LOW does not apply. The result carries a riskNote saying so. Confirm with a text search before treating the symbol as safe to change or delete.

risk is the edit gate: warn on HIGH/CRITICAL and stop on UNKNOWN until the uncertainty is resolved. Within single-repo mode, compare File and symbol targets with local riskSharedAxes (direct/total only). Within group mode, compare only group results: their riskSharedAxes overlays resolved cross-repo crossings on that local value. Never use either field to waive the

Questions fréquentes

Modifie-t-elle le code ?

Son but est l'analyse avant la modification. Elle éclaire les modifications, sans les faire elle-même.

Pourquoi confirmer le dépôt ?

La compétence indique que des résultats qui décrivent le mauvais dépôt sont trompeurs, elle demande donc lorsque la cible n'est pas claire.

Peut-elle vérifier des modifications sur une branche ?

Oui. Elle peut vérifier les modifications locales, y compris dans un worktree git lié si vous l'indiquez.

Détails

Description originale de l’auteur

Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\"

repo: abhigyanpatwari/GitNexus

Popularité

Étoiles GitHub
48k
Position au classement
#3609
Licence
—
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires