Loading...
Loading...
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.
npx skill4agent add b3ngous/agents-skills refactorlib-ccbun -e "const p=JSON.parse(await Bun.file('package.json').text()); console.log(JSON.stringify({...p.dependencies,...p.devDependencies}))" 2>/dev/nullbun --version 2>/dev/null || node --version 2>/dev/nullbun -e "const p=JSON.parse(await Bun.file('package.json').text()); console.log(p.dependencies?.effect || p.devDependencies?.effect ? 'yes' : 'no')" 2>/dev/nullbun -e "const p=JSON.parse(await Bun.file('package.json').text()); console.log(p.devDependencies?.['@types/bun'] ? 'yes' : 'no')" 2>/dev/nullls src/ 2>/dev/null | head -20references/patterns/effect-infra.mdreferences/patterns/runtime-infra.mdreferences/patterns/general-utility.mdreferences/patterns/runtime-utility.mdeffect-usagebundepssrc_dirs~/.claude/skills/refactorlib-cc/references/guardrails.md~/.claude/skills/refactorlib-cc/references/report-format.mdAgent({ subagent_type: "refactorlib-infra", prompt: <task prompt> })
Agent({ subagent_type: "refactorlib-utility", prompt: <task prompt> })| Verdict | Meaning |
|---|---|
| REPLACE | Clear duplication. Library equivalent exists, is proven compatible, and is installed. |
| INVESTIGATE | Likely replaceable but needs API verification or output comparison. |
| KEEP | Intentionally custom. See |
grep -rnode_modules/*/dist/dts/bun -e## Library Replacement Audit
### Dependencies scanned
- <dep>: <what it provides>
### Candidates
#### [REPLACE] <title>
- files: <paths with line ranges>
- callers: <N files import this>
- current: <what the code does, 1 line>
- replacement: <library API, 1 line>
- effort: low | medium | high
- gain: <lines removed, better edge-case handling, etc.>
- verified: yes | no
- code_before: |
<snippet>
- code_after: |
<snippet>
#### [INVESTIGATE] <title>
- files: <paths>
- current: <what the code does>
- candidate: <library API>
- blocker: <what needs verification>
#### [KEEP] <title>
- files: <paths>
- reason: <why this is intentionally custom>
### Summary
| Candidate | Verdict | Effort | Gain | Verified |
|-----------|---------|--------|------|----------|references/guardrails.md| Question | Load |
|---|---|
| Effect infrastructure patterns? | |
| Bun/Node infrastructure APIs? | |
| Bun/Node utility APIs? | |
| General utility patterns? | |
| False-positive guardrails? | |
| Infra subagent? | |
| Utility subagent? | |
| Agent report format? | |