Skip to content
Back to skills

Clean Code 7

ASecurity

[slop] [debug] [unused] [duplicates] [all] - Cleans up code in the current branch. Removes AI artifacts, debug statements, unused code, and duplicates. Use when preparing for PR or cleaning up after AI-assisted coding.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
toolsbashgit

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill clean-code-7 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clean Code 7?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clean Code 7
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-clean-code-7/badge)](https://www.skillsdirectory.com/skills/david-li0406-clean-code-7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: clean-code
description: "[slop] [debug] [unused] [duplicates] [all] - Cleans up code in the current branch. Removes AI artifacts, debug statements, unused code, and duplicates. Use when preparing for PR or cleaning up after AI-assisted coding."
---

# Cleaning Code

Analyzes and cleans up code changes in the current branch against main.

## Subcommands

| Command | Description |
|---------|-------------|
| `/cleaning-code slop` | Remove AI-generated artifacts (excessive comments, unnecessary checks, `any` casts) |
| `/cleaning-code debug` | Remove console.log, debugger, TODO comments, temporary code |
| `/cleaning-code unused` | Remove unused functions, variables, and imports |
| `/cleaning-code duplicates` | Consolidate duplicated code into shared utilities |
| `/cleaning-code all` | Run all cleanup checks in sequence |

## Workflow

1. **Get changed files**
   ```bash
   git diff main...HEAD --name-only
   ```

2. **For each file, analyze the diff**
   ```bash
   git diff main...HEAD -- <file>
   ```

3. **Apply cleanup based on subcommand** (see detailed guides below)

4. **Verify changes**
   ```bash
   npm run build  # or equivalent
   npm test
   ```

5. **Summarize** what was cleaned in 1-3 sentences

## Cleanup Guides

- **AI slop removal**: See [slop.md](slop.md)
- **Debug code removal**: See [debug.md](debug.md)
- **Unused code removal**: See [unused.md](unused.md)
- **Duplicate consolidation**: See [duplicates.md](duplicates.md)

## Guidelines

- **Only clean new code**: Check git blame; don't modify code that predates the branch
- **Preserve behavior**: Cleanup should be purely cosmetic
- **When in doubt, leave it**: If something might be intentional, keep it
- **Match project style**: Follow existing patterns in the codebase

Files in this skill

  • SKILL.md1.7 KB
  • debug.md1.6 KB
  • duplicates.md2.3 KB
  • slop.md1.5 KB
  • unused.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…