Install
$ agentstack add skill-trecek-useful-claude-skills-id-slop ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Slop Identification Skill
Identify and catalog AI-generated code slop in the codebase. Slop is useless code patterns left behind by AI assistants during rapid development - comments that won't make sense to future readers, backward compatibility hacks, dead code, and other technical debt.
When to Use
- User says "id slop", "identify slop", "find slop"
- User wants "code cleanup" or "cleanup scan"
- User mentions "AI-generated junk" or "leftover comments"
- User asks to "find useless comments" or "remove dead code"
Critical Constraints
NEVER:
- Modify any source code files (this skill only IDENTIFIES slop)
- Remove code without creating a removal plan first
- Flag legitimate comments, documentation, or architectural patterns
- Flag TODO comments that describe actual future work
ALWAYS:
- Use subagents for parallel exploration
- Write the slop removal plan to
temp/id-slop/directory - Provide file paths and line numbers for each finding
- Run dry walkthrough on the generated plan
- Categorize slop by type for prioritized removal
Slop Categories
Category 1: Phase Reference Comments (HIGH PRIORITY)
Comments mentioning numbered phases from AI implementation plans that won't make sense to future readers.
Patterns to detect:
Phase [0-9]in comments or docstrings# Phase 1:,# Phase 2:, etc.- References to "implementation phase" or "migration phase" with numbers
Part of Phase Xcomments
Example slop:
# Phase 5: Migrate Checkpoint and Session Management
def migrate_session(): # Part of Phase 2 migration
Category 2: Backward Compatibility Hacks (HIGH PRIORITY)
Parameters or code kept solely for "API compatibility" that's no longer needed.
Patterns to detect:
kept for API compatibilitykept for backward compatibilityunused but kept forignored - kept for- Parameters that are documented as "unused" or "ignored"
Example slop:
use_file_lock: bool = True, # Ignored - kept for API compatibility
log_dir: Optional[Path] = None, # Ignored - kept for API compatibility
Category 3: Removed Code Comments (MEDIUM PRIORITY)
Comments explaining what was removed without explaining what replaced it.
Patterns to detect:
removed in Phaseno longer neededNOTE: X removed- References to deleted features or functions
Example slop:
# NOTE: test-and-log removed in Phase 4. Use simple 'test' task.
# baseline_manager removed - now handled by executor
Category 4: Deprecation Notices (MEDIUM PRIORITY)
Comments marking code as deprecated without removal timeline or replacement guidance.
Patterns to detect:
deprecatedwithout clear migration path@deprecateddecorators on live codewill be removedwithout version/date- Stale deprecation warnings
Category 5: Fallback/Workaround Code (HIGH PRIORITY)
Fallback logic that masks errors instead of failing fast.
Patterns to detect:
try: ... except: passblocks that swallow all exceptions# Silently ignorecomments- Fallback methods that don't log the original error
ignore_errors=Truewithout logging
Example slop:
try:
result = risky_operation()
except:
pass # Silently ignore errors
Category 6: Type System Bypasses (LOW PRIORITY)
Comments that bypass type checking instead of fixing the actual type issue.
Patterns to detect:
# type: ignorewithout explanation# noqawithout specific error codecast()calls that don't make type sense
Example slop:
entry.status = status # type: ignore
return wrapper # type: ignore
Category 7: Dead Placeholder Code (MEDIUM PRIORITY)
Stub implementations, placeholder nodes, or scaffolding never replaced.
Patterns to detect:
- Functions with only
passor...bodies placeholderorstubin function names# TODO: implementwithout implementation- Test scaffolding left in production code
Example slop:
def find_next_placeholder(state):
"""Placeholder node for testing."""
pass
Category 8: Unreachable Code Comments (LOW PRIORITY)
Comments explaining why code is unreachable or can't happen.
Patterns to detect:
# This should be unreachable# Acknowledge unused parameter# satisfies mypyfor dead code paths- Defensive code for impossible states
Example slop:
# This should be unreachable if retry_attempts > 0, but satisfies mypy
raise RuntimeError("Unreachable")
Category 9: Commented-Out Code (HIGH PRIORITY)
Code blocks that are commented out instead of deleted.
Patterns to detect:
- Multi-line commented code blocks
# old_function()style commented calls# return old_valuecommented returns
Category 10: Dead Code (HIGH PRIORITY)
Unused functions, classes, methods, imports, variables, and constants that are never referenced anywhere in the codebase.
Patterns to detect:
- Functions/methods with no callers
- Classes never instantiated or subclassed
- Imports not used in the module
- Variables/constants assigned but never read
- Module-level code that serves no purpose
Investigation Workflow
Step 1: Launch Parallel Subagents
Spawn 4-6 Explore subagents to scan different slop categories simultaneously:
Subagent 1: Phase References & Deprecation
- Search for "Phase [0-9]" patterns in comments
- Search for "deprecated" markers
- Search for "removed in" comments
Subagent 2: Backward Compatibility & Fallbacks
- Search for "kept for" compatibility patterns
- Search for "ignored" parameters
- Search for silent error handling
Subagent 3: Dead Code & Placeholders
- Search for placeholder/stub functions
- Search for unused imports with noqa
- Search for pass-only function bodies
Subagent 4: Type Bypasses & Unreachable Code
- Search for "type: ignore" without explanation
- Search for "noqa" suppressions
- Search for "unreachable" comments
Subagent 5: Commented-Out Code
- Search for multi-line comment blocks that look like code
- Search for commented function calls
- Search for # old_ patterns
Subagent 6: Dead Code
- Search for functions/classes with no callers
- Search for unused imports
- Search for assigned-but-never-read variables
Step 2: Consolidate Findings
After subagents complete, organize findings by:
- File path
- Line number(s)
- Slop category
- Priority (HIGH/MEDIUM/LOW)
- Removal action (delete line, delete block, refactor)
Step 3: Generate Removal Plan
Write a structured removal plan to: temp/id-slop/slop_removal_plan_{YYYY-MM-DD_HHMMSS}.md
The plan should follow this format:
# Slop Removal Plan
**Date:** {YYYY-MM-DD}
**Scope:** {directories scanned}
**Total Findings:** {count}
## Summary by Category
| Category | Count | Priority |
|----------|-------|----------|
| Phase References | X | HIGH |
| Backward Compatibility | X | HIGH |
| ... | ... | ... |
## Phase 1: High Priority - Phase Reference Comments
### Objective
Remove all phase reference comments that won't make sense to future readers.
### Files to Modify
- `path/to/file.py:LINE`: Remove comment "# Phase 5: ..."
- `path/to/file.py:LINE-LINE`: Remove docstring section mentioning phases
### Implementation Steps
1. Delete line X in file.py containing "Phase 5" comment
2. Delete lines X-Y in file2.py containing phase docstring
...
### Success Criteria
- [ ] No "Phase [0-9]" patterns remain in comments
- [ ] Code still functions correctly
### Verification
```bash
grep -rn "Phase [0-9]" src/ --include="*.py" | grep -v "test"
Phase 2: High Priority - Backward Compatibility Hacks
Objective
Remove unused parameters kept for backward compatibility.
Files to Modify
...
Phase N: Final Verification
Verification Commands
# Run linting/formatting checks and full test suite
Success Criteria
- [ ] All tests pass
- [ ] No linting errors
- [ ] No functional regressions
### Step 4: Run Dry Walkthrough
After generating the removal plan, invoke the dry walkthrough skill:
Now running dry walkthrough on the slop removal plan...
### Step 5: Report Summary
Output to terminal:
Slop Identification Complete
Plan: temp/id-slop/slopremovalplan{YYYY-MM-DDHHMMSS}.md Total Findings: {count}
By Priority
- HIGH: {count} items (should fix immediately)
- MEDIUM: {count} items (fix when touching these files)
- LOW: {count} items (fix opportunistically)
By Category
- Phase References: {count}
- Backward Compatibility: {count}
- Removed Code Comments: {count}
- Fallback/Workaround Code: {count}
- Dead Placeholder Code: {count}
- Type Bypasses: {count}
- Dead Code: {count}
Next Steps
- Review the plan at temp/id-slop/slopremovalplan{YYYY-MM-DDHHMMSS}.md
- Dry walkthrough has been run - check for any issues
- Implement the plan phase by phase
## Search Patterns Reference
Use these regex patterns for searching:
```bash
# Phase references
grep -rn "Phase [0-9]" --include="*.py"
grep -rn "# Phase" --include="*.py"
# Backward compatibility
grep -rn "kept for.*compatibility" --include="*.py"
grep -rn "ignored.*kept for" --include="*.py"
# Removed code
grep -rn "removed in Phase" --include="*.py"
grep -rn "no longer needed" --include="*.py"
# Fallbacks
grep -rn "except:.*pass" --include="*.py"
grep -rn "ignore_errors=True" --include="*.py"
grep -rn "Silently ignore" --include="*.py"
# Type bypasses
grep -rn "# type: ignore$" --include="*.py"
grep -rn "# noqa$" --include="*.py"
# Placeholders
grep -rn "placeholder" --include="*.py"
grep -rn "def.*stub" --include="*.py"
# Unreachable
grep -rn "should be unreachable" --include="*.py"
grep -rn "satisfies mypy" --include="*.py"
Exclusions
Do NOT flag as slop:
- Architecture documentation - Comments explaining design decisions
- API documentation - Docstrings explaining parameters and return values
- Legitimate TODOs - TODOs with clear descriptions of future work
- Test-specific code - Mocks, fixtures, and test utilities
- Intentional type ignores - Type ignores with explanatory comments
- Error handling with logging - Exception handlers that log errors
- Feature flags - Conditional code controlled by configuration
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Trecek
- Source: Trecek/useful-claude-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.