reviewing-duplication

Detect duplicate and copy-pasted code in JavaScript and TypeScript projects.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/djankies/claude-configs --skill reviewing-duplication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reviewing-duplication
Source: https://github.com/djankies/claude-configs/tree/main/review/skills/reviewing-duplication
Command: npx skills add https://github.com/djankies/claude-configs --skill reviewing-duplication

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jsinspect, lizard, and includes scripts (resource) components.

What problem does it solve?

This Skill provides automated duplication detection commands and manual search patterns to identify copy-paste and near-duplicate code across a codebase.

Core Features & Use Cases

  • Automated duplication detection with jsinspect (or fallback to Lizard).
  • Manual patterns for config objects, validation logic, and data transformation.
  • Refactoring guidance to extract functions/utilities and reduce boilerplate.

Quick Start

Run the duplication script to find duplicate blocks across the project.

Frequently Asked Questions about reviewing-duplication

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect duplicate code in my JavaScript or TypeScript project?

Duplicate code detection uses automated tools like jsinspect to scan your codebase and identify copy-pasted or near-duplicate blocks. The Skill runs duplication detection across your project, outputting file locations, line numbers, similarity percentages, and the actual duplicated code blocks for review.

What's the best way to find copy-pasted code in large codebases?

Automated duplication detection with jsinspect is the fastest approach for large projects. It scans the entire codebase in one pass, finds duplicate blocks across multiple files, and provides similarity scores. Manual patterns are available for specific cases like config objects or validation logic when targeted search is needed.

Can I detect code duplication without additional tools installed?

The Skill uses jsinspect as the preferred detection engine with Lizard as a fallback option. Both are configured as dependencies. If neither is available, manual search patterns using Bash, Grep, and Glob can identify duplication, though they require more effort than automated tools.

How do I reduce code duplication after detecting it?

After duplication detection identifies duplicate blocks, the Skill provides refactoring guidance to extract common logic into shared functions or utilities. This eliminates boilerplate and consolidates repeated patterns into reusable components.

Does duplicate detection work with both configuration and business logic?

Yes. The Skill detects duplication across multiple patterns: configuration objects, validation logic, data transformations, and function signatures. It handles both structural and behavioral duplication across JavaScript and TypeScript files.