Skip to content
Skills Library
Programming · Review & audit

code-duplication-detection

/code-duplication-detection

Detects duplicated and near-duplicate code across the codebase and suggests consolidation. Use when reviewing for copy-paste code, repeated logic, or DRY violations.

Licence
CC0-1.0
Last repository change
03.06.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 03.06.2026, without references to retired models or APIs.

Licence

CC0-1.0, otwarta.

What it does and when to use it

Detects duplicated and near-duplicate code across the codebase and suggests consolidation. Use when reviewing for copy-paste code, repeated logic, or DRY violations.

Arguments

/code-duplication-detection [path or scope]
Original author description

Detects duplicated and near-duplicate code across the codebase and suggests consolidation. Use when reviewing for copy-paste code, repeated logic, or DRY violations.

How it works

  1. Provide:
  2. Constraints & style:
Original SKILL.md headings · 56 lines, 215 words
SKILL.md preview
---
name: code-duplication-detection
description: Detects duplicated and near-duplicate code across the codebase and suggests consolidation. Use when reviewing for copy-paste code, repeated logic, or DRY violations.
license: CC0-1.0
metadata:
  category: code-quality
allowed-tools: Read Grep Glob Write
disable-model-invocation: true
argument-hint: "[path or scope]"
---

**Target:** $ARGUMENTS

If no target path is given above, review the entire codebase.

---

Examine all the code in our application.

Identify and analyze code duplication in our project. Look for similar looking functions.

Check for:

1. EXACT DUPLICATES
   - Copy-pasted code blocks
   - Identical functions in different files

2. NEAR DUPLICATES
   - Similar logic with different variable names
   - Slightly modified algorithms

3. STRUCTURAL DUPLICATES
   - Similar patterns repeated
   - Boilerplate code

4. DATA DUPLICATION
   - Repeated constants
   - Configuration duplication
   - Schema duplication

For each duplication found:
- Calculate duplication percentage
- Suggest extraction method (function, class, module)
- Provide DRY (Don't Repeat Yourself) solution
- Estimate refactoring effort

In the audit report, recommend a utilities module structure for common functions, including suggested file layout and function groupings.

## Provide:

A structured finding report

A scale of 1/10 on how important each finding is

Remediation: precise code-level fix or config change (snippets welcome) if possible

## Constraints & style:

Be concrete and cite exact code locations and identifiers.

Prefer minimal, drop-in fix snippets over prose.

Do not invent files or functions that aren’t present; if context is missing, mark as Unable to verify and say what code would prove it.

Write this into a markdown file and place it in the audits/ folder.

Versions

The database has no other skills named code-duplication-detection.

Database snapshot: 13.11.2026 · package version d28d889b653c (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100similarity-rs
    Use when you suspect duplicate or near-duplicate Rust code — writing a utility function that might already exist, copy-paste-modifying a function, creating near-duplicate structs or enums, or running `similarity-rs 0.5` with flags like `--threshold`, `--cross-file`, or…
  • 95component-common-domain-detection
    Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic duplicated?", "find common code between services", "what can be consolidated?", "detect shared domain logic", or analyzing component overlap before…
  • 100find-duplication
    Find code duplication in the codebase. Supports two modes - scoped to current branch changes or a full codebase sweep. Use when the user asks to find duplicated code, copy-paste, repeated patterns, or wants to deduplicate before a PR.
  • 84audit-duplication
    Measure duplicated code as clone classes over a change, a path, or the tree, with every instance's file and line range, subtracting replication the repo declares sanctioned. Reports, never gates. Use when: 'is this duplicated', 'find copy-paste code', 'clone detection',…
  • 100dry
    This skill should be used when the user asks to "DRY this up", "remove duplication", "refactor for DRY", "extract shared logic", "find repeated code", "consolidate this", "stop repeating myself", "make this DRY", "refactor duplicates", "extract a helper", "pull out common code",…
  • 100dry-consolidation
    Find and extract duplicated code into shared abstractions. Use when seeing repeated utilities, copy-pasted components, duplicated hooks, or boilerplate repeated across files.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.