aislop
Catch AI-generated code smells and low-quality patterns left by coding agents
TLDR
SYNOPSIS
aislop [command] [options] [path]
DESCRIPTION
aislop is a fast, deterministic CLI that detects the characteristic patterns left behind by AI coding agents (Claude Code, Cursor, Codex, etc.). It scores code on a 0–100 scale and can automatically fix many mechanical issues.Instead of relying on LLMs at runtime, aislop uses a combination of formatters, linters, AST analysis, and a large set of hand-written rules targeting narrative comments, trivial comments, `as any` casts, hallucinated imports, swallowed exceptions, dead code, oversized functions, and other "slop" patterns that compile and pass tests but degrade long-term maintainability.The tool supports TypeScript/JavaScript, Python, Go, Rust, Ruby, PHP, and Java. It is designed to run in editors, pre-commit hooks, CI pipelines, and as a quality gate before accepting agent-generated changes.
PARAMETERS
scan
Analyze code and report issues (default command when no subcommand given)fix
Automatically fix issues that can be fixed mechanicallyci
Run in CI mode (JSON output, exits non-zero below threshold)hook
Manage per-edit hooks for Claude, Cursor, and other agentsrules
List all active rulesinit
Create a .aislop/config.yml fileCommon flags:--json
Output machine-readable JSON--sarif
Output SARIF 2.1.0 for GitHub Code Scanning-f, --force (with fix)
Apply aggressive fixes (unused dependencies, files, etc.)
CONFIGURATION
Create `.aislop/config.yml` to tune behavior:
failBelow: 75
rules:
ai-slop/narrative-comment: warning
security/hardcoded-secret: error
exclude:
- "**/*.generated.ts"
