ast-grep Structural Search
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
Replaces repeated hand edits with the trace-mcp apply_codemod tool, previewing matches in a dry run before bulk mechanical changes across one file or many.
$ npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nikolai-vysotskyi/trace-mcp trace-mcp-codemod --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/trace-mcp-codemod .claude/skills/trace-mcp-codemod && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "trace-mcp-codemod" agent skill from https://github.com/nikolai-vysotskyi/trace-mcp/tree/master/skills/trace-mcp-codemod into .claude/skills/trace-mcp-codemod/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trace-mcp-codemod", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nikolai-vysotskyi/trace-mcp/tree/master/skills/trace-mcp-codemodType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nikolai-vysotskyi/trace-mcp trace-mcp-codemod --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/trace-mcp-codemod .agents/skills/trace-mcp-codemod && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "trace-mcp-codemod" agent skill from https://github.com/nikolai-vysotskyi/trace-mcp/tree/master/skills/trace-mcp-codemod into .agents/skills/trace-mcp-codemod/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trace-mcp-codemod", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nikolai-vysotskyi/trace-mcp trace-mcp-codemod --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/trace-mcp-codemod .cursor/skills/trace-mcp-codemod && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "trace-mcp-codemod" agent skill from https://github.com/nikolai-vysotskyi/trace-mcp/tree/master/skills/trace-mcp-codemod into .cursor/skills/trace-mcp-codemod/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trace-mcp-codemod", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nikolai-vysotskyi/trace-mcp.git --path skills/trace-mcp-codemod--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nikolai-vysotskyi/trace-mcp trace-mcp-codemod --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/trace-mcp-codemod .gemini/skills/trace-mcp-codemod && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "trace-mcp-codemod" agent skill from https://github.com/nikolai-vysotskyi/trace-mcp/tree/master/skills/trace-mcp-codemod into .gemini/skills/trace-mcp-codemod/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trace-mcp-codemod", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nikolai-vysotskyi/trace-mcp trace-mcp-codemodInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/trace-mcp-codemod .github/skills/trace-mcp-codemod && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "trace-mcp-codemod" agent skill from https://github.com/nikolai-vysotskyi/trace-mcp/tree/master/skills/trace-mcp-codemod into .github/skills/trace-mcp-codemod/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trace-mcp-codemod", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nikolai-vysotskyi/trace-mcp trace-mcp-codemod --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nikolai-vysotskyi/trace-mcp.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/trace-mcp-codemod .opencode/skills/trace-mcp-codemod && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "trace-mcp-codemod" agent skill from https://github.com/nikolai-vysotskyi/trace-mcp/tree/master/skills/trace-mcp-codemod into .opencode/skills/trace-mcp-codemod/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trace-mcp-codemod", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
trace-mcp-codemodReplaces repeated hand edits with the trace-mcp apply_codemod tool, previewing matches in a dry run before bulk mechanical changes across one file or many.
Whenever the same kind of edit is about to be made twice or more, such as adding async and await to functions, updating a signature at every call site, fixing import paths after a move, wrapping calls in logging or replacing a deprecated API, the agent stops and uses apply_codemod instead of repeated Edit calls. The skill treats this as a hard rule with no exception for small jobs.
The workflow starts with a dry-run preview to spot false positives, narrows scope with a content filter or multiline mode, then applies the change for real, adding a confirmation flag when more than 20 files are affected. Reindexing happens inside the tool, and the agent follows up with the test suite or the quality gates. For package upgrades it uses plan_batch_change first to get an impact report, and renames go to a separate apply_rename tool.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit a577015. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
trace-mcp Codemods loads about 729 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 281 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nikolai-vysotskyi/trace-mcp at commit a577015, republished under its MIT licence (© nikolai-vysotskyi). 281 words, ~729 tokens.
.claude/skills/trace-mcp-codemod/SKILL.md (or your agent's skills folder).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.© nikolai-vysotskyi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/trace-mcp-codemod of nikolai-vysotskyi/trace-mcp.
Open the folder on GitHubat commit a577015
trace-mcp Codemods next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| trace-mcp Codemods this skillnikolai-vysotskyi/trace-mcp | 189 | — | ~729 | Automated safety check: Pass | MIT | |
| ast-grep Structural Searchcode-yeongyu/oh-my-openagent | 70k | — | ~3.3k | Automated safety check: Pass | MIT | |
| Migrate Core Code to Submodulestinyhumansai/openhuman | 42k | — | ~2.6k | Automated safety check: Pass | GPL-3.0 | |
| Graph-Guided Safe Refactoringtirth8205/code-review-graph | 32k | 1 repos | ~332 | Automated safety check: Pass | MIT | |
| ast-grep Codemod Referencewarp-drive-data/warp-drive | 3.2k | — | ~2.6k | Automated safety check: Pass | MIT | |
| Roslynkmrpmorris/Roslynk | 136 | 1 repos | ~3.8k | Automated safety check: Pass | MIT |
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
tinyhumansai/openhuman
Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.
tirth8205/code-review-graph
Plans a refactor from a code dependency graph, previews renames before applying them and checks that the final impact matches the plan.
warp-drive-data/warp-drive
Reference for writing and debugging TypeScript and JavaScript codemods with @ast-grep/napi: parsing, node queries, meta-variables, rule objects and editing.
mrpmorris/Roslynk
How to use the Roslynk MCP tools (mcproslynk) effectively for .NET work.
handsontable/handsontable
Queries a pre-built, Tree-sitter-based code graph of the whole monorepo instead of grepping call chains, for exploring, debugging, refactoring or reviewing code.
nikolai-vysotskyi/trace-mcp
Use trace-mcp tools for code navigation, impact analysis, and framework-aware queries instead of Read/Grep/Glob/Bash.
nikolai-vysotskyi/trace-mcp
Runs trace-mcp security, quality-gate and antipattern checks before a commit or pull request, and builds a symbol-level diff for the PR description.
nikolai-vysotskyi/trace-mcp
Refactors code safely in projects indexed by trace-mcp: assess risk, find candidates, check impact and rename symbols across every file without missing a reference.
nikolai-vysotskyi/trace-mcp
Routes code exploration through trace-mcp's indexed dependency graph, using symbol search, outlines, call graphs and change-impact tools instead of Read, Grep and Glob.
Works with
Categories
Replaces repeated hand edits with the trace-mcp apply_codemod tool, previewing matches in a dry run before bulk mechanical changes across one file or many. Whenever the same kind of edit is about to be made twice or more, such as adding async and await to functions, updating a signature at every call site, fixing import paths after a move, wrapping calls in logging or replacing a deprecated API, the agent stops and uses apply_codemod instead of repeated Edit calls. The skill treats this as a hard rule with no exception for small jobs.
trace-mcp Codemods fits situations like: applying the same code change in many places; updating a function signature at every call site; fixing import paths after moving files; replacing a deprecated API across a repository.
Run `npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a claude-code`. Or copy the skill folder (skills/trace-mcp-codemod in nikolai-vysotskyi/trace-mcp) into .claude/skills/trace-mcp-codemod in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a codex`. Or copy the skill folder (skills/trace-mcp-codemod in nikolai-vysotskyi/trace-mcp) into .agents/skills/trace-mcp-codemod in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nikolai-vysotskyi/trace-mcp --skill trace-mcp-codemod -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trace-mcp-codemod, .gemini/skills/trace-mcp-codemod, .github/skills/trace-mcp-codemod and .opencode/skills/trace-mcp-codemod in your project.
SKILL.md names no scripts, command-line tools or credentials: trace-mcp Codemods is instructions for the agent only. Our summary lists: A connected trace-mcp MCP server.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
trace-mcp Codemods is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 729 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with trace-mcp Codemods: ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Graph-Guided Safe Refactoring (tirth8205/code-review-graph, 32k stars) and ast-grep Codemod Reference (warp-drive-data/warp-drive, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nikolai-vysotskyi (a GitHub user) maintains it in nikolai-vysotskyi/trace-mcp, which has 189 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 11, 2026.
Source: nikolai-vysotskyi/trace-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.