Skip to main content
skill CX Codex

code-refactor-review — Claude Code skill: review changes

The code-refactor-review skill examines diffs and PRs for reuse, clear boundaries, and fit with the surrounding codebase. Use it when a refactor needs a close review.

no license 181 installs ★ 107 updated 2026-10-05

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jnsahaj/skills --skill code-refactor-review -a claude-code
Open on GitHub

What code-refactor-review does

The skill begins with the complete change set, using git diff for unstaged work and git diff HEAD when staged files are involved. For a pull request, it traces changed files through the feature before judging individual lines. It also searches nearby code for existing utilities, components, hooks, naming, and error-handling patterns.

Its review covers duplicated logic, vague shared helpers, one-off types, excessive callbacks, effects, memoization, and unrelated diff churn. React and Next.js checks include derived state, event handling, component boundaries, and independent server work that could follow an existing concurrent pattern.

The result starts with clean, mostly clean, or needs cleanup, followed by findings that name the file area, the inconsistency, a reusable local pattern, and the smallest fix. A reuse claim should follow an actual codebase search; without that step, the review can mistake unfamiliar code for duplication.

What it helps with

  • review a full pull request diff
  • spot duplicated helpers and UI patterns
  • question unnecessary effects and memoization
  • check new code against neighboring conventions
  • reduce unrelated refactor churn

Example prompts for the agent

  • Review the current changes with git diff and look for code that should reuse existing patterns.
  • Inspect this PR for duplicated logic, weak component boundaries, and inconsistent naming.
  • Review the React and Next.js changes, focusing on effects, state ownership, and unnecessary wrappers.

How to install code-refactor-review

1Skills CLI (Vercel)

npx skills add jnsahaj/skills --skill code-refactor-review -a claude-code

2Manually: put the files in place

~/.claude/skills/code-refactor-review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/code-refactor-review/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about code-refactor-review

How do I install code-refactor-review in Claude Code?

Run npx skills add jnsahaj/skills --skill code-refactor-review -a claude-code, then check ~/.claude/skills/code-refactor-review/SKILL.md.

What does code-refactor-review do?

It reviews diffs and pull requests for duplicated code, poor composition, unnecessary indirection, and mismatches with local project patterns. It returns a short verdict followed by actionable findings.

What does it inspect in React and Next.js code?

It checks for redundant state, effects used for derived values, unjustified useMemo or useCallback, awkward component boundaries, and avoidable sequential server work.

Similar skills

All skills for Code review and refactoring →

From the same set6

Project sponsors

Companies that keep this analytics open