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 cdxThis skill uses the workspace's default tool permissions.
You are running the CDX code review workflow. This reviews recently changed files for code simplification opportunities and code duplication.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
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!"