Agent skill

impact-analysis

Stars 3
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/anortham/julie/tree/main/.claude/skills/impact-analysis

SKILL.md

Impact Analysis

Analyze the impact of changing a symbol by finding all references and assessing risk. Use this BEFORE modifying widely-used symbols.

Process

Step 0: Orient on the Area (Optional)

Get a broad view of the symbol's neighborhood:

get_context(query="<symbol_name>")

This reveals the symbol's centrality (how well-connected it is) and surrounding context. High-centrality symbols in the pivot list are inherently higher risk — they're well-connected in the reference graph.

Step 1: Find All References

fast_refs(symbol="<symbol>", include_definition=true, limit=100)

Step 2: Deep Dive the Symbol

deep_dive(symbol="<symbol>", depth="context")

Understand what the symbol does, its signature, and what it depends on.

If deep_dive returns the wrong symbol (common names like new, result, config), use context_file to disambiguate:

deep_dive(symbol="<symbol>", context_file="<partial_file_path>")

Step 3: Categorize References by Risk

Group each reference by the file it appears in, then classify:

High Risk — Changes here could cause cascading failures:

  • Entry points and core orchestration files (e.g., main entry, request handlers, routers)
  • Files with 10+ references to this symbol
  • Files that re-export or wrap this symbol

Medium Risk — Changes need careful testing:

  • Feature implementation files
  • Data access / storage modules
  • Files with 3-9 references

Low Risk — Changes are isolated:

  • Test files (paths containing test, tests, spec, __tests__, or test annotations)
  • Files with 1-2 references

Step 4: Sample Deep Dives on High-Risk Callers

For each high-risk file, deep_dive on the calling function to understand HOW the symbol is used:

  • Is it called with specific arguments?
  • Does the caller depend on the return type?
  • Is it used in error handling paths?

Step 5: Report

Impact Analysis: <symbol_name>
Definition: <file>:<line> (<kind>)
Centrality: <high/medium/low>

Total: <N> references across <M> files

High Risk (<count> files):
  src/handler.rs — 15 refs
    Callers: process_request, handle_error, validate_input
    Usage: Core request pipeline, changes here affect all tool calls

  src/database/queries.rs — 12 refs
    Callers: fetch_symbols, update_index
    Usage: Database layer, type changes would require migration

Medium Risk (<count> files):
  src/tools/search.rs — 5 refs
  src/tools/navigation.rs — 3 refs

Low Risk (<count> files):
  src/tests/search_tests.rs — 8 refs (test code)
  src/tests/handler_tests.rs — 2 refs (test code)

Recommendation:
  <1-2 sentences on how to approach this change safely>

Important Notes

  • Always check test coverage — high-risk changes with no test references are especially dangerous
  • Type changes cascade — if the symbol is a type/struct, any field change affects all users
  • Interface/trait changes are widest — changing an interface method, trait, or abstract class affects all implementors
  • Reference workspaces: Pass workspace: "<workspace_id>" to all tool calls when analyzing a non-primary workspace

Expand your agent's capabilities with these related and highly-rated skills.

anortham/julie

logic-flow

Explain a function's logic step-by-step by analyzing its implementation and call graph. Use when the user asks "how does this work", "walk me through this", or wants to understand control flow and decision points.

3 1
Explore
anortham/julie

metrics

Show Julie operational metrics -- session stats, tool usage, context efficiency, and historical trends. Use when the user asks about Julie's performance, how it's doing, how much context was saved, or wants a metrics/stats report.

3 1
Explore
anortham/julie

architecture

Generate an architecture overview — key entry points, module map, dependency flow, and suggested reading order. Use when the user is new to a codebase, asks "how does this work?", wants an architecture overview, or needs onboarding documentation.

3 1
Explore
anortham/julie

dependency-graph

Show module dependencies by analyzing imports, exports, and cross-references. Use when the user asks what a file imports, what depends on a module, or wants to see dependency structure.

3 1
Explore
anortham/julie

search-debug

Diagnose why a search returns unexpected results — analyze scoring factors, tokenization, and index health for dogfooding Julie's search quality. Use when a Julie search misses an expected symbol, returns wrong results, ranks something surprisingly low, or when investigating search quality issues during development.

3 1
Explore
anortham/julie

call-trace

Trace the call path between two functions by following callers/callees. Use when the user asks how function A reaches function B, wants to see connections between symbols, or asks "what calls what."

3 1
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results