code-duplication

Detect and quantify exact, structural, and pattern duplicates across mixed-language codebases.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/artsmc/codex-agentic --skill code-duplication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-duplication
Source: https://github.com/artsmc/codex-agentic/tree/main/skills/code-duplication
Command: npx skills add https://github.com/artsmc/codex-agentic --skill code-duplication

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Helps teams identify and quantify code duplication across a codebase, enabling targeted refactoring and reduced maintenance costs.

Core Features & Use Cases

  • Exact, structural, and pattern-based duplicate detection across multiple languages.
  • Automated metrics, heatmaps, and executive summaries to prioritize fixes.
  • Generated reports (markdown/json) with actionable refactoring suggestions.

Quick Start

Run the code-duplication workflow on your repository to generate a detailed report.

Frequently Asked Questions about code-duplication

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

FAQPage Schema
How do I detect code duplication across a multi-language repository?

Code duplication detection scans mixed-language repositories to identify exact, structural, and pattern duplicates, producing a structured report with per-file heatmaps and top offenders to prioritize refactoring.

What is the difference between exact, structural, and pattern code duplication?

Code duplication analysis identifies exact duplicates as identical text, structural duplicates as matching syntax trees, and pattern duplicates as recurring semantic logic, quantifying each type to guide targeted refactoring.

Can I analyze code duplication in Python, JavaScript, TypeScript, Java, and Go projects?

Code duplication analysis supports mixed-language repositories containing Python, JavaScript, TypeScript, Java, Go, and other common languages, allowing per-file and per-project duplication scanning.

How do I generate a code quality report with refactoring suggestions for duplicated code?

Code quality reporting generates markdown or JSON outputs containing executive summaries, per-file heatmaps, and actionable refactoring suggestions based on identified code duplication metrics.

How do I exclude specific files or directories from code duplication analysis?

Code duplication analysis provides configurable exclusion and include patterns, along with an incremental mode, to scope scans and skip irrelevant files or directories within the codebase.

What's the best way to export code duplication metrics for external reporting?

Code duplication metrics can be exported using optional CSV export functionality, alongside standard markdown and JSON reports, to integrate duplication data into external tracking systems.