review-and-refactor

Review repository code against engineering guidelines and refactor while preserving files.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/selfagency/agentsy --skill review-and-refactor-selfagency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-and-refactor
Source: https://github.com/selfagency/agentsy/tree/main/.agents/skills/review-and-refactor
Command: npx skills add https://github.com/selfagency/agentsy --skill review-and-refactor-selfagency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you reduce technical debt and improve code quality by systematically reviewing existing project code and refactoring it to match established standards.

Core Features & Use Cases

  • Guideline-driven review: Evaluates coding instructions from .github/instructions/*.md and .github/copilot-instructions.md to ensure changes align with the team’s standards.
  • Maintainability-first refactoring: Refactors for clarity, cleanliness, and best practices without changing the existing file structure.
  • Preserves correctness: Checks that tests still pass when the project includes a test suite.

Quick Start

Ask the AI to review and refactor the repository by following the instructions in .github/instructions/*.md and .github/copilot-instructions.md, making maintainable improvements while keeping all existing files intact and ensuring tests pass.

Frequently Asked Questions about review-and-refactor

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

FAQPage Schema
How do I refactor existing code to match my team's engineering guidelines?

To refactor code against engineering guidelines, this Skill reviews repository files and applies targeted improvements based on instructions defined in `.github/copilot-instructions.md`. It ensures maintainability by preserving the existing file structure while making clarity improvements.

What is maintainability-first code refactoring and when do I need it?

Maintainability-first refactoring improves code clarity and cleanliness without altering existing file structures. You need it for long-lived codebases that require ongoing maintenance and strict adherence to team standards across existing modules to reduce technical debt.

Does code refactoring preserve my existing tests and file structure?

Code refactoring preserves your existing file structure entirely and verifies that project tests still pass. It focuses on making maintainable improvements within the current modules rather than reorganizing your project layout or modifying test suites.

How do I set up engineering guidelines for automated code review?

To set up engineering guidelines for automated code review, define your team's coding standards in `.github/instructions/*.md` and `.github/copilot-instructions.md` files. The Skill evaluates repository code against these defined instructions during the refactoring process.

Can I use this for maintaining a large legacy codebase?

Yes, this is designed for long-lived codebases that require ongoing maintenance and cleanliness. It systematically reviews existing project code and applies targeted refactoring to ensure adherence to established team standards across all existing modules.

What are the limitations of automated code refactoring?

Automated code refactoring focuses on clarity and best practices without changing existing file structures. If your project lacks a test suite, the Skill cannot verify correctness, and it restricts modifications to preserve your current project layout.