skills/refactor/structural-duplication/SKILL.md
Identify structurally duplicate logic (pipeline-spine duplication) across semantically distinct modules. Use when multiple implementations share the same orchestration skeleton (e.g., bounds→shape→chunking→reduction→wrap), and unification may require subtle abstraction. Produces a duplication map and a safe extraction/refactor plan.
npx skillsauth add jordangunn/skills refactor-structural-duplicationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read all references in references/ before starting.
Detect and report structural duplication across modules (not copy/paste), especially where:
When unification likely requires subtle abstraction, produce a staged plan that can be executed safely.
Activate when any of the following are true:
Follow references/03_PROCEDURE.md.
Produce a single Markdown report using references/05_OUTPUT_TEMPLATE.md.
If abstraction is needed, include a staged plan using references/04_REFACTOR_PLAN_TEMPLATE.md.
testing
Validate a task by setting epistemic_state to validated. Requires explicit validation info (who/why). Computes hash and updates last_reviewed_at.
tools
Compute and display derived status for a task. Runs deterministic status computation and outputs summary of staleness, hash integrity, and eligibility.
tools
Review a task by updating last_reviewed_at timestamp. Recomputes derived status and flags any hash mismatches without changing epistemic state.
testing
Navigate to the previous task in chronological order. Returns the task ID before the specified task based on created_at timestamp.