# Refactoring

> Use this tool when you need to improve code quality, simplify complex conditionals, or reorganize data structures, as it provides a comprehensive catalog of 71+ refactoring patterns with a pluggable architecture supporting multiple programming languages, including Python. It solves problems related to code maintainability, readability, and performance, and accepts code inputs to produce refactored code outputs in a token-efficient format. Ideal for use in software development and maintenance projects where code optimization is crucial.

Canonical page: https://skillsregistry.net/skills/marshally-refactoring  
JSON: https://api.skillsregistry.net/v1/skills/marshally-refactoring

## Description

Provides access to Martin Fowler's comprehensive refactoring catalog through a pluggable, language-agnostic architecture. Includes 71+ refactoring patterns organized into categories like composing methods, moving features, organizing data, simplifying conditionals, and dealing with generalization. Features preview mode for safe code analysis and token-efficient TOON output format. Currently supports Python with planned support for Ruby, Java, and Go.

## Trust

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

## Facts

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

## Source

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

## 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": "marshally-refactoring"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/marshally-refactoring` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/marshally-refactoring/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
