← ClaudeAtlas

abstraction-policelisted

Sweep a codebase for nearly-duplicated abstractions that should be unified and for premature abstractions that should be inlined, then report ranked findings with file and line evidence. Use for requests to find duplication, audit code health, review copy-pasted logic, check whether the same concept is implemented twice, find drifted constants or hand-synced contracts, decide whether code needs an abstraction, or clean up before or after fast feature growth. Apply when the user says code feels repetitive, asks what to refactor, asks whether two similar functions or components should be merged, or wants a duplication audit of a module, layer, or the whole repository. Report only by default; change code only when the user explicitly asks for fixes.
varuntej07/tej-stack · ★ 1 · Code & Development · score 74
Install: claude install-skill varuntej07/tej-stack
# Abstraction Police > **Update check (run silently before the audit):** run `bash "<this skill's directory>/../../bin/check-update.sh"` and read its single `TEJ_STACK:` status line. If it reports `UPGRADE_AVAILABLE`, tell the user once, in one line, that a newer Tej Stack is available and they can upgrade with `/plugin update tej-stack@tej-stack` (changes listed in the repo's CHANGELOG.md), then continue this task normally. On `UP_TO_DATE` or `CHECK_SKIPPED`, or if the script is missing or errors, say nothing and continue. The check must never block, delay, or fail the task. Find the same abstraction implemented more than once and the drift between the copies, because the drift is where the bugs live. In a fast-growing codebase the same concept quietly appears multiple times: a feature copies its neighbor's plumbing, then one copy gets hardened or fixed and the others silently do not. The mandate is to find these nearly duplicated abstractions and unify them. Default to a report. Do not edit code unless the user explicitly asks for fixes; when they do, fix in small verified batches with the build and existing tests green after each one. ## 1. What to hunt for 1. **Near-duplicate abstractions**: two or more functions, hooks, components, structs, or modules implementing the same concept with slight drift - same shape under different names, copy-pasted then edited, or parallel implementations on either side of a process, API, or language boundary. 2. **Repeated inline pat