trace-mcp-codemod

trace-mcp-codemod is a skill for Claude Code from nikolai-vysotskyi/trace-mcp. It costs 46 tokens per session (753 once invoked), scanned A, original, MIT.

A workflow for applying one repeated, mechanical code change across files with a codemod tool.

In plain words
What is it for?
It helps with repeated refactors such as renaming functions, changing signatures, updating imports, or replacing deprecated APIs.
Why use it?
It reduces repetitive manual edits and provides a dry-run preview to catch incorrect matches before changing files.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the trace-mcp plugin — 4 skills, 2 hooks, 1 MCP server shipped together

Good fit It helps with repeated refactors such as renaming functions, changing signatures, updating imports, or replacing deprecated APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nikolai-vysotskyi/trace-mcp/trace-mcp-codemod
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod
Clone the repo
git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp

Made for: Claude Code.

Or install trace-mcp, the plugin that ships this one along with the rest of its 4 skills, 2 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trace-mcp-codemod

README.md
[![agentmods](https://agentmods.dev/badge/skills/nikolai-vysotskyi/trace-mcp/trace-mcp-codemod/github.svg)](https://agentmods.dev/skills/nikolai-vysotskyi/trace-mcp/trace-mcp-codemod)
Your own site
<a href="https://agentmods.dev/skills/nikolai-vysotskyi/trace-mcp/trace-mcp-codemod"><img src="https://agentmods.dev/badge/skills/nikolai-vysotskyi/trace-mcp/trace-mcp-codemod/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trace-mcp-codemod

Your own site · 80×15
<a href="https://agentmods.dev/skills/nikolai-vysotskyi/trace-mcp/trace-mcp-codemod"><img src="https://agentmods.dev/badge/skills/nikolai-vysotskyi/trace-mcp/trace-mcp-codemod.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 753 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00753
Opus 5 $0.00023 $0.00377
Sonnet 5 $0.00009 $0.00151
Haiku 4.5 $0.00005 $0.00075

Measured 11d ago against content hash b71dbf00ffe2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

trace-mcp-codemod scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/trace-mcp-codemod/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

trace-mcp — Codemod Workflow

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.

When to Use — HARD RULE

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:

  • Adding async/await to a set of functions
  • Updating a function signature everywhere it is called
  • Fixing import paths after a move
  • Adding or removing keywords/decorators
  • Wrapping calls in a logger, try/catch, or feature flag
  • Replacing a deprecated API usage
  • Any regex-replaceable refactor

No exceptions. "It's just three edits" is still a violation — use apply_codemod.

Standard Workflow

1. Preview with dry run (default)

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.

2. Narrow scope when needed

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
})

3. Apply the change

apply_codemod({ ..., dry_run: false })

If more than 20 files are affected, add confirm_large: true.

4. Reindex and verify

  • register_edit is not needed for codemods — apply_codemod handles reindexing internally.
  • Run the test suite or check_quality_gates with scope: "changed".

Planning Larger Changes

For changes that span packages or require version awareness (e.g. upgrading a dependency), use plan_batch_change first:

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 97 lines · 46 tokens per session scan A b71dbf00ffe2

Subscribe to this mod's changes

trace-mcp-codemod is a skill published in the GitHub repository nikolai-vysotskyi/trace-mcp (175 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 753 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

modernization-flow

Workflow for converting, modernizing, upgrading, or re-architecting code (e.g. C++→Java, monolith→microservices), etc.

griddynamics/rosetta · 36 tokens

lsp-cross-repo

Cross-repository analysis — find all callers of a library symbol in one or more consumer repos. Use when refactoring a shared library and need to understand how consumers use it.

blackwell-systems/agent-lsp · 41 tokens

lsp-implement

Find all concrete implementations of an interface or abstract type. Use when you need to know what types satisfy an interface, or what subtypes exist before changing a base type.

blackwell-systems/agent-lsp · 39 tokens

m1nd-operator

Use when the user mentions m1nd or when repo investigation, search, review, docs/spec work, or risky change prep should go through m1nd first before grep, glob, or manual file reads. Covers m1nd-first routing, L1GHT and universal document ingestion, risky edit preparation, document-to-code binding, the served owner +…

maxkle1nz/m1nd · 111 tokens

m1nd-first

Use when investigating a repository, searching for implementation, reviewing changes, working from specs/docs, or preparing a risky code change in an environment where m1nd is available. This doctrine makes m1nd the first investigative layer before grep, glob, or manual file reads, except when the task is pure…

maxkle1nz/m1nd · 78 tokens

entity-design

Design EF Core entities with navigation properties, value objects, Fluent API configuration, and audit fields. Use when creating new database entities, adding relationships, configuring owned types, designing a domain model for Entity Framework Core, or setting up table-per-hierarchy inheritance.

andresharpe/dotbot · 54 tokens