/cdx:scanfrom cdx
Runs jscpd against the project's per-language configs and reports structured duplication findings. Invoke during code review (cdx:coderev calls this for tool-backed reuse analysis), when checking for copy-paste duplication, or before committing. Reads `.jscpd-<key>.json` configs at the project root; starter configs ship in this skill's `configs/` directory.
Ships in cdx. 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.
Read when SKILL.md points to them.
Deterministic duplication detection. Wraps jscpd against any .jscpd-<key>.json configs at the project root and translates the output into a structured findings table.
Supported keys: go, ts, python, swift.
If invoked with a comma-separated list of changed file paths in args, store it as CHANGED. Use the file extensions to decide which configs to run:
.go → go.ts/.tsx/.js/.jsx/.mjs/.cjs → ts.py → python.swift → swiftIf CHANGED is empty, run every config that exists.
Glob the project root for .jscpd-*.json. If none match the in-scope keys, report no jscpd configs found — copy <skill dir>/configs/<key>.json to the project root as .jscpd-<key>.json and stop. Fill in <skill dir> with the absolute path of the folder that contains this SKILL.md.
Run which jscpd. If missing, report jscpd not installed — install via "pnpm add -g jscpd" and stop.
For each config:
out=$(mktemp -d)
jscpd --config <config> --reporters consoleFull,json --output "$out"
cat "$out/jscpd-report.json"
rm -rf "$out"
The consoleFull reporter gives the user the human-readable diff blocks; the json reporter gives parseable output for the findings table.
If a run errors, capture the message and continue with the next config — never stop the whole scan because one config failed.
Each clone in the report's duplicates array has:
firstFile: { name, start, end }secondFile: { name, start, end }lines, tokens, fragmentFor each clone, build a finding:
high if lines > 50 (significant maintenance burden), otherwise mediumCHANGED is non-empty, mark in diff when either file appears in CHANGED; otherwise pre-existing. If CHANGED is empty, omit the status column.Sort: high before medium; within each priority, in diff before pre-existing.
## Scan Results — Duplication
### Summary
- Configs run: [list]
- Total clones: N (M in diff, K pre-existing) ← omit the parenthesized split if CHANGED was empty
- Configs skipped: [list, with reason] ← omit line if none
### Findings
| # | Pri | Status | File A | Lines A | File B | Lines B | Size | Action |
|---|-----|--------|--------|---------|--------|---------|------|--------|
Action should be a one-line, specific suggestion: typically extract shared helper, consolidate into existing utility at <path>, or merge implementations — pick what fits. Don't write generic advice.
If no clones are found across all in-scope configs, output: ✓ No significant duplication detected across [N] config(s).
When invoked from the cdx:coderev reviewer, it reports the clones that this change introduced as reuse findings.
pre-existing finding without surfacing it — let the user decide what to act onWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub deviantony/claude-plugins --plugin cdx9 skills in this plugin
/coderevPre-PR code review of the current branch, run by an independent reviewer subagent in a fresh context; the main agent then triages its findings on its own, fixes what is worth fixing in a separate commit, and reports what it fixed, skipped and needs the user for. Use proactively, without being asked, right before opening a pull request on the user's own branch: before running `gh pr create`, or when the user says "open a PR", "ready for review", "ship it", "push this up for review". Also invoked manually as `/cdx:coderev`./dev-docsGenerate and maintain a `docs/` directory of markdown developer documentation for a project. Scans source code, writes structured docs with YAML frontmatter for git-based drift tracking, and produces clean markdown that renders on GitHub (including mermaid diagrams). Use this skill when the user asks to generate, create, update, or refresh developer documentation, scan their codebase for documentation purposes, or check whether existing docs have drifted from the code. Also trigger on phrases like "dev docs", "documentation builder", "doc generator", "refresh the docs", "check docs for drift", or "document this codebase". Do NOT trigger for implementation plans, architecture decisions, migration plans, general project planning, code reviews, API reference generation from annotations, or any task that isn't specifically about producing or maintaining a hand-written developer documentation set.