- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-refactoring -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-refactoring -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-refactoring -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-refactoring -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/nikolai-vysotskyi/trace-mcp/tree/HEAD/skills/trace-mcp-refactoring來自發布者
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.
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.
get_refactor_candidates()
Do not guess. This surfaces high-complexity, high-churn, and anti-pattern-laden symbols that are the real refactor targets.
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.
get_complexity_report({ file_path: "src/foo.ts" })
Gives you a baseline so you can verify the refactor actually reduced complexity.
Never rename with Edit and replace_all. It silently misses import sites, re-exports, type references, and cross-file usages.
# 1. Collision detection first
check_rename({ symbol_id: "<id>", target_name: "newName" })
# 2. Apply rename across ALL files (definition + every reference)
apply_rename({ symbol_id: "<id>", new_name: "newName" })
apply_rename updates the definition, imports, re-exports, call sites, JSX usages, and tests in one atomic operation.
extract_function({
file_path: "src/foo.ts",
start_line: 42,
end_line: 67,
new_name: "computeTotals"
})
Let trace-mcp handle the variable capture analysis — manual extraction routinely misses closure variables.
register_edit on each edited file to reindexget_complexity_report again to confirm the reductionget_tests_for the changed symbols — run themcheck_quality_gates with scope: "changed" to verify no regressionsSafe 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.
---name: trace-mcp-refactoringdescription: Safe refactoring workflow using trace-mcp — assess risk, find candidates, check impact, and rename symbols…---# skills/trace-mcp-refactoring/SKILL.md常見問題
從發布者下載 skills/trace-mcp-refactoring/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/nikolai-vysotskyi/trace-mcp。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。