- name
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/nikolai-vysotskyi/trace-mcp/tree/HEAD/skills/trace-mcp-codemodFrom the publisher
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.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.
---name: trace-mcp-codemoddescription: Use trace-mcp apply_codemod for any bulk mechanical change instead of repeated Edit calls. Activate whenever…---# skills/trace-mcp-codemod/SKILL.mdFAQ
Download skills/trace-mcp-codemod/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/nikolai-vysotskyi/trace-mcp.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.