# Poo Audit

> >

- **Type:** Skill
- **Install:** `agentstack add skill-keysjoao-poo-skills-poo-audit`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [keysjoao](https://agentstack.voostack.com/s/keysjoao)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [keysjoao](https://github.com/keysjoao)
- **Source:** https://github.com/keysjoao/poo-skills/tree/main/poo-audit

## Install

```sh
agentstack add skill-keysjoao-poo-skills-poo-audit
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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:

```markdown
# 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."

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [keysjoao](https://github.com/keysjoao)
- **Source:** [keysjoao/poo-skills](https://github.com/keysjoao/poo-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-keysjoao-poo-skills-poo-audit
- Seller: https://agentstack.voostack.com/s/keysjoao
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
