/trace-mcp:trace-mcp-codemodfrom trace-mcp
Uses trace-mcp apply_codemod for bulk mechanical changes instead of repeated Edit calls. Activates when the same edit pattern is applied 2+ times.
Ships in trace-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
apply_codemod is the correct tool for any repeated mechanical change. Using Edit for the same pattern twice or more is a waste of tokens and is error-prone.
If you are about to make the same kind of change 2 or more times — whether in one file or across many — stop and use apply_codemod. This includes:
async/await to a set of functionsNo exceptions. "It's just three edits" is still a violation — use apply_codemod.
apply_codemod({
pattern: "oldFunction\\(",
replacement: "newFunction(",
file_pattern: "src/**/*.ts",
dry_run: true // default
})
Review the preview: matched files, context lines, and replacement correctness. Look for false positives.
Use filter_content to only touch files that also contain a second marker:
apply_codemod({
pattern: "extractNodes\\(",
replacement: "extractNodes(ctx, ",
file_pattern: "src/**/*.ts",
filter_content: "import.*extractNodes",
dry_run: true
})
For patterns that cross line boundaries, enable multiline mode:
apply_codemod({
pattern: "function\\s+foo\\([^)]*\\)\\s*\\{",
replacement: "async function foo() {",
multiline: true,
dry_run: true
})
apply_codemod({ ..., dry_run: false })
If more than 20 files are affected, add confirm_large: true.
register_edit is not needed for codemods — apply_codemod handles reindexing internally.check_quality_gates with scope: "changed".For changes that span packages or require version awareness (e.g. upgrading a dependency), use plan_batch_change first:
plan_batch_change({
package: "lodash",
from_version: "4.17.0",
to_version: "5.0.0"
})
This returns an impact report with all affected files and import references. Combine it with apply_codemod for the actual rewrite.
Edit with replace_all for renames — use apply_rename (see trace-mcp-refactoring).Edit calls with the same old_string pattern shape — use apply_codemod.confirm_large: true on changes >20 files.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
bulk-refactoring, codemod, mechanical-changes, automation, edit-pattern
4 skills in this plugin
/trace-mcpUse 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./trace-mcp-pre-commitRun 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./trace-mcp-refactoringSafe 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.Generated from the plugin's indexed repository (nikolai-vysotskyi/trace-mcp) — no native marketplace selected
npx claudepluginhub p/nikolai-vysotskyi-trace-mcpOther plugins' skills for the same job