trace-mcp-refactoring

Solid

Safe refactoring workflow using trace-mcp — assess risk, find candidates, check impact, and rename symbols across all files without missing import sites or cross-file references.

AI & Automation 84 stars 11 forks Updated today MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# trace-mcp — Refactoring Workflow Use this skill whenever you are about to rename, restructure, extract, or otherwise refactor code in a project indexed by trace-mcp. The goal is to never break cross-file references and never guess at what is affected. ## When to Use - Renaming a class, function, method, variable, or file - Extracting a function or method - Restructuring a module or splitting a file - Changing a function signature - Any change that touches more than one call site ## Refactoring Workflow ### 1. Assess before touching anything ``` assess_change_risk({ file_path: "src/foo.ts" }) # or assess_change_risk({ symbol_id: "<id>" }) ``` This returns the risk level of the target change based on churn, complexity, fan-in/fan-out, and test coverage. Use it to decide whether to proceed, add tests first, or split the change. ### 2. Find what actually needs refactoring ``` get_refactor_candidates() ``` Do not guess. This surfaces high-complexity, high-churn, and anti-pattern-laden symbols that are the real refactor targets. ### 3. Know what will break ``` get_change_impact({ symbol_id: "<id>" }) ``` Returns the reverse-dependency graph: every file, symbol, and test that depends on the target. Review this list before editing. ### 4. Quantify complexity ``` get_complexity_report({ file_path: "src/foo.ts" }) ``` Gives you a baseline so you can verify the refactor actually reduced complexity. ## Renaming a Symbol — MANDATORY Flow **Never** rename with `Edit` an...

Details

Author
nikolai-vysotskyi
Repository
nikolai-vysotskyi/trace-mcp
Created
1 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

trace-mcp

Use trace-mcp tools for code navigation, impact analysis, and framework-aware queries instead of Read/Grep/Glob/Bash. Activate whenever the agent needs to explore, understand, or modify a codebase that has trace-mcp indexed.

84 Updated today
nikolai-vysotskyi
AI & Automation Solid

trace-mcp-pre-commit

Run trace-mcp security, quality-gate, and antipattern checks before committing or opening a PR. Activate when the agent is about to create a commit or pull request in a project indexed by trace-mcp.

84 Updated today
nikolai-vysotskyi
Code & Development Listed

refactoring-strategy

Systematic refactoring methodology with safety guarantees for polyglot codebases. TRIGGER when: user asks to refactor code, restructure a module, split a monolith, do a large rename, extract a service, apply strangler fig, or plan a safe migration of existing code. Also when tech-debt-tracker findings need execution. DO NOT TRIGGER when: user is fixing a bug (use focused-fix), doing TDD on new code (use tdd), or finding tech debt without a plan to fix it (use tech-debt-tracker).

1 Updated 1 weeks ago
DROOdotFOO
AI & Automation Solid

trace-mcp-codemod

Use trace-mcp apply_codemod for any bulk mechanical change instead of repeated Edit calls. Activate whenever the same edit pattern would be applied 2+ times, across one file or many.

84 Updated today
nikolai-vysotskyi
Code & Development Listed

refactor

Safe, verified refactoring with regression testing at each step. Identify targets, plan transformation, execute incrementally. Triggers: "refactor", "restructure", "extract", "rename", "move", "simplify", "reduce complexity", "clean up", "decompose".

375 Updated today
boshu2