agentleFS
BostonOrangeBostonOrange/claude-code-framework/skills/impact/SKILL.md

impact

Skill2 starsChanged 6 months agoMITView on GitHub

On-demand precise impact analysis for a symbol or file before changing it. Spawns impact-analyzer to grep callers, classify the cascade (direct/indirect/test-only), and produce a confidence-scored report. Different from `.claude/state/architecture.md` (broad map) — this is the focused per-symbol drill-down

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before making a confident-but-wrong change to a function, class, or file, run /impact to see what would break.

    line 8
  2. Distinctive:

    Read the agent's summary output.

    line 48
  3. Distinctive:

    If the user is iterating on a change:

    line 57
  4. Distinctive:

    If the user is exploring (no specific change):

    line 62

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Impact — On-Demand Cascade Analysis

Before making a confident-but-wrong change to a function, class, or file, run /impact to see what would break.

/impact answers questions like "if I change the return type of requireAuth, what breaks?" — without you having to grep callers, read each one, and reason about cascades by hand. Output is a structured report at .claude/state/impact-<hash>.md plus a short summary.

This complements .claude/state/architecture.md:

  • architecture.md is the broad map (module boundaries, dependency direction, top-10 hotspots) refreshed by /improve each session
  • /impact <symbol> is the focused drill-down for a specific change you're about to make

Usage

/impact <file>                          analyze every exported symbol in the file
/impact <file>:<symbol>                 analyze just that symbol
/impact <symbol>                        bare symbol; spawns analyzer to find definition first
/impact --refresh <target>              ignore cache; re-run analysis

Examples:

/impact lib/auth/middleware.ts
/impact lib/auth/middleware.ts:requireAuth
/impact requireAuth
/impact AccountTriggerHandler.cls:beforeInsert    # Apex

Process

Phase 1: Spawn impact-analyzer

Run impact analysis on <target>. Locate the definition, find direct callers,
classify references (direct/type/test), trace second-order public callers
(depth=2 max), score confidence, write the report to .claude/state/impact-<hash>.md.
End with the surface summary.

The agent is read-only by tool restriction (Read, Glob, Grep, Bash — no Edit/Write). Its only filesystem write is the report file.

Phase 2: Surface to user

Read the agent's summary output. Show:

  • Total references + breakdown (direct / type / test)
  • Confidence level + top caveat
  • Top 3 most-impacted files
  • Recommendation one-liner
  • Path to the full report

Phase 3: Hand-off

If the user is iterating on a change:

  • "Confidence is high — proceed; the test suite at <paths> should catch regressions"
  • "Confidence is medium — review the second-order callers in .claude/state/impact-<hash>.md before merging"
  • "Confidence is low — string-keyed lookups detected; grep can't see them all. Consider running tests in addition"

If the user is exploring (no specific change):

  • "X is used in Y places, mostly in <dir> — likely a <role> (auth/data-access/etc.). Safe to refactor if Z."

State Files

FilePurposeLifecycle
.claude/state/impact-<hash>.mdFull per-symbol reportCached by hash; re-used until target file's SHA changes

<hash> is the first 8 chars of sha256(target). Two /impact calls on the same target return the cached report unless --refresh is passed or the target file has new commits.

When to Use /impact vs /architecture vs Grep

SituationTool
About to change a specific function/class/impact <target>
Trying to understand the codebase shapeRead .claude/state/architecture.md (refresh via /improve if stale)
Looking for a specific stringGrep directly
Looking for code semantically ("where do we handle X?")/search (Phase 2 vector index, opt-in for large codebases)
Need precise call counts at scale/search + /impact together; for 1M+ LOC consider GitNexus as a separate tool

Edge Cases

ScenarioBehavior
Target not foundAgent halts with "no definition for <target>"; suggest /search if user gave a vague name
Multiple definitionsAgent lists candidates; user picks; re-run with disambiguated target
Cache exists and target unchangedReturn cached report; show its timestamp
Cache exists but target file has new commitsRe-run automatically (cache invalidated by SHA mismatch)
Target has >500 direct callersReport truncates; recommends /search for full picture
Test-only referencesReport flags as "candidate for removal — only used by tests"
Salesforce / Apex targetsAgent also checks triggers, flows, @AuraEnabled/@RemoteAction annotations
Large codebase (>500k LOC)Grep is still fast; /impact works. For semantic queries at this scale, run /index once then use /search

Related

  • impact-analyzer agent — the agent this skill spawns
  • .claude/state/architecture.md — broad map, refreshed by /improve
  • /improve — refreshes architecture.md every session
  • /search — semantic search across the indexed codebase (Phase 2)
  • /index — builds the vector index (Phase 2; opt-in for large codebases)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.