← ClaudeAtlas

refactorlib-cclisted

Audit a codebase for handcrafted code that duplicates functionality already available in the project's dependencies. Reads package.json, launches parallel exploration agents, verifies replacement feasibility, and produces a structured refactor plan. Audit only -- does not execute changes.
bengous/claude-code-plugins · ★ 4 · AI & Automation · score 73
Install: claude install-skill bengous/claude-code-plugins
# refactorlib Audit a codebase for handcrafted code that could be replaced by existing dependencies. Projects accumulate utility code over time. Some predates a dependency that now covers the same ground; some was written before the team discovered a library API. Removing these duplications shrinks maintenance surface and leverages battle-tested implementations with better edge-case handling and security patches. ## Project context - deps: !`bun -e "const p=JSON.parse(await Bun.file('package.json').text()); console.log(JSON.stringify({...p.dependencies,...p.devDependencies}))" 2>/dev/null` - runtime: !`bun --version 2>/dev/null || node --version 2>/dev/null` - has_effect: !`bun -e "const p=JSON.parse(await Bun.file('package.json').text()); console.log(p.dependencies?.effect || p.devDependencies?.effect ? 'yes' : 'no')" 2>/dev/null` - has_bun: !`bun -e "const p=JSON.parse(await Bun.file('package.json').text()); console.log(p.devDependencies?.['@types/bun'] ? 'yes' : 'no')" 2>/dev/null` - src_dirs: !`ls src/ 2>/dev/null | head -20` ## Workflow ### Phase 1 -- Route on context The project context above was resolved at skill load time. Use it to decide which pattern catalogs each agent should read: - **If has_effect == "yes"**: include `references/patterns/effect-infra.md` in the infra agent's pattern list - **Always**: include `references/patterns/runtime-infra.md` for infra agent, `references/patterns/general-utility.md` and `references/patterns/runtime-utility.md`