refactor

Analyze code against core principles and generate an incremental refactoring plan.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/tachiiri-org/agent-ops --skill refactor-tachiiri-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/tachiiri-org/agent-ops/tree/main/.codex/skills/refactor
Command: npx skills add https://github.com/tachiiri-org/agent-ops --skill refactor-tachiiri-org

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining code quality and alignment with established principles by providing a structured approach to refactoring. It ensures that code changes are deliberate, well-planned, and adhere to project-wide guidelines.

Core Features & Use Cases

  • Principle-Driven Refactoring: Guides refactoring efforts based on core principles, role-specific guidelines, and domain constraints.
  • Contextual Analysis: Gathers project context through an onboarding skill and analyzes the current state against defined principles and profiles.
  • Incremental Planning & Implementation: Develops a minimal, step-by-step refactoring plan for user approval before incremental implementation.
  • Use Case: A developer needs to refactor a complex module to improve its adherence to SOLID principles. This Skill will help them analyze the current code against the project's principles, identify violations, and create a safe, incremental plan for the refactoring.

Quick Start

Use the refactor skill to analyze the current codebase against core principles and generate a refactoring plan.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I plan code refactoring to align with established software design principles?

Principle-aligned refactoring analyzes your codebase against core principles and role-specific guidelines to identify violations, then produces a minimal, step-by-step refactoring plan for approval before incremental changes are implemented.

What is the safest way to implement incremental refactoring without breaking existing functionality?

Incremental refactoring is safest when driven by a pre-approved, minimal plan that implements changes step-by-step using matching workflows, ensuring code quality is maintained throughout the process.

How can I check my codebase for violations of SOLID principles before starting a large refactor?

Contextual analysis gathers project context and evaluates the current state against defined core principles and domain constraints, identifying specific violations and architectural risks prior to planning the refactor.

Does principle-driven refactoring require an onboarding context to analyze code quality?

Yes, the refactoring process integrates onboarding context to gather project constraints and guidelines, which is necessary to accurately analyze the current state against domain-specific principles before planning.

When should I avoid automated code refactoring plans for complex software design changes?

You should avoid automated refactoring when you cannot define core principles or domain constraints, as the process relies on analyzing your code against these specific guidelines to produce a safe, approved implementation plan.