review-duplication — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited review-duplication (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
The conventions you check reuse against, and the DRY principle this skill enforces, live in the coding-standards hub.
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.
packages/core/src/utils/, packages/cli/src/utils/packages/cli/src/ui/components/, packages/cli/src/ui/packages/core/src/services/, packages/cli/src/services/packages/core/src/config/, packages/cli/src/config/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.
To ensure a comprehensive review, you MUST formulate highly specific objectives for the sub-agents, providing them with the "scents" you discovered in Step 1.
codebase_investigator as your primary researcher. When delegating, formulate anobjective that asks specific, investigative questions about the codebase, explicitly including these search vectors:
Intl.DateTimeFormat or setTimeout for similar purposes?").
symbols with naming patterns like *Format* or *Debounce*?").
elsewhere.
formatting logic located?").
existing logic it finds.
generalist for detailed, turn-intensive comparisons. For example: "Review theimplementation of MyNewComponent in the PR and compare it semantically against all components in packages/ui/src. Are there any existing components that could be extended or used instead?"
package.json includelodash?"), perform a direct search to save time. Default to delegation for any open-ended "investigations."
#### 4. Evaluate Best Practices Check if the new code aligns with the project's established conventions.
If the PR introduces a new pattern, compare it against the documented standards and explicitly confirm if an existing project pattern should have been used instead.
#### 5. Formulate Constructive Feedback If you discover that the PR duplicates existing functionality or ignores a best practice:
component, class) that should be reused.
code to fulfill the task's requirements.
built-in edge case handling).
Example comment:
"It looks like this PR introduces a newformatDateutility. We already have a robust, testedformatDatefunction insrc/utils/dateHelpers.ts.
>
You can replace your implementation by importing it like this: ```typescript import { formatDate } from '../utils/dateHelpers';
>
// Then use it here: const displayDate = formatDate(userDate, 'MMM Do, YYYY'); ``` Reusing this ensures that the date formatting remains consistent with the rest of the application and handles timezone conversions correctly."
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.