Skip to content
Back to skills

Code Refactor Analyzer

ASecurity

Analyzes codebase for refactoring needs, generates todo reports, and validates completion

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
developmentrefactoringdocumentation

Works with

  • claude code

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill code-refactor-analyzer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Refactor Analyzer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Refactor Analyzer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-code-refactor-analyzer/badge)](https://www.skillsdirectory.com/skills/majiayu000-code-refactor-analyzer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-refactor-analyzer
description: Analyzes codebase for refactoring needs, generates todo reports, and validates completion
---

# Code Refactor Analyzer

This skill helps developers identify code that needs refactoring based on new requirements, generates actionable todo lists, and tracks completion progress.

## Capabilities

- **Requirement Analysis**: Understand user requirements and identify potential code impacts
- **Code Impact Analysis**: Analyze repository to find code lines that may be affected by the requirement
- **Todo Report Generation**: Create structured todo lists with specific code locations and tasks
- **Completion Validation**: Check if previously generated todo items have been completed
- **State Management**: Automatically detects if this is the first use (generate report) or subsequent use (check completion)

## Input Requirements

- **User Requirement**: Description of the new feature, change, or refactoring need
- **Repository Context**: Claude Code should have access to the codebase (via open repository)
- **Optional Parameters**:
  - Specific file paths to focus on
  - Priority levels for tasks
  - Deadline constraints

## Output Formats

- **First Use**: Generates a todo report file at `.claude/code_refactor_report/[requirement]-[date].md`
- **Subsequent Use**: Provides completion validation report showing:
  - Completed items (checked off)
  - Pending items
  - New items that may have been added
- **Interactive Guidance**: Step-by-step suggestions for refactoring

## How to Use

"Analyze the codebase for implementing user authentication and identify what needs to be refactored"
"Check if the todo items from yesterday's refactoring plan have been completed"
"Generate a refactoring plan for migrating from class-based components to functional components"

## Scripts

- `code_analyzer.py`: Main analysis engine that identifies impacted code
- `report_manager.py`: Handles todo report generation and completion validation
- `state_manager.py`: Manages skill state (first use vs subsequent use)

## Best Practices

1. **Clear Requirements**: Provide specific, detailed requirements for better analysis
2. **Repository Access**: Ensure Claude has access to the codebase before using this skill
3. **Incremental Refactoring**: Focus on small, manageable sections rather than entire codebase
4. **Regular Validation**: Use the completion check feature regularly to track progress
5. **Documentation**: Add comments to refactored code explaining the changes

## Limitations

- Requires Claude to have access to the repository files
- Analysis is based on code patterns and may not catch all edge cases
- Cannot automatically fix code - provides guidance only
- Works best with well-structured codebases
- May produce false positives for complex refactoring scenarios

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.