jscpd | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / tools / jscpd

jscpd

maintained by knoopx

star 2 account_tree 0 verified_user MIT License
bolt View GitHub

name: jscpd description: Find duplicate code blocks and analyze duplication metrics across files. Use when identifying copy-pasted code, measuring technical debt, or preparing for refactoring.

jscpd

Duplicate code detector supporting 150+ languages.

Usage

# Analyze directory
npx jscpd /path/to/source

# With pattern filter
npx jscpd --pattern "src/**/*.js" .

# Ignore directories
npx jscpd --ignore "**/node_modules/**,**/dist/**" .

# Minimum tokens to match (default: 50)
npx jscpd --min-tokens 30 .

# Output formats
npx jscpd --reporters json --output report.json .
npx jscpd --reporters html --output ./report/ .

Common Options

Option Description
--min-tokens N Minimum tokens for duplicate detection
--min-lines N Minimum lines for duplicate detection
--threshold N Fail if duplication % exceeds threshold
--ignore "glob" Ignore patterns (comma-separated)
--reporters type Output format: console, json, html
--output path Output directory for reports
--silent Suppress console output

Workflow

  1. Run jscpd to find duplicates
  2. Review the reported duplicates
  3. Refactor to eliminate duplication
  4. Re-run to verify cleanup

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 2
GitHub Forks 0
Created Jan 2026
Last Updated 5个月前
tools tools automation tools

Related Skills

fabric
chevron_right
specs-gen
chevron_right
typescript-expert
chevron_right
break-loop
chevron_right
burp-suite
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.