agentsclimarketplace

Poo audit

Skill keysjoao/poo-skills/poo-audit

3 skills do Claude Code que impedem código duplicado. Detecta similar antes de criar (poo), audita codebase (poo-audit), refatora pra shared (poo-fix). DRY/SOLID/OOP.

Install
npx -y skills add keysjoao/poo-skills --skill poo-audit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Scans entire codebase for duplicate components, copy-paste code, similar utilities, and opportunities to consolidate into shared code. Use when: "audit duplicates", "find duplicates", "scan for reuse", "poo audit", "code duplication check".

SKILL.md

2.7 KB, as published. Nobody here has run it

POO Audit — Codebase Duplication Scanner

Scan the entire codebase for violations of DRY/SOLID principles and report consolidation opportunities.

Workflow

Phase 1: Map the Codebase

1. Find all component files:
   Glob: **/*.tsx, **/*.jsx, **/*.vue, **/*.svelte

2. Find all utility/hook files:
   Glob: **/utils/**/*.ts, **/hooks/**/*.ts, **/lib/**/*.ts, **/helpers/**/*.ts

3. Find all service/API files:
   Glob: **/services/**/*.ts, **/api/**/*.ts

4. Count totals for baseline

Phase 2: Detect Duplicates

For each category, run detection:

A. Component Name Similarity

1. List all exported component names (Grep: "export.*function|export.*const.*=.*=>|export default")
2. Group by similar names (e.g., DownloadButton, DownloadBtn, ButtonDownload)
3. Flag groups with 2+ similar names

B. Function Signature Similarity

1. List all exported functions
2. Compare parameter patterns
3. Flag functions with same params doing similar things

C. Content Similarity

For each flagged pair:
1. Read both files
2. Compare:
   - Import overlap (same libraries?)
   - JSX structure overlap (same elements?)
   - Logic overlap (same operations?)
3. Score: 0-100% similarity

D. Import Pattern Analysis

1. Find most-imported internal modules (Grep: "from.*@/|from.*\.\./")
2. Find files that import the same external libs
3. Files importing same things likely do same things

Phase 3: Report

Generate a structured report:

# POO Audit Report

## Summary
- Files scanned: N
- Duplicates found: N
- Consolidation opportunities: N
- Estimated lines saveable: N

## Critical (exact/near duplicates)
| Files | Similarity | Recommendation |
|-------|-----------|----------------|
| `PageA/Download.tsx` vs `PageB/Download.tsx` | 87% | Merge into `components/shared/Download.tsx` |

## Warning (similar functionality)
| Files | Overlap | Recommendation |
|-------|---------|----------------|
| `utils/format.ts` vs `helpers/date.ts` | 45% | Extract shared date utils |

## Info (potential abstractions)
| Pattern | Count | Recommendation |
|---------|-------|----------------|
| Inline fetch calls | 12 | Extract to service layer |
| Repeated useState+useEffect | 8 | Extract custom hook |

## Action Plan
1. [Highest impact consolidation first]
2. [...]

Phase 4: Offer Fix

After showing the report, ask:

"Quer que eu corrija os duplicados? Posso rodar /poo fix para consolidar automaticamente."

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.