refactor

Analyze Go and frontend codebases to identify refactoring opportunities and rationale.

5|2|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/thoreinstein/opencode-config --skill refactor-thoreinstein
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/thoreinstein/opencode-config/tree/main/skill/refactor
Command: npx skills add https://github.com/thoreinstein/opencode-config --skill refactor-thoreinstein

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers reduce technical debt by systematically identifying refactoring opportunities and providing rationales for each suggested change.

Core Features & Use Cases

  • Automated smells detection: Identify duplication, complex conditionals, and tight coupling, with suggested refactor patterns.
  • Dependency and blast-radius assessment: Map dependencies and potential impact to guide safe changes.
  • Documentation-ready output: Produce actionable recommendations suitable for team discussions and PR reviews.

Quick Start

Run the refactor analysis on a target file, directory, or function to receive a prioritized list of refactor opportunities and justifications.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I identify code refactoring opportunities in a Go project?

To identify code refactoring opportunities in a Go project, analyze codebases for duplication, complexity, and coupling. This maps dependencies and call sites to evaluate blast radius and propose structured refactor patterns.

What is the best way to assess blast radius for frontend code refactoring?

Assessing blast radius for frontend code refactoring involves mapping dependencies and potential impact across files and packages. This evaluates the safety of changes and generates actionable guidance for code reviews.

How do I detect code smells and tight coupling in my codebase?

Detect code smells and tight coupling by analyzing files, packages, and functions for complex conditionals and duplication. This identifies refactoring opportunities and suggests appropriate patterns to reduce technical debt.

Can I generate documentation for code reviews from refactoring recommendations?

Yes, you can generate documentation for code reviews by producing actionable recommendations and justifications for suggested refactors. This output is structured specifically to support team discussions and PR reviews.

What are the limitations of automated refactor analysis for complex codebases?

Automated refactor analysis for complex codebases is limited to evaluating Go and frontend projects. It focuses strictly on dependency mapping and pattern proposal, requiring developer oversight to implement the generated guidance.