Skip to content
Code Generation
Command

/impact

CodeDNA impact analysis — show the full dependency chain for a file before editing or refactoring

BOOST
From plugin
codedna
1514 skills2 agents4 commands
Install
> /plugin marketplace add Larens94/codedna
> /plugin install codedna@codedna

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/impact

Context preview

What this command does when you run it.

CodeDNA impact analysis — show the full dependency chain for a file before editing or refactoring

Command definition

impact.md
description: CodeDNA impact analysis — show the full dependency chain for a file before editing or refactoring

/codedna:impact $ARGUMENTS

Perform a cascade impact analysis for the file at path `$ARGUMENTS`.

If no argument is provided, ask: "Which file do you want to analyze? Provide the path relative to the project root."

Steps:

1. **Read the target file's module docstring** (first 15 lines only). Extract its `exports:` and `used_by:` fields.

2. **For each file listed in `used_by:`**, read only its module docstring and extract its own `used_by:` (to find second-level callers).

3. **Build the cascade chain** — stop at 3 levels deep to avoid infinite loops.

4. **Output the impact tree**:

Impact Analysis: utils/format.py
=================================
Direct callers (Level 1):
  - api/routes.py
      exports: revenue_route(req) -> Response
      rules:   all routes require auth middleware
  - views/dashboard.py
      exports: render(ctx) -> str
      rules:   none

Second-level callers (Level 2):
  - workers/report.py  (calls api/routes.py)
      exports: generate(period) -> None

Cascade summary:
  Editing utils/format.py may affect 3 files.
  Check rules: in api/routes.py before changing format_currency signature.

5. If the file has no `used_by:` entries or is not annotated, output:

utils/new_file.py has no used_by: entries — no cascade impact detected.
Note: file may not be annotated yet. Run /codedna:check to verify.

Use this command before any refactor, signature change, or deletion.

Read more
Ships withcodedna

A lightweight annotation standard that helps AI agents navigate codebases faster, with fewer file reads and tool calls

Get the whole plugin
Stats
150
Stars
24
Forks
Active
Maintenance
Python
Language
MIT
License
15d ago
Last commit
7mo ago
Created
4h ago
Added

Repo: Larens94/codedna

Other commands on codedna.

init
Command

init

Annotate all unannotated source files in the project with CodeDNA module headers. Uses your current Claude session — no API key…

@larens94@larens94Install Command