# Refactor

> Use this tool when you need to perform bulk code transformations or refactor large codebases with precision, as it solves problems like large-scale code migrations and API updates through regex-based search and replace operations. It takes in regex patterns, file filters, and context parameters as inputs and outputs transformed code files or file locations with matched patterns. Use it in contexts where automated code refactoring is necessary, such as updating legacy codebases or building AI assistants with programmatic code transformation capabilities.

Canonical page: https://skillsregistry.net/skills/myuon-refactor  
JSON: https://api.skillsregistry.net/v1/skills/myuon-refactor

## Description

This MCP server provides code refactoring capabilities through regex-based search and replace operations across file systems, enabling AI agents to perform bulk code transformations with pattern matching and context filtering. Built using TypeScript with the Model Context Protocol SDK, glob for file discovery, and Zod for validation, it offers two core tools: code_refactor for executing search-and-replace operations with optional context patterns to limit scope, and code_search for finding code patterns and returning file locations with grouped line numbers. The implementation supports glob patterns for file filtering, directory-based searches, regex capture groups for complex replacements, and context-aware filtering to target specific code sections like import blocks, making it valuable for large-scale code migrations, API updates, refactoring legacy codebases, and building AI assistants that need programmatic code transformation capabilities across multiple files without manual find-and-replace operations.

## Trust

- **Trust score (0–1):** 0.93
- **Verification tier:** verified
- **Last scanned:** 2026-09-19

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** ai-ml
- **Updated:** 2026-09-19

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/myuon-refactor)
- **Repository:** <https://github.com/myuon/refactor-mcp>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "myuon-refactor"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/myuon-refactor` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/myuon-refactor/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
