Help us improve
Share bugs, ideas, or general feedback.
From cdx
Review recent code changes for simplicity, clarity, and duplication. Runs the project's simplifier agent and jscpd duplication detection on changed files. Use when user says: "review changes", "review code", "check my code", "run review", "code review", or "cdx review".
npx claudepluginhub deviantony/claude-plugins --plugin cdxHow this skill is triggered — by the user, by Claude, or both
Slash command
/cdx:reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are running the CDX code review workflow. This reviews recently changed files for code simplification opportunities and code duplication.
Reviews git diffs or changed files for reuse, quality, efficiency, clarity; applies optional high-confidence, behavior-preserving simplifications.
Reviews git diffs for reuse opportunities, quality issues, and inefficiencies using three parallel agents, then fixes issues. Triggers on 'simplify', 'clean up', or after code changes.
Code review with semantic diffs, expert routing by file type, and auto-task creation for critical issues. Works on staged changes, files, or PRs.
Share bugs, ideas, or general feedback.
You are running the CDX code review workflow. This reviews recently changed files for code simplification opportunities and code duplication.
Determine what files have changed:
Find the diff base:
git branch --show-currentmain or master: use HEAD~1 as the basegit merge-base main HEAD (fall back to git merge-base master HEAD)Collect changed files:
git diff --name-only <base>...HEADgit diff --name-only --cachedgit diff --name-onlyCombine and deduplicate the file lists. Filter out deleted files (verify each file exists).
If no files changed: Inform the user "No changed files found. Nothing to review." and stop.
Report the list of changed files to the user before proceeding.
.claude/agents/*-simplifier.md/cdx:setup to generate them.".jscpd-*.json in the project root/cdx:setup to set up jscpd."Run the available checks. Use the Task tool to run them in parallel where possible.
For each discovered simplifier agent:
general-purpose agent with the following prompt:
For each discovered jscpd config:
jscpd --config <config-path> . 2>&1 || true
|| true ensures we capture output even if jscpd exits with non-zero (which it does when duplicates are found)If jscpd is not installed (which jscpd fails), skip this step and note it in the output.
Format and present the combined results:
## Code Review Results
### Code Simplifier
[Summary from each simplifier agent — what files were reviewed, what simplifications were suggested]
### Duplication Check (advisory)
[jscpd output for each config]
Note: Duplication findings are advisory and non-blocking. Not all duplication warrants
extraction — consider whether the duplicated code shares genuine intent before refactoring.
If no simplifier agents were found, show only the duplication results (or vice versa).
If neither tool was available, explain what's missing and suggest running /cdx:setup.
Use AskUserQuestion to let the user decide what to do:
Build the options list dynamically based on what was found:
If neither the simplifier nor jscpd had findings, skip this step and congratulate the user: "All checks passed. Code looks clean!"