review-duplication
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/
More from google-gemini/gemini-cli
code-reviewer
Use this skill to review code. It supports both local changes (staged or working tree)
6.5Kdocs-writer
Always use this skill when the task involves writing, reviewing, or editing
2.5Kpr-creator
Use this skill when asked to create a pull request (PR). It ensures all PRs
1.7Kdocs-changelog
>-
897pr-address-comments
Use this skill if the user asks you to help them address GitHub PR comments for their current branch of the Gemini CLI. Requires `gh` CLI tool.
655pirate-skill
Speak like a pirate.
596