code-deduplication

Audit code duplication using a markdown capability index.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/aberrantCode/llm_skills --skill code-deduplication-aberrantcode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-deduplication
Source: https://github.com/aberrantCode/llm_skills/tree/main/claude/skills/code-deduplication
Command: npx skills add https://github.com/aberrantCode/llm_skills --skill code-deduplication-aberrantcode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Duplicate or semantically similar code accumulates, leading to maintenance overhead and inconsistencies. This skill enforces a check‑before‑write discipline using a capability index.

Core Features & Use Cases

  • Maintain CODE_INDEX.md: Central markdown index of functions by capability.
  • Check before writing: Prompt to search the index and codebase before adding new code.
  • Audit duplicates: /audit-duplicates command flags overlapping utilities.
  • Vector search integration: Optional ChromaDB or LanceDB for large projects.
  • Use case: When adding a new utility function, the skill guides the developer to verify existing equivalents, extend them if possible, or create a new entry and update the index.

Quick Start

Ask the code deduplication skill to check the index before adding a new function.

Frequently Asked Questions about code-deduplication

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

FAQPage Schema
How do I prevent semantic code duplication when adding new utilities?

Prevent semantic code duplication by maintaining a CODE_INDEX.md file that catalogs existing capabilities. This enforces a check-before-write discipline, prompting developers to search the index and codebase before adding new functions.

What is the best way to audit overlapping functions in a software project?

The best way to audit overlapping functions is using an `/audit-duplicates` command against a capability index. This flags semantically similar code and existing utilities that overlap, reducing maintenance overhead.

How does vector search work for finding duplicate code in large codebases?

Vector search finds duplicate code in large codebases by optionally integrating ChromaDB or LanceDB. This enables semantic search capabilities against a code index to identify similar utilities without relying on exact text matches.

Do I need a markdown index file to check for duplicate code?

Yes, a markdown CODE_INDEX.md file is required to check for duplicate code. It serves as a central index of functions by capability, enabling the system to verify existing capabilities before writing new code.

Can I use this deduplication approach for UI components and APIs?

Yes, you can use this deduplication approach for UI components and APIs. It applies to software projects where developers create utilities, APIs, and UI components, ensuring capabilities are verified before writing new code.