plan-refactor

Analyze codebases to rank refactoring opportunities and generate Linear issues.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/jamesc/skills --skill plan-refactor-jamesc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plan-refactor
Source: https://github.com/jamesc/skills/tree/main/skills/plan-refactor
Command: npx skills add https://github.com/jamesc/skills --skill plan-refactor-jamesc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill analyzes your codebase to identify areas needing refactoring, improving code quality, maintainability, and architectural alignment, and then plans actionable steps to address these issues.

Core Features & Use Cases

  • Codebase Analysis: Performs a comprehensive review of code metrics, module sizes, test coverage, and potential issues like TODOs or HACKS.
  • Architectural Review: Assesses adherence to principles like Domain-Driven Design (DDD), error handling consistency, and API surface clarity.
  • Prioritized Planning: Ranks refactoring opportunities by impact and generates well-defined issues for agents to address.
  • Use Case: When your codebase feels complex and difficult to work with, use this Skill to get a clear, prioritized roadmap for improving its structure and health.

Quick Start

Use the plan-refactor skill to analyze the entire codebase and suggest refactoring improvements.

Frequently Asked Questions about plan-refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify refactoring opportunities in a complex codebase?

To identify refactoring opportunities, analyze code metrics, module sizes, test coverage, and codebase issues like TODOs. This process assesses architectural alignment and error handling to pinpoint areas needing improvement for better maintainability.

How can I assess my codebase for Domain-Driven Design architectural alignment?

Assessing a codebase for Domain-Driven Design alignment involves reviewing architectural principles, API surface clarity, and dependency structures. This analysis reveals how well current modules align with DDD patterns and where structural adjustments are needed.

What is the best way to plan code refactoring for improved maintainability?

The best way to plan code refactoring is to rank identified opportunities by impact, evaluating code quality and performance metrics. This generates a prioritized roadmap of actionable issues for agents to execute systematically.

Can I generate actionable Linear issues for codebase refactoring tasks?

Yes, you can generate actionable Linear issues for refactoring by ranking codebase analysis findings by impact. This creates well-defined tasks for agents to address architectural misalignments and quality issues directly.

Does code refactoring analysis check API surface clarity and error handling consistency?

Yes, refactoring analysis checks API surface clarity and error handling consistency. It evaluates these dimensions alongside test quality and dependencies to provide a comprehensive view of codebase health and maintainability.