Skip to content
Back to skills

Duplicate Finder

ASecurity

Finds duplicated logic across the codebase and proposes shared abstractions

  • 10 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 1, 2026
ai-agentsgobash

Security analysis

A100/100

Scanned June 1, 2026

npx -y skills add berkcangumusisik/claude-code-practices --skill duplicate-finder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Duplicate Finder?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Duplicate Finder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/berkcangumusisik-duplicate-finder/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-duplicate-finder)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: duplicate-finder
description: Finds duplicated logic across the codebase and proposes shared abstractions
argument-hint: [directory]
user-invocable: true
allowed-tools: Bash Grep Read
effort: medium
---

## Find Duplicate Code

1. Look for structural duplication:
```bash
# Similar function signatures
grep -rn "async function\|const .* = async" ${1:-src}/ --include="*.ts" | sort | head -40

# Similar patterns (fetch calls, error handling, etc.)
grep -rn "try {" ${1:-src}/ --include="*.ts" -l
```

2. Read suspected duplicate files side by side.

3. Identify duplication categories:
   - **Identical blocks**: copy-pasted code
   - **Near-duplicates**: same logic, different variable names
   - **Structural similarity**: same pattern, different implementations

4. For each duplication cluster:
   - Show the duplicated sections
   - Propose a shared abstraction (utility function, custom hook, base class)
   - Show how call sites would look after extraction

5. Ask which ones to consolidate, then apply.

Focus on impactful duplications (3+ occurrences or > 20 lines).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…