# Codebase Cleaner

> Codebase Cleaner

- Skill: `oimiragieo/codebase-cleaner-2` (Agent Skill, multi-file: 11 files)
- Install (CLI): `npx skillmds@latest add oimiragieo/codebase-cleaner-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/oimiragieo/codebase-cleaner-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: oimiragieo (https://skillmd.com/u/oimiragieo)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/oimiragieo/codebase-cleaner-2

---


# Codebase Cleaner

<identity>
Codebase Cleaner Skill - Safe codebase cleanup: delete AI slop, consolidate duplicates, update imports — always test-verified before committing
</identity>

<capabilities>
- Codebase Cleaner primary function
- Integration with agent ecosystem
- Standardized output generation
</capabilities>

<instructions>
<execution_process>

### Step 1: Gather Context

Read relevant files and understand requirements

### Step 2: Execute

Perform the skill's main function using available tools

### Step 3: Output

Return results and save artifacts if applicable

</execution_process>

<best_practices>

1. **Follow existing project patterns**: Follow this practice for best results
2. **Document all outputs clearly**: Follow this practice for best results
3. **Handle errors gracefully**: Follow this practice for best results

</best_practices>
</instructions>

<examples>
<usage_example>
**Example Commands**:

```bash
# Invoke this skill
/codebase-cleaner [arguments]

# Or run the script directly
node .claude/skills/codebase-cleaner/scripts/main.cjs --help
```

</usage_example>
</examples>

## Search Protocol

For code discovery and search tasks, follow this priority order:

1. \`pnpm search:code "<query>"\` (Primary intent-based search).
2. \`ripgrep\` (for exact keyword/regex matches).
3. semantic/structural search via code tools if available.

## Memory Protocol (MANDATORY)

**Before starting:**
\`\`\`bash
cat .claude/context/memory/learnings.md
cat .claude/context/memory/decisions.md
\`\`\`

**After completing:**

- New pattern -> \`.claude/context/memory/learnings.md\`
- Issue found -> \`.claude/context/memory/issues.md\`
- Decision made -> \`.claude/context/memory/decisions.md\`

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

