/code-quality-refactoring:review-and-refactorfrom code-quality-refactoring
Reviews project code against repository instructions, identifies maintainability issues, and applies focused behavior-preserving refactorings in place. Validates tests when available.
Ships in code-quality-refactoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Review the project like a senior maintainer: load repository guidance, inspect code for maintainability defects, apply focused refactorings in place, and validate the existing test suite when available.
.github/instructions/*.md and .github/copilot-instructions.md when they exist..github/instructions/*.md and .github/copilot-instructions.md.| Area | Improve when | Preserve |
|---|---|---|
| Naming | A name hides intent, mixes domains, or requires comments to explain | Public names consumed outside the edited unit unless migration is requested |
| Control flow | Nested conditionals, duplicated branches, or early error cases obscure the main path | Error semantics, ordering side effects, and short-circuit behavior |
| Duplication | Same calculation, validation, or mapping appears in multiple places | Deliberate duplication that isolates unrelated modules |
| Boundaries | A function has mixed abstraction levels or unrelated responsibilities | Existing file boundaries and module exports |
| Data handling | Transformations are implicit, repeated, or untyped where the language supports types | Wire formats, config keys, database schema, and persisted values |
| Tests | Behavior lacks coverage for the changed branch and tests already exist nearby | Test style, fixtures, naming conventions, and runner |
| Anti-pattern | Why it is wrong | Safer alternative |
|---|---|---|
| Architecture churn | Moving files or splitting modules creates review noise and hidden breakage | Refactor within existing files unless explicitly authorized |
| Opportunistic feature work | New behavior makes validation ambiguous | Keep behavior unchanged and note future improvements separately |
| Style-only mass rewrite | Formatting unrelated lines hides the meaningful diff | Touch only code needed for the refactor |
| Ignoring instructions | Repository rules may override generic clean-code preferences | Load .github/instructions/*.md and .github/copilot-instructions.md first |
| Untested semantic change | A refactor that changes behavior is a bug unless requested | Run targeted tests or document the absence of validation |
## Review and refactor result
**Status:** complete | blocked
**Scope:** <files or project area reviewed>
**Instructions read:** `.github/instructions/*.md` <found/missing>, `.github/copilot-instructions.md` <found/missing>
### Changes made
| File | Refactor | Behavior impact |
| --- | --- | --- |
| `<path>` | <maintainability improvement> | none | <intentional change if requested> |
### Validation
| Command | Result | Evidence |
| --- | --- | --- |
| `<command or "not available">` | pass | fail | not run | <summary> |
### Notes
- <intentional non-change, blocker, or follow-up>
.github/instructions/*.md and .github/copilot-instructions.md were read when present.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-review, refactoring, maintainability, code-cleanup, best-practices
npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin code-quality-refactoring9 skills in this plugin
/dotnet-design-pattern-reviewReview C# and .NET code for design pattern quality, SOLID principles, dependency injection, repository/provider abstractions, ResourceManager usage, async practices, testability, and maintainability. Use this skill when asked for a .NET or C# design pattern review, architecture critique, or pattern-focused code review without modifying code./editorconfigGenerate or update a comprehensive .editorconfig from repository file types and formatting preferences, including indentation, line endings, charset, whitespace, final newline, language globs, and rule-by-rule explanations. Use when asked to create, standardize, or explain EditorConfig./em-dashReview and rewrite code, comments, documentation, and data files to avoid em dashes and en dashes by default. Use this skill when the user asks to remove em dashes, replace Unicode dashes with hyphens, review punctuation in code comments, or enforce ASCII-safe punctuation./quality-playbookRun a complete quality engineering audit on any codebase. Derives behavioral requirements from the code, generates spec-traced functional tests, runs a three-pass code review with regression tests, executes a multi-model spec audit (Council of Three), and produces a consolidated bug report with TDD-verified patches. Finds the 35% of real defects that structural code review alone cannot catch. Works with any language. Trigger on 'quality playbook', 'spec audit', 'Council of Three', 'fitness-to-purpose', or 'coverage theater'./refactorImprove existing code through surgical behavior-preserving refactoring. Use this skill when code is hard to understand or maintain, functions or classes are too large, code smells need addressing, adding features is difficult due to structure, or the user asks to clean up, refactor, or improve code without changing behavior./refactor-method-complexity-reduceRefactor a specified method to reduce cognitive complexity to a requested threshold or below by extracting focused helper methods while preserving behavior. Use when the user asks to reduce method complexity, simplify nested conditionals, split large if-else or switch chains, extract validation or type-specific handlers, and verify tests show failed=0.Other plugins' skills for the same job