deduplicate-code
Installation
SKILL.md
Deduplicate Code
Run
art-dupl --type-aware --sort total-tokens -t <threshold:5> --html
View the HTML output directly — do not save it as a file. <threshold:5>
means "the threshold the user asked for, defaulting to 5 when they gave
none." -t counts duplicated statements (not AST nodes). If the user
specifies a value — "threshold 3", "-t 10", "show me everything" — use that
exactly. Only fall back to 5 when the user said nothing.
Generated code (sqlc, protobuf, mockgen, stringer, templ) and test-file
noise are auto-excluded by default — add --exclude-pattern only when a
path genuinely slips past the detector.