Files
ai-for-dummies/skill-reviews/improved/duplicate-code-check/SKILL.md
T
2026-09-04 00:36:01 -03:00

23 lines
964 B
Markdown

---
name: duplicate-code-check
description: Review a branch or merge-request diff for newly introduced, meaningful code duplication. Use when a user asks about repeated logic or copy-paste code in a diff.
---
# duplicate-code-check
## Inputs
Source branch or MR and target branch; use the repository default base only after reporting it.
## Workflow
1. Obtain the merge-base diff and list files examined.
2. Compare changed blocks with nearby and existing code; distinguish deliberate repetition, generated code, and test fixtures.
3. Report evidenced candidates with both locations, similarity, maintenance risk, and a proportionate suggestion.
## Rules
- Do not modify or remove code without explicit approval.
- Do not label repeated literals alone as duplication without a maintenance consequence.
- Report scope limits and skipped generated files.
## Output
Return a Markdown table: candidate, locations, evidence, confidence, risk, suggested next step.