home / skills / lis186 / sourceatlas / impact-analyzer

impact-analyzer skill

/plugin/skills/impact-analyzer

This skill analyzes code changes to reveal impact, risks, and a migration checklist across backend, frontend, and tests.

npx playbooks add skill lis186/sourceatlas --skill impact-analyzer

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.3 KB
---
name: impact-analyzer
description: Analyze what code will be affected by changes. Use when user asks "what will break if I change X", "impact of changing X", "dependencies of X", "is it safe to modify X", or before making significant code changes.
---

# Impact Analyzer

## When to Use

Trigger this skill when the user:
- Is about to modify code and wants to know the impact
- Asks what depends on a file or component
- Wants to understand breaking change risks
- Asks "what will break if I change X"
- Asks "is it safe to modify this"

## Instructions

1. Identify the file, component, or API the user wants to change
2. Run `/sourceatlas:impact "<target>"` with the target
3. Returns dependency analysis, risk assessment, and migration checklist

## Target Formats

- File path: `/sourceatlas:impact "src/api/users.ts"`
- API endpoint: `/sourceatlas:impact "api /api/users/{id}"`
- Component: `/sourceatlas:impact "UserService"`
- Model: `/sourceatlas:impact "User model"`

## What User Gets

- Impact summary (backend, frontend, test files affected)
- Risk level assessment (red/yellow/green)
- Breaking change risks
- Migration checklist
- Test coverage gaps

## Example Triggers

- "What happens if I change this file?"
- "What depends on UserService?"
- "Is it safe to modify the authentication module?"
- "Impact of changing the User model"

Overview

This skill analyzes what parts of a codebase will be affected by a change and helps assess risk before you modify code. It produces a dependency map, risk level, and a practical migration checklist so you can make changes more safely. Use it to catch hidden dependencies, test gaps, and potential breakages early.

How this skill works

You specify a target (file, component, API, or model) and the skill runs an automated dependency analysis against the codebase. It returns an impact summary that lists affected backend, frontend, and test files, assigns a red/yellow/green risk level, and highlights breaking-change risks. Finally, it generates a migration checklist with recommended steps and test coverage gaps to address.

When to use it

  • Before modifying a file, service, API endpoint, or data model
  • When asked "what will break if I change X" or "is it safe to modify X"
  • To discover all callers and consumers of a component or module
  • When planning a refactor, upgrade, or API contract change
  • To validate deployment risk and testing requirements

Best practices

  • Provide an exact target: file path, component name, or API route for precise results
  • Run the analyzer early in planning, not just before commit
  • Combine findings with test runs and static analysis for full coverage
  • Prioritize fixes in areas flagged red and add tests for yellow areas
  • Use the migration checklist as a living plan and mark steps as complete

Example use cases

  • Ask "What depends on src/services/auth.ts?" to list all callers and impacted services
  • Check "Impact of changing the User model" to see DB migrations and API consumers
  • Run analysis for an API route like "/api/users/{id}" before altering response shape
  • Validate safety of removing or renaming a public function used across repos
  • Assess test coverage gaps after a planned refactor to determine required tests

FAQ

What input formats are supported?

File paths, component or service names, API endpoints, and data model names are supported for precise analysis.

How is risk level determined?

Risk is based on number and criticality of dependents, presence of public APIs, test coverage, and whether breaking changes are likely.

Can I get a migration checklist?

Yes. The skill generates step-by-step migration tasks including code updates, required tests, and rollout notes.