Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Before modifying shared code (utilities, types, configs, base classes), traces all callers and dependents first. Prevents "fixed one thing, broke three others." Use when editing files in shared/, utils/, lib/, or anything imported by 3+ files.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -8% | 0% |
Shared code is high-leverage but high-risk. Change a utility function and you might break 10 callers. Change a type definition and you invalidate assumptions across the codebase. This skill forces you to trace impact before editing.
utils/, lib/, shared/, common/, core/bash# Find imports/requires of this file grep -r "from.*['\"].*filename" src/ grep -r "import.*filename" src/ grep -r "require.*filename" src/ # Find usages of specific function/class grep -r "functionName" src/ --include="*.ts"
Document what you find:
markdown## Dependency Trace: [file or function name] **Direct callers:** [count] - `src/api/handler.ts:23` - uses for validation - `src/services/user.ts:45` - uses for formatting - `src/utils/helpers.ts:12` - re-exports it **Indirect dependents:** [count] - Files that import the direct callers
For each caller, determine:
| Caller | How it uses this | Will change break it? | |--------|------------------|----------------------| | handler.ts | Calls validate(input) | Yes - signature changes | | user.ts | Uses return value | No - return type same |
Impact level:
For Low impact: Proceed, update callers inline.
For Medium impact:
For High impact:
When changing function signatures:
markdown## Signature Change **Before:** `function process(data: string): Result` **After:** `function process(data: string, options?: Options): Result` **Breaking:** No (new param is optional) **Callers to update:** 0 required, 5 could benefit ## OR **Before:** `function process(data: string): Result` **After:** `function process(data: ProcessInput): Result` **Breaking:** Yes **Callers to update:** 8 files **Migration:** [list each file and required change]
markdown## Trace: [what you're changing] **Callers found:** [count] **Impact level:** [Low/Medium/High] **Changes required:** - [ ] `file1.ts:line` - [what needs updating] - [ ] `file2.ts:line` - [what needs updating] **Verified after change:** - [ ] All callers updated - [ ] No new type errors - [ ] Tests pass
User: "Rename the formatDate function to formatDateTime"
Trace:
bashgrep -r "formatDate" src/
Found:
src/utils/date.ts:15 - definition
src/components/Header.tsx:8 - import
src/components/EventCard.tsx:12 - import
src/pages/Dashboard.tsx:45 - import
src/api/events.ts:23 - import
src/utils/index.ts:5 - re-exportImpact: 6 files reference this. High impact.
Plan:
date.tsutils/index.tsgrep -r "formatDate" src/ returns nothingAfter completion: > Renamed formatDate to formatDateTime across 6 files. > Verified: no remaining references to old name.
Other measured skills in the registry, with their headline benchmark lift.