refactor

Automate code review, grading, and iterative refactoring for TypeScript branches.

Updated Sep 12, 2021
One-click install
npx skills add https://github.com/cerico/macfair --skill refactor-cerico
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/cerico/macfair/tree/main/files/claude/skills/refactor
Command: npx skills add https://github.com/cerico/macfair --skill refactor-cerico

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the process of reviewing a feature branch, grading its quality, and driving iterative refactors until a minimum quality threshold (90+) is achieved.

Core Features & Use Cases

  • Automated grading: evaluates correctness, test coverage, style, performance, and security considerations, producing a final letter grade.
  • Iterative refactoring: guides targeted code improvements to raise the overall quality score to 90+.
  • Use Case: When a pull request introduces changes that fail quality gates, run this skill to automatically assess and suggest concrete refactors.

Quick Start

Run a code quality review on the current branch to obtain a grade and suggested refactoring steps.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I automate code review and grading for a TypeScript feature branch?

Automated code review for a TypeScript feature branch evaluates correctness, style, test coverage, and security to produce a letter grade. It then guides iterative refactoring to achieve a 90+ quality score before merging.

What is iterative refactoring to pass pull request quality gates?

Iterative refactoring to pass pull request quality gates involves assessing code changes against rigorous checks, outputting a final grade, and providing actionable guidance to modify code until the minimum 90+ quality threshold is met.

Does this code quality skill check preflight hygiene like imports and env vars?

Yes, preflight hygiene checks validate imports, environment variables, and dates alongside TypeScript checks and test coverage to ensure feature branches meet comprehensive quality standards before passing CI workflows.

Can I use automated refactoring in CI workflows to enforce test coverage validation?

Yes, automated refactoring integrates into CI workflows to enforce test coverage validation, TypeScript correctness, and style checks on pull requests, outputting actionable refactor guidance when changes fail quality gates.

What's the best way to raise a code quality score to 90+ on a git branch?

The best way to raise a code quality score to 90+ on a git branch is running an automated grading process that identifies correctness and style issues, then applying targeted iterative refactors guided by the resulting actionable feedback.

Why does my pull request fail code review quality gates despite passing tests?

Pull requests can fail quality gates despite passing tests due to insufficient coverage, TypeScript errors, style violations, or preflight hygiene issues like improper imports or missing environment variable validations.