Skip to content
Skillpedia
General coding8.1k Β· #12569

pre-modification-check

What it does

This skill has your AI assess a file's risk before it changes that file. It is for developers in a Repowise-indexed project who want to avoid breaking shared or fragile code.

When to use it

  • βœ“When your AI is about to edit a shared utility or core module.
  • βœ“When a file you did not mention is about to be changed as a side effect.
  • βœ“When you plan to modify or delete several files together and want the impact first.

Skill link

https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/pre-modification/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/pre-modification/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œBefore you change the payment helper, check what depends on it and whether it has been breaking often.”

5 new skills a week. 1 minute to read.

How it works

The skill runs a risk check on the file, which reports its fix history, dependent files, files that usually change with it, its owner, test gaps and security signals. The AI reads these results before making the edit.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Pre-Modification Check with Repowise

Before modifying files in a Repowise-indexed codebase, assess the impact.

Before editing a file

Call get_risk(targets=["path/to/file.py"]). Per file it returns hotspot_score, trend, risk_type, impact_surface (top 3), dependents_count, co_change_partners, primary_owner, test_gap, and security_signals. Read it for:

  • Bug-fix history (defect_profile) β€” present only on files with counted fixes: fix_count over the trailing 6 months, last_fix_days_ago, a bug_magnet flag for sustained recent fix pressure, and top_symbols (the per-symbol counts are approximate β€” read them as "mostly here"). A file that keeps getting fixed is the strongest single signal that the next edit breaks something; lead with it.
  • Hotspot status (hotspot_score, trend) β€” high-churn Γ— complex? Extra care needed.
  • Dependents (dependents_count, impact_surface) β€” how wide is the blast radius?
  • Co-change partners β€” files that change together with this one (often without an import link); you may need to update them too.
  • Ownership / bus factor β€” who owns it, and whether a single author maintains it.
  • Test gap & security signals β€” flag untested or security-sensitive files before touching them.

When modifying multiple files

Batch all targets into one call: get_risk(targets=["file1.py", "file2.py", "module/"]).

When to warn the user

If get_risk shows:

  • A defect_profile with bug_magnet set β€” say so plainly: this file has been fixed repeatedly and recently
  • Hotspot score above 90th percentile β€” mention this is a frequently-changed, high-risk file
  • More than 10 dependents β€” list the top dependents; API changes here will break consumers
  • Bus factor of 1 β€” note that a single person maintains this code
  • Risk type is "bug-prone" or "high-coupling" β€” flag explicitly before making changes

Before refactoring or moving code

Call get_context(targets=["file.py"]) first to understand the full context: what uses this file, what decisions govern it, and why it's structured this way. This prevents accidentally violating architectural decisions.

For a heavy refactor, also call get_health(targets=["file.py"]) β€” the marker findings (complexity, deep nesting, low cohesion, duplication) tell you what to improve while you're in there, and give you a before/after score.

Error handling

If get_risk returns a tool error, the MCP server may not be running. Proceed with the modification but note that risk assessment was unavailable.

FAQ

What does the check tell me?

It shows bug-fix history, how many files depend on it, co-changing files, the main owner, and whether tests are missing.

Can it check several files at once?

Yes. The skill says to batch all the target files into one check.

Does it stop an edit from happening?

It informs the change rather than blocking it, so the AI can plan extra care or update related files.

Details

Original description by the author

Use before modifying, refactoring, or deleting files in a codebase that has Repowise indexed (indicated by a .repowise/ directory). Activates when Claude is about to edit code, especially shared utilities, core modules, or files the user didn't explicitly mention. Helps assess impact and avoid breaking things.

repo: repowise-dev/repowise

Popularity

GitHub stars
8.1k
Ranking position
#12569
License
AGPL-3.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills