@reidbuilds/slop
v0.2.0
Published
Catch AI-generated code anti-patterns before they ship
Readme
Slop
Catch AI-generated code anti-patterns before they ship.
Install
npm install -g slopcheckOr run locally:
npm install
node cli/index.js check ./srcUsage
# Scan a single file
slop check ./src/api/orders.js
# Scan a directory
slop check ./src
# Filter by severity
slop check ./src --severity high
# Save a markdown report
slop check ./src --output slop-report.md
# Raw JSON output (for CI/scripts)
slop check ./src --json
# List all patterns in the SlopIndex
slop patternsSetup
Requires an ANTHROPIC_API_KEY environment variable.
export ANTHROPIC_API_KEY=your_key_hereOr add to a .env file (use dotenv or set in your shell profile).
The SlopIndex
The pattern library lives in /slop-index/patterns/. Each .md file is one anti-pattern with:
- What it looks like
- Why AI generates it
- How to catch it
- How to fix it
The library grows over time. Contributions welcome.
Exit Codes
0— No high severity issues found1— One or more high severity issues found (useful for CI blocking)
Roadmap
- [ ] npm publish
- [ ] GitHub Action
- [ ] Pre-commit hook
- [ ] Pattern auto-discovery from repo mining
- [ ] Self-updating SlopIndex
- [ ] VS Code extension
