Agent skill · software engineering · google-gemini

review-duplication

Use this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.

Why this skill is useful

Provides a structured workflow for identifying and reusing existing code patterns, which the AI may not reliably generate on its own.

What it needs

About 3k tokens when loaded. Last updated 2026-08-07. 106,400 stars on the source repository.

What this skill does

Review Duplication Overview This skill provides a structured workflow for investigating a codebase during a code review to identify duplicated logic, reinvented utilities, and missed opportunities to reuse established patterns. By executing this workflow, you ensure that new code integrates seamlessly with the existing project architecture. Workflow: Investigating for Duplication When reviewing code, perform the following steps before finalizing your review: 1. Extract Core Logic Analyze the new code to identify the core algorithms, utility functions, generic data structures, or UI components being introduced. Look beyond the specific business logic to see the underlying mechanics. 2. Hypothesize Existing Locations & Trace Dependencies Think about where this type of code would live if it already existed in the project. Provide absolute paths from the repo root to disambiguate. Utilities: packages/core/src/utils/, packages/cli/src/utils/ UI Components: packages/cli/src/ui/components/, packages/cli/src/ui/ Services: packages/core/src/services/, packages/cli/src/services/ Configuration: packages/core/src/config/, packages/cli/src/config/ Core Logic: Call out packages/core/ if functionality does not appear React UI specific. Trace Third-Party Dependencies: If the PR introduces a new import for a utility library (e.g., lodash.merge, date-fns), trace how and where the project currently uses that library. There is likely an existing wrapper or shared utility. Check Package Files: Before flagging a custom implementation of a complex algorithm, check package.json to see if a standard library (like lodash or uuid) is already installed that provides this functionality. 3. Investigate the Codebase (Sub-Agent Delegation) Delegate the heavy lifting of codebase investigation to specialized sub-agents. They are optimized to perform deep searches and semantic mapping without bloating your session history. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills google-gemini/review-duplication

View the source on GitHub

Browse the @skills marketplace