---
name: slop-detector
description: Structural review skill for AI-SLOP Detector. Use when asked to review AI-assisted code, inspect changed-code risk, prioritize structural hotspots, plan cleanup, verify governance, or run MCP/JSON-first workflows. Prefer the canonical CLI surfaces: scan, review, pulse, sweep, explain, verify-governance, and mcp. Treat review/pulse/sweep as the primary agent-facing surfaces; use scan for full baseline analysis.
---
Use AI-SLOP Detector as a structured review loop, not as a last-minute lint step.
The preferred flow is:
- generate or edit code
- run a structured review in JSON
- inspect evidence and action classes
- apply only bounded fixes
- re-run review / health / cleanup
- hand the result to a human with evidence
Python core:
pip install ai-slop-detector
pip install "ai-slop-detector[js]" # optional JS/TS support
pip install "ai-slop-detector[go]" # optional Go supportOptional Node-first wrapper:
npm install --save-dev ai-slop-detectorVerify:
slop-detector --version
npx ai-slop-detector --versionUse the smallest surface that matches the job.
slop-detector scan . --format jsonUse when you need:
- full single-file or project analysis
- baseline structural metrics
- complete pattern output
Before acting on a project scan, inspect:
finding_summaryfor total and severity countsscan_coveragefor analyzed, excluded, and unsupported filesml_scoringfor the optional ML capability state
slop-detector review . --format jsonUse when you need:
- changed-code review
- introduced vs inherited attribution
- build/pass-fail guidance
Inspect first:
verdictshould_fail_buildattributiontargetsactionsfindings
slop-detector pulse . --format jsonUse when you need:
- health summary
- hotspot prioritization
- next repair order
Inspect first:
summarytargetssignals
slop-detector sweep dead-code . --format json
slop-detector sweep dupes . --format json
slop-detector sweep unused-deps . --format json
slop-detector sweep stale-suppressions . --format json
slop-detector sweep boundary-violations . --format jsonUse when you need cleanup planning with:
issuesconfidenceaction_classevidence
slop-detector explain empty_except --format jsonUse when you need mitigation guidance for a pattern or finding.
slop-detector verify-governance ./.cr-epUse when governance artifacts, not score output, are the enforcement boundary.
slop-detector mcpUse when the host tool already speaks MCP and wants the structured tool surface directly.
slop-detector review . --format jsonIf the task is PR-like or patch-like, this is the default entry point.
Safe agent targets:
- unused imports
- obvious duplicate functions
- placeholder branches
- stale suppressions
Unsafe without human confirmation:
- deleting
needs_reviewcleanup findings automatically - changing architecture boundaries
- removing high-churn files solely from cleanup heuristics
- treating
cleanas proof that no findings exist or all files were analyzed - treating an unavailable ML capability as a passing ML signal
Use --include-tests only when test-file findings are in scope. It includes
built-in test-file exclusions only; configured ignores and artifacts remain
excluded.
If review points at a cleanup class, run the narrow family:
slop-detector sweep dupes . --format json
slop-detector sweep dead-code . --format json
slop-detector sweep unused-deps . --format jsonDo not treat confidence as permission. It is prioritization guidance.
slop-detector pulse . --format jsonConfirm that the hotspot moved, the score improved, or the finding count dropped.
Human handoff should include:
- what changed
- what command was run
- what verdict / score / issue count changed
- what remains unfixed
- what the agent deliberately did not change
import {
scanProject,
reviewChanges,
computeHealth,
runCleanupFamily,
} from "ai-slop-detector";Typed contracts:
import type {
ScanOutput,
ReviewOutput,
HealthOutput,
CleanupOutput,
} from "ai-slop-detector/types";Older skill revisions used a /slop, /slop-file, /slop-gate, /slop-delta,
and /slop-spar framing. Those names are historical. Prefer the canonical
product surfaces:
scanreviewpulsesweepexplainverify-governancemcp
If a host environment adds slash aliases, they should delegate to those canonical commands rather than documenting a separate behavior model.