Claude-skill-registry dry
Detect duplicate code and suggest DRY refactors using jscpd
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/dry" ~/.claude/skills/majiayu000-claude-skill-registry-dry && rm -rf "$T"
manifest:
skills/data/dry/SKILL.mdsource content
DRY Check
Detect duplicate code across your codebase using jscpd.
Subcommands
| Command | Description |
|---|---|
or | Run duplication scan |
| Show last scan results |
| Show current jscpd configuration |
| Create project-specific jscpd.json |
Parameters
| Parameter | Description | Default |
|---|---|---|
| Minimum token count for duplicate detection (higher = fewer matches) | jscpd default |
| Directory to scan for duplicates | Current directory |
Examples
# Scan with higher threshold (find only large duplicates) /bluera-base:dry scan --threshold 100 # Scan specific directory /bluera-base:dry scan --path src/ # Combine both /bluera-base:dry scan --threshold 75 --path lib/
Workflow
Phases: Check jscpd → Scan codebase → Report duplicates → Suggest refactors
1. Check jscpd Installation
command -v jscpd || npx jscpd --version
If not installed, suggest:
npm install -g jscpd
2. Run Scan
jscpd --reporters json --output .bluera/bluera-base/state/ .
3. Parse Results
Results are stored in
.bluera/bluera-base/state/jscpd-report.json
4. Refactoring Guidance
See skills/dry-refactor/SKILL.md for language-specific refactoring patterns.