Slop check
Skill mike-diff/ai-coding-configs/plugins/agent-team/skills/slop-check
Run tool-driven code quality analysis then apply LLM judgment for cleanup. Use when cleaning up a codebase, removing slop, dead code, or improving code quality. Two-phase approach: static analysis tools find problems, agent judges what to fix.From its SKILL.md
npx -y skills add mike-diff/ai-coding-configs --skill slop-checkAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.4 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it
/agent-team:slop-check — Code Quality Cleanup
Run a careful, low-risk code quality cleanup using two phases: tools find problems, agent judges what to fix.
Static analysis tools are good at finding unused code, circular deps, type errors, and lint issues. LLMs are good at judging comment quality, identifying AI slop, assessing error handling intent, and evaluating whether deduplication would obscure intent. Use each for what it's best at.
<target> $ARGUMENTS </target> <role> You are a meticulous code quality auditor. You run real analysis tools first, collect structured findings, then apply careful judgment about what to fix. You are conservative — you prefer to flag something for review than to break it. You explain why every change is safe. </role>Setup
# Must be in a git repo — create a branch first
cd <target> && git checkout -b slop-check
Detect the primary language and install whatever analysis tools are available. Skip any that aren't installed or don't apply.
Phase 1: Run Tools, Collect Findings
Run ALL applicable tool commands below. Collect output into a structured findings list. Do NOT start editing code yet.
TypeScript / JavaScript
# Dead code
npx knip --reporter compact 2>/agent-team:dev/null
# Circular dependencies
npx madge --circular --extensions ts src/ 2>/agent-team:dev/null
# Type errors
npx tsc --noEmit 2>&1
# Lint
npx eslint . --format compact 2>/agent-team:dev/null
# Weak types
grep -rn ': any\b\|: unknown\b\|as any' --include='*.ts' --include='*.tsx'
Python
vulture . --min-confidence 80 2>/agent-team:dev/null
mypy . 2>&1
ruff check . 2>&1
Go
deadcode ./... 2>/agent-team:dev/null
unused ./... 2>/agent-team:dev/null
go vet ./... 2>&1
staticcheck ./... 2>&1
Rust
cargo clippy -- -W dead_code -W unused_imports 2>&1
cargo udeps 2>/agent-team:dev/null
Slop detection (all languages)
# Stub/placeholder patterns
grep -rn 'TODO\|FIXME\|HACK\|XXX\|STUB\|placeholder\|not implemented\|no-op' --include='*.ts' --include='*.tsx' --include='*.py' --include='*.js' --include='*.go' --include='*.rs'
# Edit-history comments
grep -rn 'previously\|replaced\|old version\|before\|after refactor\|moved from\|copied from\|extracted from' --include='*.ts' --include='*.tsx' --include='*.py' --include='*.js'
# Empty catch blocks
grep -rn -P 'catch.*\{\s*\}' --include='*.ts' --include='*.tsx' --include='*.js'
# Broad catch-all
grep -rn 'catch\s*(.*)\s*{' --include='*.ts' --include='*.tsx' --include='*.js'
Deduplication (no good tool — agent assesses)
# Find functions with similar names across files
grep -rn 'function\|const.*=.*=>' --include='*.ts' | sort | uniq -d -f2
# jscpd if available
npx jscpd src/ 2>/agent-team:dev/null
Type consolidation (agent assesses)
grep -rn 'interface\|type ' --include='*.ts' | sort
See references/judgment-guide.md for detailed criteria on each finding type.
Phase 2: Agent Judgment
Tools found candidates — now decide what to do.
Filter findings
For each finding, classify as:
| Action | Meaning |
|---|---|
| implement | High confidence, low risk, clear justification |
| review | Needs human judgment — flag with reasoning |
| skip | False positive, intentional design, or not actually an issue |
What tools get wrong (always verify manually)
- Dead code tools: False positives on code loaded via dynamic import, reflection, config, plugin registration, framework conventions, or string-referenced paths
- Circular dep tools: May flag acceptable patterns (type-only imports, interface segregation)
- Lint rules: May conflict with project conventions — check existing suppressions
- Type checkers:
unknownat API boundaries is often correct
What agents should focus judgment on
- Deduplication: Would consolidating obscure intent? Is the "shared" version harder to understand than the two specific ones?
- Error handling: Does the catch serve recovery, cleanup, logging, or user-facing display? If yes, keep. If it's hiding errors with no justification, remove.
- Comments: Does it help a new engineer understand why the code exists? If yes, keep. If it describes what happened during an edit, remove.
- Types: Is
anyat a genuine boundary (parsing, serialization, interop)? Preserve. Is it laziness? Replace.
Implementation Rules
- One concern per commit — group related changes, don't mix tracks
- Explain why it's safe — for every removal, state what was verified
- No speculative rewrites — only fix what tools found or what you can point to
- No behavior changes — unless clearly intended and justified
- Preserve compatibility — don't remove anything used by config, plugins, tests, or external consumers
- Small patches — easier to review, easier to revert
- Flag risk — medium and high risk findings get flagged, not auto-implemented
Validation
After each batch of changes:
# Run whatever the project uses
npm test / pytest / go test ./... / cargo test 2>&1
npx tsc --noEmit / mypy / go vet / cargo clippy 2>&1
npx eslint . / ruff check . / staticcheck ./... / cargo clippy 2>&1
npm run build / python -m build / go build ./... / cargo build 2>&1
If anything fails: revert the batch, investigate, decide whether to fix or skip.
<output_format>
Slop Check Report: <project>
Findings
- Total: X
- Implemented: X (high confidence, low risk)
- Flagged for review: X (needs human judgment)
- Skipped: X (false positive or intentional)
Implemented Changes
| File | Change | Why safe |
|---|---|---|
foo.ts | Removed unused function bar | Not referenced anywhere, no dynamic imports |
Flagged for Review
| File | Finding | Why flagged |
|---|---|---|
baz.ts | Circular dep with qux.ts | May require architectural change |
Risks
- <anything needing human verification>
Assumptions
- <anything uncertain>
</output_format>
What ships with it: 1 file
7.0 KB alongside SKILL.md
references/
- judgment-guide.md7.0 KB
Gives 0 of the 12 instructions most quality gates skills give in ~1.6k tokens
Counted across 1,195 of the 2,094 authors here whose files we hold, read 2026-08-07
- Read the output and check the exit codein 54 of 1195, across 14 files
- Verify requirements using a line-by-line checklistin 53 of 1195, across 12 files
- Identify the verification command proving the claimin 51 of 1195, across 12 files
- Run the full verification commandin 50 of 1195, across 11 files
- Verify output confirms the claimin 49 of 1195, across 12 files
- Check version control diff after agent delegationin 46 of 1195, across 6 files
- State claim with evidencein 44 of 1195, across 4 files
- Run the test suitein 33 of 1195, across 26 files
- Keep state in memory by defaultin 27 of 1195, across 6 files
- Make prototype runnable with one commandin 26 of 1195, across 5 files
- Produce a verification reportin 25 of 1195, across 14 files
- Detect the package manager from lockfilesin 24 of 1195, across 5 files
Said here and by no other author read
- do not edit code during the analysis phase
- classify each finding as implement review or skip
- make one concern per commit
- explain why every removal is safe
- keep patches small
- revert the batch if validation fails
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.