refactoring-assistant

Suggest and guide application of refactoring patterns to improve code quality

509 stars

Best use case

refactoring-assistant is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Suggest and guide application of refactoring patterns to improve code quality

Teams using refactoring-assistant should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/refactoring-assistant/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/code-migration-modernization/skills/refactoring-assistant/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/refactoring-assistant/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How refactoring-assistant Compares

Feature / Agentrefactoring-assistantStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Suggest and guide application of refactoring patterns to improve code quality

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Refactoring Assistant Skill

Suggests appropriate refactoring patterns and guides their application to improve code quality, maintainability, and migration readiness.

## Purpose

Enable guided refactoring for:
- Code quality improvement
- Design pattern application
- Migration preparation
- Technical debt reduction
- Maintainability enhancement

## Capabilities

### 1. Extract Method/Class Suggestions
- Identify extraction candidates
- Suggest method boundaries
- Recommend class decomposition
- Guide interface extraction

### 2. Move Method Recommendations
- Detect misplaced methods
- Suggest target classes
- Analyze dependencies
- Guide safe relocation

### 3. Rename Refactoring
- Suggest meaningful names
- Propagate renames safely
- Handle cross-references
- Update documentation

### 4. Inline Refactoring
- Identify inline candidates
- Remove unnecessary indirection
- Simplify call chains
- Reduce complexity

### 5. Pull Up/Push Down Member
- Analyze inheritance hierarchies
- Suggest member movement
- Optimize class hierarchies
- Improve polymorphism

### 6. Design Pattern Application
- Recognize pattern opportunities
- Guide pattern implementation
- Suggest appropriate patterns
- Validate pattern application

## Tool Integrations

| Tool | Purpose | Integration Method |
|------|---------|-------------------|
| IDE Refactoring | Automated refactoring | CLI / API |
| Sourcery | AI-powered suggestions | CLI |
| Sourcegraph Cody | Code intelligence | API |
| IntelliJ IDEA | Java refactoring | CLI |
| VS Code | Multi-language | Extension API |

## Output Schema

```json
{
  "analysisId": "string",
  "timestamp": "ISO8601",
  "suggestions": [
    {
      "type": "extract-method|move-method|rename|inline|design-pattern",
      "priority": "high|medium|low",
      "target": {
        "file": "string",
        "element": "string",
        "line": "number"
      },
      "description": "string",
      "rationale": "string",
      "steps": ["string"],
      "estimatedImpact": {
        "complexity": "string",
        "maintainability": "string",
        "testability": "string"
      },
      "risks": ["string"]
    }
  ],
  "patterns": {
    "applicable": ["string"],
    "opportunities": []
  }
}
```

## Integration with Migration Processes

- **code-refactoring**: Primary refactoring guidance
- **technical-debt-remediation**: Debt reduction strategies

## Related Skills

- `code-smell-detector`: Identifies refactoring needs
- `codemod-executor`: Automates refactorings

## Related Agents

- `code-transformation-executor`: Executes suggested refactorings

Related Skills

elicit-research-assistant

509
from a5c-ai/babysitter

AI-assisted literature review for question-answering over papers and evidence synthesis

academic-writing-assistant

509
from a5c-ai/babysitter

Skill for assisting with academic and scientific writing

lean-proof-assistant

509
from a5c-ai/babysitter

Interface with Lean 4 proof assistant for formal theorem verification

coq-proof-assistant

509
from a5c-ai/babysitter

Interface with Coq proof assistant for formal verification

soundness-proof-assistant

509
from a5c-ai/babysitter

Assist in constructing type soundness proofs using progress and preservation theorems

amortized-analysis-assistant

509
from a5c-ai/babysitter

Apply amortized analysis techniques including aggregate, accounting, and potential methods

qbr-preparation-assistant

509
from a5c-ai/babysitter

Quarterly Business Review preparation and facilitation skill with agenda and materials generation

containerization-assistant

509
from a5c-ai/babysitter

Assist in containerizing applications with Dockerfile generation and optimization

proof-assistant

509
from a5c-ai/babysitter

Assist in constructing algorithm correctness proofs

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity

babysitter

509
from a5c-ai/babysitter

Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)

yolo

509
from a5c-ai/babysitter

Run Babysitter autonomously with minimal manual interruption.