Code Deduplication Detection

VerifiedCaution

Systematic methodology for detecting code duplication, dead code, and dependency bloat. Designed for Flutter and Firebase projects but adaptable to any codebase. Process includes project discovery, multi-phase scanning, severity classification, and structured report output with file locations and recommendations.

Sby Skills Guide Bot
DevelopmentIntermediate
6/2/2026
Claude Code
#duplicate-code#dead-code#dependency-bloat#technical-debt#code-cleanup

Recommended for

Automated summary

Detects code duplication, dead code, and dependency bloat in software projects, providing a structured report.

Strengths

  • Comprehensive multi-phase analysis
  • Severity-based classification
  • Language-agnostic
  • Project context awareness

Limitations

  • Requires source file access
  • Depends on project configuration quality
  • May miss some indirect duplication patterns
When to use it

During a code quality audit, before a major refactor, or to reduce technical debt.

When not to use it

For very small projects or one-off changes that do not warrant a full analysis.

Security analysis

Caution
Quality score80/100

The skill employs Bash for analysis tasks like grepping and scanning, which introduces a level of risk if inputs are not sanitized. However, there is no indication of destructive commands, exfiltration, or disabling safety features. The purpose is legitimate (code duplication detection), so the risk is manageable.

Findings
  • •Uses Bash, which is a powerful tool capable of executing arbitrary commands. Although the described usage is for benign code analysis, improper input handling could lead to command injection.
How this analysis is made

Examples

Full deduplication scan
Run a code deduplication analysis on this Flutter project. Identify duplicate code, dead code, and unused dependencies. Provide a report with severity levels and file locations.
Quick duplicate check
Scan for duplicate code blocks in the lib/ folder. Classify findings as Critical, Warning, or Suggestion.
Dead code detection
Find dead code and unused imports in this Firebase project. List files and suggest removals.

name: dedup-code-agent description: Code duplication detection and technical debt analysis skill. Provides methodology for finding duplicate code, dead code, and dependency bloat. allowed-tools: Read, Glob, Grep, Bash agent: dedup-code-agent context: fork metadata: triggers: duplicate code, dead code, code duplication, dependency bloat, technical debt, unused code, code cleanup related-skills: code-reviewer, systematic-debugging, receiving-code-review domain: quality role: specialist scope: analysis output-format: report

Code Deduplication Skill

Purpose

Provides systematic methodology for detecting code duplication, unused code, and dependency bloat -- primarily in Flutter + Firebase codebases but applicable to any project.

Process

  1. Discover -- Map project structure, features, shared utilities, and test coverage
  2. Scan -- Run multi-phase analysis for duplicates, dead code, and unused dependencies
  3. Classify -- Categorize findings by severity (Critical / Warning / Suggestion)
  4. Report -- Output structured report with file locations, counts, and recommendations

For the complete analysis methodology, detection patterns, and report format:

Read reference/dedup-analysis-methodology.md

Error Handling

If the target directory does not exist, report "Target not found" with the path searched. If no duplication is found, report "No duplicates detected" with the scan scope and file count.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/code-deduplication-detection-mmlj2oiu/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/code-deduplication-detection-mmlj2oiu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-deduplication-detection-mmlj2oiu/download' --output '.skill-downloads/code-deduplication-detection-mmlj2oiu/SKILL.md.part' && mv '.skill-downloads/code-deduplication-detection-mmlj2oiu/SKILL.md.part' '.skill-downloads/code-deduplication-detection-mmlj2oiu/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Glob, Grep, Bash

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/code-deduplication-detection-mmlj2oiu/SKILL.md' && test -s '.skill-downloads/code-deduplication-detection-mmlj2oiu/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/dedup-code-agent' && cp -R '.skill-downloads/code-deduplication-detection-mmlj2oiu' '.claude/skills/dedup-code-agent'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/code-deduplication-detection-mmlj2oiu'

openskills read 'code-deduplication-detection-mmlj2oiu'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/code-deduplication-detection-mmlj2oiu/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills