review-duplicates

SkillDev tools

Duplicate code detection using similarity-rs. Identifies refactoring candidates based on semantic similarity.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the review-duplicates skill

What this skill tells your AI

The instructions your AI receives, as published by nwiizo/ccswarm in .agents/skills/review-duplicates/SKILL.md and read by ahel’s review.

When subagents are enabled in Codex, prefer delegating this workflow to the code-refactor-agent custom agent.

Detect duplicate code in the ccswarm codebase using similarity-rs.

similarity-rs crates/ --threshold 0.80

For Rust code, also consult cargo coupling so duplicate cleanup is prioritized by architectural impact, not only by textual similarity.

cargo coupling . --summary --exclude-tests
cargo coupling . --hotspots=12 --exclude-tests

If a duplicate cluster is located in a coupling hotspot, high-risk boundary, or cycle-related module, raise its refactoring priority accordingly.

Classify results by priority:

PriorityConditionAction
High95%+ similarity, 10+ linesExtract to common function
Medium90-95% similarity, 5+ linesConsider trait or macro
Low85-90% similarityEvaluate structural similarity
SkipTest code, config structsAllow intentional duplication

Output a JSON report with high_priority, medium_priority, low_priority, and ignored sections.

Signals

GitHub stars
151
Forks
15
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
review-duplicates
Source
github.com/nwiizo/ccswarm