Claude Skill MartBrowse skillsQuick linesLearn by videoTerminal guideWhat is a Skill?
← Back to list

trace-mcp Safe Refactoring Workflow

A disciplined refactoring playbook that drives trace-mcp tools to assess risk, map impact, rename atomically, and verify results.

Dev & CodingIntermediate★ 189⑂ 24AI score 7/10Last updated: Oct 11, 2026

What it does

  • Runs assess_change_risk before any edit, scoring churn, complexity, fan-in/fan-out and test coverage.
  • Uses get_refactor_candidates to find genuine refactor targets instead of guessing.
  • Pulls the reverse-dependency graph with get_change_impact so every affected file, symbol and test is reviewed first.
  • Forbids Edit + replace_all renames; mandates check_rename (collision detection) then apply_rename (definition, imports, re-exports, call sites, JSX, tests in one atomic op).
  • Delegates function extraction to extract_function so closure-variable capture isn't missed.
  • Post-refactor checklist: register_edit to reindex, re-run the complexity report, run get_tests_for results, and check_quality_gates with scope: "changed".

Who it's for

  • Developers already running the trace-mcp MCP server on an indexed codebase.
  • Teams burned by cross-file rename breakage and missed import sites.
  • Engineers who want measurable proof that a refactor lowered complexity.

Examples

  1. "Rename UserService to AccountService" → collision check, then repo-wide atomic rename.
  2. "Extract lines 42–67 of src/checkout.ts into a function" → extract_function handles capture analysis.
  3. "Is it safe to restructure this module?" → risk score plus a full impact list before any edit.

· · · Install guide · · ·

Try it now, no install

Paste this into Claude to use the skill without installing anything.

Read the instructions in this file and follow them to help me:
https://raw.githubusercontent.com/nikolai-vysotskyi/trace-mcp/HEAD/skills/trace-mcp-refactoring/SKILL.md

What I want: (describe your task here)

If Claude can't open the link, open it yourself and paste the contents instead.

↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/trace-mcp-refactoring folder from the GitHub repo nikolai-vysotskyi/trace-mcp into my ~/.claude/skills/trace-mcp-refactoring/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/nikolai-vysotskyi/trace-mcp.git /tmp/trace-mcp && mkdir -p ~/.claude/skills && cp -r /tmp/trace-mcp/skills/trace-mcp-refactoring ~/.claude/skills/

⚠ This is a third-party skill. Check the source repository before installing.

  1. Install and configure the trace-mcp MCP server in Claude Code and index your project (see the repo README). The skill is inert without it.
  2. Clone the repository: git clone https://github.com/nikolai-vysotskyi/trace-mcp.git
  3. Copy the skill folder: mkdir -p ~/.claude/skills && cp -r trace-mcp/skills/trace-mcp-refactoring ~/.claude/skills/
  4. Restart Claude Code and confirm the skill appears in your skills list.
  5. Ask for a rename or extraction (e.g. "rename this symbol everywhere") and the skill will start with the risk assessment step.