This skill should be used to remove AI-generated artifacts and unnecessary code before committing...
Why this skill exists. This skill enforces Simplicity First — karpathy-principles, principle 2 — applied after the fact. AI assistants tend to over-produce filler comments, vague TODOs, and excessive docstrings; this skill removes the overproduction before it ships.
Remove AI-generated artifacts before committing or creating PRs. Uses desloppify for quantitative scoring and directed fixes when available; falls back to LLM-based pattern detection otherwise.
See EXAMPLES.md for ❌/✅ code pairs illustrating each scan category below.
This skill should be invoked when the user:
/sdlc:implement and the de-slop gate is triggereduvx desloppify --version
If this fails, fall back to the LLM-based Workflow below.
uvx desloppify update-skill claude
Follow the output — it installs the workflow guide into context. Do not augment or override the instructions it provides.
Determine the path to scan. Default is . unless the user specifies otherwise.
uvx desloppify scan --path {path}
Read the scan output carefully. It contains:
Record the before score for the final report.
Run next until there are no more issues:
uvx desloppify next
Each call to next tells you:
For each issue:
nextnext againRepeat until next reports no more issues.
Safety rules during fix loop:
README.md, CONTRIBUTING.md, CHANGELOG.mduvx desloppify scan --path {path}
Report before score → after score.
Use this when uvx desloppify --version fails.
Ask user what to compare against (or use sensible default):
# Get default branch
git remote show origin | grep "HEAD branch" | cut -d ":" -f 2 | xargs
# Get changed files
git diff --name-only {BASE}...HEAD
# Get change summary
git diff --stat {BASE}...HEAD
If no remote, fall back to:
git diff --name-only main...HEAD
# or
git diff --name-only master...HEAD
Scan all changed files for these patterns. DO NOT modify anything yet.
Flag for deletion:
NOTES.md, PLAN.md, ARCHITECTURE.md, THOUGHTS.md, IDEAS.md, SCRATCH.md, TEMP.md, TODO.mdNever touch:
README.md, CONTRIBUTING.md, CHANGELOG.mddocs/** directoryComments that just restate what the next line obviously does.
Detection:
See EXAMPLES.md for ❌/✅ pairs.
Pattern: # TODO: (Add|Consider|Might|Should|Could|May|Probably)
Flag the vague, generated-as-filler form. Keep specific, actionable TODOs that reference a real follow-up (ticket, decision, or external dependency).
See EXAMPLES.md for ❌/✅ pairs.
Flag docstrings that are excessively long for trivial functions.
Check for:
See EXAMPLES.md for ❌/✅ pairs.
Flag tests with excessive mocking that test nothing real.
Pattern:
@patch decorators per test functionFlag suspiciously specific claims without citation:
Patterns:
Display all findings with clear numbering and actions:
Scanned X files, found Y slop patterns
[1] NOTES.md (45 lines)
→ DELETE: Unnecessary markdown file
[2] src/user.py:23-28 (6 lines)
→ REMOVE redundant comments
[3] src/api.py:15-25 (11 lines)
→ SIMPLIFY excessive docstring on get_name()
[4] src/utils.py:42
→ REMOVE AI TODO: # TODO: Add error handling
[5] tests/test_user.py:50-70 (test_create_with_mocks)
→ FLAG: Mock-heavy (5 @patch decorators)
Review manually
---
Select items to clean:
• Enter numbers: 1 2 4
• Range: 1-4
• 'all' - clean items 1-4 (skips flags)
• 'none' - cancel
Selection: _
Parse user input (numbers, ranges, 'all', 'none').
For file deletions: git rm {FILE}
For code cleanup: Use Edit tool to remove redundant comments, simplify docstrings, remove AI TODOs. Show before/after for each edit.
For flagged items: Display file path and line numbers, ask user to review manually.
Cleaned:
• 2 files deleted
• 12 redundant comments removed
• 3 docstrings simplified
• 8 AI TODOs removed
• 67 total lines removed
Flagged for manual review:
• tests/test_user.py:50-70 (mock-heavy, 5 patches)
Next steps:
1. Review flagged items (if any)
2. Run tests: bun test
3. Verify changes: git diff
4. Commit: /commit
Always follow these regardless of workflow:
README.md, CONTRIBUTING.md, CHANGELOG.md, docs/**, test files (only flag)