code-duplication-check

Search codebases for existing implementations before writing new components.

12|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/pratos/clanker-setup --skill code-duplication-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-duplication-check
Source: https://github.com/pratos/clanker-setup/tree/main/skills/code-duplication-check
Command: npx skills add https://github.com/pratos/clanker-setup --skill code-duplication-check

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill prevents the unnecessary creation of duplicate code by proactively searching the codebase for existing implementations before new code is written.

Core Features & Use Cases

  • Proactive Search: Automatically scans the codebase for similar components or utilities when a new one is requested.
  • Reuse Options: Presents existing code snippets with clear usage instructions, encouraging reuse.
  • Guided Development: Offers paths to either use existing code, write new code (with justification), or adapt existing code.
  • Use Case: When a developer requests to "write a new utility function for data validation," this skill will first search for existing validation functions and offer them for reuse, preventing redundant code.

Quick Start

Use the code-duplication-check skill to search for existing code before writing a new component.

Frequently Asked Questions about code-duplication-check

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

FAQPage Schema
How do I prevent code duplication when adding new utility functions?

To prevent code duplication, you can scan the codebase for existing implementations before writing new code. This approach proactively searches directories like `src/` for existing components and prioritizes reusing ML-specific patterns and Python utilities.

What is the best way to find existing code to reuse in a Python project?

The best way to find existing code to reuse is to scope code searches to specific directories like `src/` and prioritize ML-specific patterns and general Python utilities. This ensures you locate existing components before creating redundant ones.

Can I adapt existing code instead of writing a completely new component?

Yes, you can adapt existing code. When a new component is requested, guided development workflows offer three paths: use existing code, write new code with justification, or adapt existing code, with a strong preference for reuse.

Does code search for component reuse work with ML-specific patterns?

Yes, code search for component reuse works with ML-specific patterns. The search mechanism prioritizes finding existing ML-specific patterns and general Python utilities to encourage code reuse and prevent duplicate implementations.

When should I justify writing new code over reusing an existing implementation?

You should justify writing new code over reusing an existing implementation when a proactive search of the codebase fails to find a suitable match. If existing code is found, the workflow guides you to use or adapt it rather than creating duplicate code.