Source profileQuality 85/100

nikolai-vysotskyi/trace-mcp/skills/trace-mcp-codemod/SKILL.md

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.

Source repository stars
95
Declared platforms
0
Static risk flags
0
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

applycodemod 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.

Best for

  • Adding async/await to a set of functions
  • Updating a function signature everywhere it is called
  • Fixing import paths after a move

Not for

  • Using Edit with replaceall for renames — use applyrename (see trace-mcp-refactoring).
  • Chaining 3–10 Edit calls with the same oldstring pattern shape — use applycodemod.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/nikolai-vysotskyi/trace-mcp --skill "skills/trace-mcp-codemod"
Safe inspection promptEditorial

Inspect the Agent Skill "trace-mcp-codemod" from https://github.com/nikolai-vysotskyi/trace-mcp/blob/a3b3c3eb88e1398d2b5f69342da7f98714658bdf/skills/trace-mcp-codemod/SKILL.md at commit a3b3c3eb88e1398d2b5f69342da7f98714658bdf. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Standard Workflow

    Review the preview: matched files, context lines, and replacement correctness. Look for false positives.

    registeredit is not needed for codemods — applycodemod handles reindexing internally.Run the test suite or checkqualitygates with scope: "changed".Review the preview: matched files, context lines, and replacement correctness. Look for false positives.
  2. 02

    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 applycodemod. This includes:

    Adding async/await to a set of functionsUpdating a function signature everywhere it is calledFixing import paths after a move
  3. 03

    1. Preview with dry run (default)

    Review the preview: matched files, context lines, and replacement correctness. Look for false positives.

    Review the preview: matched files, context lines, and replacement correctness. Look for false positives.
  4. 04

    2. Narrow scope when needed

    Use filtercontent to only touch files that also contain a second marker:

    Use filtercontent to only touch files that also contain a second marker:For patterns that cross line boundaries, enable multiline mode:

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score85/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars95SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
nikolai-vysotskyi/trace-mcp
Skill path
skills/trace-mcp-codemod/SKILL.md
Commit
a3b3c3eb88e1398d2b5f69342da7f98714658bdf
License
MIT
Collected
2026-08-04
Default branch
master
View the original SKILL.md

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:

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.

Anti-Patterns to Avoid

  • Using Edit with replace_all for renames — use apply_rename (see trace-mcp-refactoring).
  • Chaining 3–10 Edit calls with the same old_string pattern shape — use apply_codemod.
  • Skipping the dry-run preview — always review matches first.
  • Forgetting confirm_large: true on changes >20 files.

Alternatives

Compare before choosing

Computed 10023,781

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 10014,225

wanshuiyin/Auto-claude-code-research-in-sleep

citation-audit

Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.

Computed 1004,922

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 1002,504

aaron-he-zhu/aaron-marketing-skills

social-selling-planner

Use when the user asks to "set up my founder social-selling routine", "build a daily engagement block for target accounts", or "turn funding / hiring signals into selling plays"; produces the founder/seller daily operating block — a time-boxed engagement-block spec (substantive value-add comments on target-account posts, never a pitch), warm-touch-before-ask cadence rules, trigger-response plays consuming the social-pulse-monitor B2B trigger watchlist (funding / hiring / launch signals), and a q