review-duplication

Detects duplicated logic and reinvented utilities during code reviews.

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/rameshkumarchouhanr/gemni-cli --skill review-duplication-rameshkumarchouhanr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-duplication
Source: https://github.com/rameshkumarchouhanr/gemni-cli/tree/main/.gemini/skills/review-duplication
Command: npx skills add https://github.com/rameshkumarchouhanr/gemni-cli --skill review-duplication-rameshkumarchouhanr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code reviews often miss duplicated functionality, reinvented utilities, and ignored shared patterns, leading to bloated codebases and inconsistent implementations that are harder to maintain. ## Core Features & Use Cases - Duplication Investigation Workflow: Extracts core logic from new code, hypothesizes where similar functionality would live, and searches the codebase for existing equivalents. - Sub-Agent Delegation: Delegates deep codebase searches to codebase_investigator and generalist sub-agents using structural, naming, and documentation-based search vectors. - Best Practices Evaluation: Checks error handling, state management, and styling against established project conventions. - Use Case: When reviewing a PR that adds a custom date formatting function, the skill finds the existing formatDate utility in the project and drafts a review comment showing how to import and reuse it. ## Quick Start Review this pull request for duplicated functionality and check whether the new code reuses existing shared utilities and project patterns.

Frequently Asked Questions about review-duplication

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

FAQPage Schema
How do I check a pull request for duplicated code?

Extract the core logic from the new code, hypothesize where similar functionality would live in the project, then search the codebase for structural, naming, and documentation matches. Delegate deep searches to sub-agents for open-ended investigations.

How to find existing utilities before writing new helper functions?

Search utility directories like packages/core/src/utils/ for similar naming patterns and underlying APIs, and check package.json for installed libraries such as lodash or uuid that already provide the functionality.

When should I delegate codebase searches to sub-agents?

Delegate any open-ended investigation, such as semantic comparisons or architectural mapping, to sub-agents like codebase_investigator. Reserve direct searches for simple unambiguous checks like verifying a dependency in package.json.

What should a duplication review comment include?

A good comment identifies the exact file path and symbol to reuse, shows a code snippet demonstrating how to integrate the existing implementation, and explains the benefit such as consistency or built-in edge case handling.

Does this approach work for UI component duplication?

Yes, the workflow covers UI components by searching component directories and using a generalist sub-agent to semantically compare the new component against existing ones that could be extended or reused.