scanaislop/aislop

Catch and fix the code-quality issues AI coding agents leave behind - dead code, unsafe casts, swallowed errors, duplication, security risks, and more. 50+ deterministic rules across 10 language targets, with CLI, CI, and GitHub Actions. No LLM at runtime. MIT.

What is aislop?

aislop is a command-line tool that scans your code for the messy patterns AI coding assistants (like Claude Code, Cursor, or Codex) tend to leave behind. It gives your project a quality score from 0 to 100, flags problematic code, and can even auto-fix the mechanical issues.

What it does

  • Scans your codebase (or just changed files) for 50+ rules across 10 programming languages (TypeScript, Python, Go, Rust, Ruby, PHP, C#, C/C++, and more).
  • Scores every change on a 0–100 scale, weighted so serious issues hurt more than style nits.
  • Fixes purely mechanical problems automatically — like unused imports, dead code, or formatting — and hands off anything needing judgment to your coding agent.
  • Integrates with CI/CD, Git hooks, and popular AI coding tools so the check runs on every edit or pull request.

How it works

aislop is deterministic — it uses regex, AST parsing, and standard linters/formatters (like Biome, ruff, gofmt, clippy). No LLMs, no API calls, so the same code always gets the same score. It runs six parallel engines:

  • Formatting – style consistency via standard tools
  • Linting – language-specific issues
  • Code Quality – complexity, dead code, unused files
  • AI Slop – the specific patterns AI agents leave (narrative comments, swallowed exceptions, as any casts, hallucinated imports, etc.)
  • Security – injection risks, hardcoded secrets, dependency audits
  • Architecture – optional custom rules for import bans and layering

Key features

  • Zero-config start: npx aislop@latest scan works on any repo.
  • Auto-fix: aislop fix cleans up mechanical issues; --safe mode only applies reversible changes.
  • Agent integration: aislop agent runs a local repair session with your existing coding agent (Codex, Claude Code, etc.) and verifies the result.
  • Hooks: install a per-edit hook so your AI agent fixes slop before it lands.
  • CI gates: aislop ci fails the build if the score drops below a threshold.
  • MCP server: expose aislop as tools for Claude Desktop, Cursor, or Codex.
  • Public badges: show your score on your README.

Why use it?

AI-generated code often passes tests and linters but contains subtle rot — overly verbose comments, hidden fallbacks, duplicated helpers, or dead code. aislop catches these patterns early, gives you a single quality gate, and helps keep your codebase clean as AI tools become part of your workflow.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project