能力标签
AI代码质量检测
🛠
AI工具

AI代码质量检测

基于 Python · 开源免费,本地部署,数据完全自主可控
英文名:AI-SLOP-Detector
⭐ 61 Stars 🍴 6 Forks 💻 Python 📄 MIT 🏷 AI 8.0分
8.0AI 综合评分
ai-code-qualityai-detectioncode-analyzer
✦ AI Skill Hub 推荐

AI代码质量检测 是 AI Skill Hub 本期精选AI工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

AI代码质量检测 是一款基于 Python 的开源工具,在 GitHub 上收获 0k+ Star,是ai-code-quality、ai-detection、code-analyzer领域中的优质开源项目。开源工具的最大优势在于代码完全透明,你可以审计每一行代码的安全性,也可以根据自身需求进行二次开发和定制。

**为什么要使用开源工具而非商业 SaaS?**
对于个人开发者和有隐私需求的用户,本地部署的开源工具意味着数据不离本机,不受第三方服务商的数据政策约束。同时,开源工具通常没有使用次数限制和月度费用,一次安装即可长期使用,对于高频使用场景的总拥有成本(TCO)远低于订阅制商业工具。

**安装与环境准备**
AI代码质量检测 依赖 Python 运行环境。建议通过 pyenv(Python)或 nvm(Node.js)管理 Python 版本,避免全局环境污染。对于新手用户,推荐先创建虚拟环境(python -m venv venv && source venv/bin/activate),再安装依赖,这样即使出现问题也可以随时删除虚拟环境重新开始,不影响系统稳定性。

**社区与维护**
GitHub Issue 和 Discussion 是获取帮助的最快渠道。在提问前建议先检查 Closed Issues(已关闭的问题),大多数常见问题都已有解答。遇到 Bug 时,提供 pip list 的输出、完整错误堆栈和最小可复现示例,能显著提高开发者响应速度。AI Skill Hub 将持续追踪 AI代码质量检测 的版本更新,及时通知重要功能变化。

📋 工具概览

AI代码质量检测 是一款基于 Python 开发的开源工具,专注于 ai-code-quality、ai-detection、code-analyzer 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

GitHub Stars
⭐ 61
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
8.0 分
工具类型
AI工具
Forks
6

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

AI代码质量检测 是一款基于 Python 开发的开源工具,专注于 ai-code-quality、ai-detection、code-analyzer 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。

📌 核心特色
  • 开源免费,支持本地部署,数据完全自主可控
  • 活跃的 GitHub 开源社区,持续迭代更新
  • 提供详细文档和使用示例,新手友好
  • 支持自定义配置,灵活适配不同使用环境
  • 可作为基础组件集成进现有技术栈或进行二次开发
🎯 主要使用场景
  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:pip 安装(推荐)
pip install ai-slop-detector

# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install ai-slop-detector

# 方式三:从源码安装(获取最新功能)
git clone https://github.com/flamehaven01/AI-SLOP-Detector
cd AI-SLOP-Detector
pip install -e .

# 验证安装
python -c "import ai_slop_detector; print('安装成功')"
📋 安装步骤说明
  1. 访问 GitHub 仓库页面
  2. 按照 README 文档完成依赖安装
  3. 根据系统环境完成初始化配置
  4. 参考官方示例或文档开始使用
  5. 遇到问题可在 GitHub Issues 中查找解答
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
ai-slop-detector --help

# 基本用法
ai-slop-detector input_file -o output_file

# Python 代码中调用
import ai_slop_detector

# 示例
result = ai_slop_detector.process("input")
print(result)
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# ai-slop-detector 配置文件示例(config.yml)
app:
  name: "ai-slop-detector"
  debug: false
  log_level: "INFO"

# 运行时指定配置文件
ai-slop-detector --config config.yml

# 或通过环境变量配置
export AI_SLOP_DETECTOR_API_KEY="your-key"
export AI_SLOP_DETECTOR_OUTPUT_DIR="./output"
📑 README 深度解析 真实文档 完整度 81/100 含工作流图 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<p align="center"> <img src="https://raw.githubusercontent.com/flamehaven01/AI-SLOP-Detector/main/docs/assets/AI%20SLop%20DETECTOR.png" alt="AI-SLOP Detector Logo" width="400"/> </p>

AI-SLOP Detector

<p align="center"> <a href="https://pypi.org/project/ai-slop-detector/"><img src="https://img.shields.io/pypi/v/ai-slop-detector.svg?v=3.11.0" alt="PyPI version"/></a> <a href="https://pepy.tech/project/ai-slop-detector"><img src="https://static.pepy.tech/badge/ai-slop-detector/month" alt="Downloads/month"/></a> <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="Python 3.8+"/></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"/></a> <br/> <a href="https://github.com/flamehaven01/AI-SLOP-Detector/actions"><img src="https://github.com/flamehaven01/AI-SLOP-Detector/actions/workflows/ci.yml/badge.svg" alt="CI"/></a> <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Black"/></a> <a href="https://github.com/flamehaven01/AI-SLOP-Detector/issues"><img src="https://img.shields.io/github/issues/flamehaven01/AI-SLOP-Detector.svg" alt="Issues"/></a> </p>

<p align="center"><b>Find AI-generated code that looks finished but isn't.</b></p>

<p align="center"> Catches what a normal linter passes over: empty functions with real-looking bodies, imports of things that don't exist, copy-pasted logic, unreachable code, and docs that oversell what the code actually does.<br/> <b>Runs fully offline &middot; deterministic core scoring &middot; no API key, no model download, nothing leaves your machine.</b> </p>

Key Features

Bootstrap — domain-aware, one command to start

slop-detector --init                   # auto-detect domain, generate .slopconfig.yaml
slop-detector path/to/repo --init      # same, for another directory (must exist)
slop-detector --init --domain web/api       # explicit domain override
slop-detector --init --adaptive-init --init-preview
slop-detector --init --adaptive-init --apply-init-suggestions
--init detects your project domain from the imports of your own non-test Python files (8 built-in profiles: general, scientific/ml, scientific/numerical, web/api, library/sdk, cli/tool, bio, finance). Common stacks (numpy, scipy, matplotlib, argparse) do not decide the domain, and a tie is general. The profile sets pattern thresholds and --init prints each threshold it changes; every profile keeps the default weights. Also secures .slopconfig.yaml in .gitignore by default.

Adaptive init is now a separate safety layer:

- --init --adaptive-init --init-preview - scans the repository - prints evidence-backed config suggestions - writes nothing - --init --adaptive-init --apply-init-suggestions - opt-in merge path - keeps your file as written (keys and comments) and adds only new ignore lines; a file it cannot extend in place is rewritten with a warning - suggests ignoring only directories that hold code and are not excluded yet - lists complex functions for review; it never writes an override that would exempt them

---

JS/TS Analysis — optional tree-sitter path

pip install "ai-slop-detector[js]"
slop-detector --project ./src         # now includes .js/.jsx/.ts/.tsx files
Activates JSAnalyzer v2.8.0 with tree-sitter AST (regex fallback when not installed). Results appear under js_file_results in ProjectAnalysis and JSON output. The regex fallback cannot measure god functions, dead code or complexity; scan_coverage.analysis_modes lists those checks as not_measured, and the text, rich and markdown reports say so in one line.

---

Go Analysis — regex-based, optional tree-sitter-go path

pip install "ai-slop-detector[go]"
slop-detector --project ./src         # now includes .go files
Activates GoAnalyzer v1.0.0. Detects: empty function stubs, panic() as error handling, fmt.Println/Printf debug prints, _ = ignored errors, TODO/FIXME comments, god functions (> 60 lines). Results appear under go_file_results in JSON output.

---

Self-Calibration — advisory weight report (Calibration v2)

slop-detector . --self-calibrate               # advisory: what this project's history suggests
Learns ldr / inflation / ddc (purity is held) from the comparable runs of the scanned project root only: same detector, engine and configuration. An improvement needs a changed file whose metric-only score fell from the SUSPICIOUS band; a flagged file left unchanged counts once. Pattern penalties are never learned as weights. The report is advisory only: scans never run it, and --apply-calibration is disabled (it writes nothing and exits 2). History recorded before v3.10 has no measurement provenance and is reported as legacy, not evidence (on one real database v1 learned 79% of its "improvements" from files that had not changed).

docs/SELF_CALIBRATION.md → · Validation boundary →

---

History Tracking — longitudinal quality analysis

slop-detector mycode.py --show-history   # per-file trend
slop-detector --history-trends           # 7-day project aggregate
slop-detector --export-history data.jsonl
Every run auto-recorded to ~/.slop-detector/history.db. The history database is the repository-local signal source for operational calibration and trend review. docs/HISTORY_TRACKING.md →

---

Release Highlights

VersionHighlights
**v3.11.0**one engine release: CLI, MCP and REST run the same ScanService (CLI output unchanged over 70 compared cases); MCP and REST are read-only by default, REST history is opt-in, the REST server binds 127.0.0.1; agent responses carry measurement_state / score_valid / reason; findings and scores unchanged
**v3.10.1**correctness release: god_function counts logical lines and nesting rises only for if/for/while/except (corpus: -608 / -471 / -472 findings, none added); BOM files and single JS/TS/Go files analyzed; crashes fixed for git repositories under non-ASCII folders and project HTML reports; scan_coverage.measurement_state / score_valid / reason, NOT EVALUATED in human reports, --fail-threshold fails when every file failed; strict config validation before the run; working pre-commit hook installer; --inspector-read-only alias of --read-only
**v3.10.0**scan coverage counts unanalyzed code files, custom-rule exclusions, unevaluated tests and partially measured files, and names the checks a fallback analyzer could not run; --init keeps default weights, never writes overrides, merges without losing comments, detects the domain from project code only; import evidence reads Poetry, setup.py, setup.cfg, Pipfile, conda and nested declarations plus script-directory packages; Calibration v2 learns only from comparable, provenance-stamped history; placeholder, clone and inflation findings need evidence (declared intent, protocol methods, claim words only); one finding per bare except: pass, mutable_default_arg CRITICAL only with mutation evidence; static data modules leave the project line weight; analyze_code_string reads no implicit file system context; JS callback-hell locations and declarator names; one project walk and one AST walk per module (cold scans 2.6-3x faster); cache analysis-cache-v30. See [CHANGELOG.md](CHANGELOG.md)
**v3.9.3**precision correction from a 12-repository study: elif is not nesting (deep_nesting, nested_complexity); @overload / @typing.overload are not placeholders; no_executable_code modules skip LDR/DDC instead of scoring 97.49; failed analyses are counted in scan_coverage.failed with complete: false and a hard gate fails closed; one JS pass and valid --json --js output; scan_coverage.analysis_modes; cache analysis-cache-v25
**v3.9.2**consistency and correctness release: one band set (CLEAN <30 / SUSPICIOUS / INFLATED_SIGNAL / CRITICAL_DEFICIT >=70) for files, projects, JS and Go; dependency_noise and parse_error are flags; docstrings count like comments in LDR and god_function; deep_nesting under nested_complexity charged once; exact duplicates by function body with an 8-node floor, shared by same-file and cross-file; import evidence from the scan root; byte-identical output across cache, hash seed, Rust helper and cwd; advisory-only self-calibration; unread config keys removed with a warning; --init <path> honoured; cache analysis-cache-v24
**v3.9.1**claim and path checkpoint: jargon counted only in comments and strings, never in import paths, identifiers, or leading license notices; claim evidence states structural / weak / absent / unmeasured with a per-claim support_level; justification only by structural library use; test evidence unmeasured outside test files; --ci-claims-strict keeps failing unmeasured integration evidence; root-relative path facts (fixes 0-file scans under a build/ checkout); phantom_member pattern
**v3.9.0**security and evidence release: no model is read from the working directory and nothing is unpickled; JSON ML model contract with one feature extractor for training and scoring; scan --read-only; import resolution that follows CPython (src layouts, namespace packages) with structure_evidence; async def placeholder findings; working --patterns-only / --disable and multi-file pre-commit hook; unimplemented API routes answer 501
**v3.8.9**trust-and-measurement release: finding/severity summaries, coverage and ML capability disclosure, explicit --include-tests, root-relative Rust discovery parity checks, strictness-corpus controls, and no aggregate accuracy claim from dogfooding
**v3.8.8**packaging metadata cleanup plus VS Code workflow tightening: SPDX string license metadata, real workspace re-scan from Refresh Issues, stale sidebar results cleared on re-analysis, exact-path issue selection, and Quick Fix writes for ignore / phantom_import_allowlist with duplicate protection
**v3.8.7**false-positive reduction pack: default .claude/** ignore, runtime-only DDC accounting, quoted vocabulary tables no longer counted as inflation, monorepo + alias-aware phantom import detection, clique+size clone grouping with property-accessor exemption, JS/TS fallback callback-hell no longer confused by JSX/object literals, tiny helper docstrings ignored, and self-dogfood weighted deficit improved from 9.3892 to 6.4186
**v3.8.6**strictness stabilization + coherence cleanup: same-file exact duplicates now surface in cleanup output, four-function clone clusters no longer evade detection, dead-code cleanup requires real dead-code evidence, operations.py is split into payload/cleanup/architecture helpers, and Claude skill/docs now match the canonical scan / review / pulse / sweep surface
**v3.8.5**dual-audience output: human summaries hide internal algorithm names while JSON / agent / MCP output gains deterministic next_steps and metric_guide; no breaking JSON key changes
**v3.8.4**plain-language documentation entry point: benefit-first README, honest “Why Not Just Use a Linter?” / “When NOT to Use This”, acronym glossary in HOW_IT_WORKS, and plain-meaning config guidance without changing code or contracts
**v3.8.3**human-friendly metric output (value / healthy direction / what it means + deficit bands) and deterministic Next Steps across rich/text/markdown; VS Code webview surfaces (4D breakdown, cleanup plan, pulse, diff-aware review); fixes for dead-code semantics, adaptive-init config preservation, and unused-deps stdlib / dev-tool false positives
**v3.8.2**adaptive --init adds bounded repo-signal suggestions and preview/merge flows; npm wrapper adds typed contracts, Node API, and agent workflow docs; local impact tracking and opt-in telemetry become first-class observability surfaces
**v3.8.1**cleanup-family outputs become confidence-ranked action plans; unused-deps grows manifest hygiene for pyproject.toml / package.json; boundary-violations gains opt-in layered architecture review with explicit rule evidence
**v3.7.9****Governance gate**: verify-governance fail-closed CLI, deterministic governance-record verification, and a formal split between scoring math and enforcement
**v3.7.3****Hotfix**: pydantic import wrapped in try/except ImportError — package imports cleanly in stripped environments; test_api_models.py guard corrected to fastapi; CI Docker login continue-on-error, quality gate pinned to >=3.7.3
**v3.7.2****Core schema validation**: config.py Pydantic guards catch bad .slopconfig.yaml at load time (wrong weight types, domain_overrides non-int thresholds); LDRResult / DDCResult / InflationResult __post_init__ clamps protect GQG math.log(); HistoryEntry sanitises all LEDA calibration inputs + validates fired_rules JSON; **VS Code**: schema.ts ISlopReport interfaces + parseSlopReport() handwritten discriminated-union guard — schema mismatch surfaces exact field path before silent NaN
**v3.7.1**LintEscapePattern docstring FP fix; self-scan avg_deficit 13.85 → 9.80; global_injector.py Patch 1 removed; .slopconfig.yaml domain_overrides expanded; **Skill**: 3-Phase Pipeline (Triage → Deep-Dive → Action Plan), /slop-delta before/after comparison, Confidence Routing by status band, → Next: guidance per command; **VS Code**: P1 monolith → 8 focused modules, P2 SlopCodeActionProvider (QuickFix for phantom_import/god_function/lint_escape), P3 TreeView sidebar (3-level hierarchy), P4 SlopCodeLensProvider (file summary + per-function hints)
**v3.7.0**Dogfooding calibration + SKILL.md OSOT repair (10 violations); cli_renderer.py split (730 lines → 4 renderer modules); python_advanced.py split (1150 lines → 5 modules); BUG-1 ddc weight 0.30→0.20; BUG-2 findings filter threshold fix; BUG-3 AST-accurate test counts; BUG-5 block-scoped YAML rewrite in self_calibrator; 314 tests GREEN
**v3.6.0**Claude Code Skill (/slop, /slop-file, /slop-gate, /slop-spar); CI gate bugfix (--ci-mode hard now exits non-zero without --ci-report); pre-commit hooks rewritten (python -m entry, 3 hook variants); VS Code Extension v3.6.0 VSIX; docs: Purity row, weight normalization note, [go] extra; 311 tests GREEN
**v3.5.0**Domain-aware --init (8 profiles, --domain flag); JS/TS analysis via JSAnalyzer v2.8.0 + [js]; Go analysis via GoAnalyzer v1.0.0 + [go]; self-calibration patches: project-scoped history (project_id), re-scan milestone trigger, domain-anchored grid search (±0.15), CalibrationResult.warnings (drift > 0.25); 308 tests GREEN
**v3.4.1**FileRole.STUB (Protocol/ABC stubs skip ldr+patterns); auto-discover .slopconfig.yaml; Python 3.8 CI compat; mypy attr-defined fix
**v3.4.0**Per-rule FP rate tracking (LEDA Phase 2A); purity weight ceiling MAX_PURITY_WEIGHT=0.25 (Phase 2B)
**v3.3.0**File role classifier (SOURCE/INIT/RE_EXPORT/TEST/MODEL/CORPUS); DDC annotation-only import fix; # noqa: F401 + __all__ re-export recognition
**v3.2.1**Auto-calibration at every 10-scan milestone (no manual cmd); P2 git noise filter; P3 per-class thresholds (5+5); calibrate() min_events bugfix; 11/11 e2e GREEN
**v3.2.0**4D calibration (purity dimension); --init bootstrap; auto-calibration hints; 44/44 self-scan CLEAN
**v3.1.2**data_collector refactor; slopconfig gap fill; 43/43 self-scan CLEAN
**v3.1.1**Clone Detection in Core Metrics table; table style unification; VS Code UX
**v3.1.0**3 new adversarial patterns (function_clone_cluster, placeholder_variable_naming, return_constant_stub); GQG calibrator alignment; fhval SPAR-Code
**v3.0.2**Phantom import 3-tier classification; __init__.py LDR fix; god_function LOW demotion
**v3.0.0**Geometric mean scorer (GQG); purity dimension; DCF per-file; structural coherence
**v2.9.3**Self-calibration engine; weight grid-search from usage history
**v2.9.0**phantom_import CRITICAL detection; history auto-tracking

Full Release Notes → · Changelog →

---

(package.json is private): install it from a checkout of this repository.

pip install ai-slop-detector # Python backend required npm install --save-dev /path/to/AI-SLOP-Detector/npm-wrapper

npx ai-slop-detector scan . # runs the locally installed wrapper npx ai-slop-detector review . --format json npx ai-slop-detector pulse . --format json npx ai-slop-detector sweep dead-code . --format json npx ai-slop-detector mcp

No install required

uvx ai-slop-detector mycode.py ```

The npm surface is intentionally thin:

- it does not reimplement analysis logic - it delegates into the Python CLI/runtime - it exists for Node-first teams that want npx-style entry without changing product semantics; it is not on the npm registry, so `npm install ai-slop-detector` by name does not install it - it requires a Python backend and discovers it in this order: AI_SLOP_DETECTOR_EXECUTABLE -> active VIRTUAL_ENV -> PATH executables -> python -m slop_detector.cli - it ships version-pinned TypeScript interfaces at ai-slop-detector/types - it exports a small async Node API for scanProject, reviewChanges, computeHealth, and runCleanupFamily

Windows / PowerShell tip: PowerShell > redirection writes UTF-16 LE or UTF-8 with BOM by default, which breaks json.load(..., encoding='utf-8'). Use --output <path> instead — it writes UTF-8 bytes (no BOM) directly, skipping the shell.

<p align="center"> <img src="docs/assets/cli-output.png" alt="CLI Output Example" width="800"/> </p>

---

Quick Start

```bash pip install "ai-slop-detector>=3.11.0"

slop-detector scan . # canonical analysis entry slop-detector review . --json # canonical changed-code review slop-detector pulse . --json # canonical repo health view slop-detector sweep dead-code . --json # canonical cleanup family

Optional extras

pip install "ai-slop-detector[js]" # JS/TS tree-sitter analysis pip install "ai-slop-detector[go]" # Go tree-sitter analysis

`.slopconfig.yaml` sensitivity

Your .slopconfig.yaml contains domain_overrides — a precise map of which functions are exempt from complexity rules. This is effectively a codebase weakness surface: it reveals which areas are too complex to refactor right now.

Best practice: - Run slop-detector --init to generate .slopconfig.yaml and auto-add it to .gitignore - To share governance config with your team, explicitly remove .slopconfig.yaml from .gitignore - Open-source repos committing it is fine (transparency over obscurity — see this project's own .slopconfig.yaml)

.pre-commit-config.yaml

repos: - repo: https://github.com/flamehaven01/AI-SLOP-Detector rev: v3.7.3 hooks: - id: slop-detector # hard gate — fails on CRITICAL_DEFICIT >= 70 # - id: slop-detector-warn # soft mode — reports only, never blocks # - id: slop-detector-patterns # fast per-file pattern scan


**GitHub Actions** (runs on every PR):
yaml

Configuration

```yaml

.slopconfig.yaml

weights: ldr: 0.40 inflation: 0.30 ddc: 0.20 purity: 0.10

patterns: god_function: domain_overrides: - function_pattern: "check_node" # AST walker — complex by design complexity_threshold: 30 lines_threshold: 200

ignore: - "tests/" - "/init.py"

advanced: exact_topology_ceiling: 300 topology_mode_above_ceiling: deterministic_approximate analysis_cache_enabled: true analysis_cache_db: "" churn_commit_window: 200 coverage_data_file: ".coverage" hotspot_limit: 10 hotspot_weights: deficit: 0.50 churn: 0.30 coverage_gap: 0.20

architecture: enabled: true preset: layered layers: [] ```

Full Configuration Guide → · Config Examples →

---

Programmatic Node API

import { scanProject, reviewChanges, computeHealth, runCleanupFamily } from "ai-slop-detector"

Claude Code Integration

```bash cp -r claude-skills/slop-detector ~/.claude/skills/

CI/CD Integration

pre-commit (runs on every commit): ```yaml

.github/workflows/quality-gate.yml

- name: AI-SLOP Gate run: | pip install "ai-slop-detector>=3.7.3" slop-detector --project . --ci-mode hard --ci-report


**Enforcement modes:**
bash --ci-mode soft # informational, never fails build --ci-mode hard # fails: deficit_score >= 70, critical_patterns >= 3, inflation >= 1.5, ddc < 0.5 --ci-mode quarantine # escalates repeat offenders after 3 violations ```

Full CI/CD Integration Guide →

---

VS Code Extension

Real-time inline diagnostics, debounced lint-on-type, ML score and purity signal in status bar. v3.7.1 rebuilt from a single 855-line monolith into eight focused modules.

What you see:

SurfaceDetail
Status bar$(error) SLOP 45.2 — severity icon + deficit score, updates on save
Inline diagnosticsPattern issues with line references — phantom imports, god functions, lint escapes
**TreeView sidebar**Activity bar panel: files sorted by deficit score, metric rows (LDR/DDC/Purity/Inflation), issue list with click-to-navigate
**CodeLens**Line 0: file summary (SLOP 45.2 — 3 CRITICAL); per-function: top severity icon + pattern IDs
**QuickFix (CodeAction)**Lightbulb on phantom_import/god_function/lint_escape diagnostics — show output or add to .slopconfig.yaml ignore
ML signalML: 73% [slop] in summary diagnostic when [ml] extra is installed

Commands (Ctrl+Shift+P > "SLOP"):

CommandDescription
Analyze Current FileOn-demand single-file scan
Analyze WorkspaceProject-wide scan, populates TreeView
Show 4D BreakdownWebview: penalty attribution — why a file is not 0.0
Show Cleanup PlanWebview: confidence-ranked sweep family (safe/needs/unsafe)
Show Pulse DashboardWebview: project health + priority hotspots
Show Changed-Code ReviewWebview: diff-aware review, new-vs-inherited slop
Auto-Fix Detected IssuesApply (or dry-run preview) auto-fixable patterns
Show Gate Decision (SNP)PASS/HALT with sr9/di2/jsd/ove metrics
Run Cross-File AnalysisDependency + clone graph across project
Show File HistoryPer-file deficit score trend
Show History Trends7-day project-wide daily trend table
Export History to JSONLDump history.db records for external analysis
Bootstrap .slopconfig.yamlDomain-aware config generation (--init)
Run Self-CalibrationAdvisory 4D weight report (weights are not applied)

Install from the VS Code Marketplace or build locally:

cd vscode-extension
npm install
npx vsce package          # produces vscode-slop-detector-3.7.3.vsix
code --install-extension vscode-slop-detector-3.7.3.vsix

Settings (slopDetector.*): pythonPath, lintOnSave, lintOnType, failThreshold (default 50), warnThreshold (default 30), recordHistory, enableCodeLens (default true).

---

🇨🇳 中文文档镜像 AI 翻译 2026-06-07
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

AI-SLOP Detector 是一个用于检测代码复杂度和优化代码质量的工具。它提供了一个简单的命令行界面,能够自动检测代码域并生成配置文件。

⚡ 功能介绍

AI-SLOP Detector 的主要功能包括:域感知、自动检测代码域、生成配置文件、代码扫描、代码审查、代码优化等。

🛠 安装步骤(Docker/pip/源码)

AI-SLOP Detector 不需要安装任何依赖项。您可以直接使用 pip 安装它:pip install "ai-slop-detector>=3.8.2"。如果您使用 Docker,需要使用 Dockerfile 构建镜像。

🚀 使用教程

使用 AI-SLOP Detector 的步骤包括:扫描代码、审查代码、查看代码健康状况等。您可以使用以下命令来使用它:slop-detector scan .、slop-detector review . --json、slop-detector pulse . --json 等。

⚙️ 配置说明(含 MCP / env)

AI-SLOP Detector 使用配置文件来存储用户的设置。配置文件的内容包括域覆盖、代码扫描规则等。您可以使用 --init 命令来生成配置文件。

🔌 API 说明

AI-SLOP Detector 提供了一个 Node API,用于程序matic 地使用它。API 的接口包括:scanProject、reviewChanges、computeHealth、runCleanupFamily 等。

🔄 工作流/模块

AI-SLOP Detector 的工作流包括:代码扫描、代码审查、代码优化等。它还支持 CI/CD 集成,包括 GitHub Actions 和 pre-commit 等。

🎯 aiskill88 AI 点评 A 级 2026-06-07

高质量的AI代码质量检测工具

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • Docker:AI-SLOP-Detector 提供官方镜像,docker compose up 一键启动
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
AI-SLOP-Detector 中文教程AI-SLOP-Detector 安装报错怎么办AI-SLOP-Detector MCP 配置AI-SLOP-Detector Docker 部署AI-SLOP-Detector Agent 工作流AI-SLOP-Detector 与同类工具对比AI-SLOP-Detector 最佳实践AI-SLOP-Detector 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • 生产部署优先使用 Docker Compose 隔离依赖,并挂载 volume 持久化数据
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • 容器内无法访问宿主机 localhost — 使用 host.docker.internal
  • Python 依赖冲突:建议用 venv / uv 隔离环境

👥 适合人群

AI 技术爱好者研究人员和学生开发者和工程师技术创业者

🎯 使用场景

  • 本地部署运行,保护数据隐私,满足合规要求
  • 自定义集成到现有系统,扩展技术栈能力
  • 作为开源基础组件进行商业化二次开发

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +完全开源免费,无授权费用
  • +本地部署,数据完全自主可控
  • +开发者社区支持,遇问题可查可问
⚠️ 不足
  • −安装和初始配置可能需要一定技术基础
  • −功能完整性通常不如成熟商业产品
  • −技术支持主要依赖开源社区,响应速度不稳定
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

AI-SLOP-Detector 是一款Python开发的AI辅助工具。开源AI工具: Stop shipping AI slop. Detects empty functions, fake documentation, and inflate。⭐61 · Python 主要应用场景包括:检测AI代码质量。
💡 AI Skill Hub 点评

经综合评估,AI代码质量检测 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

📚 深入学习 AI代码质量检测
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 AI-SLOP-Detector
原始描述 开源AI工具: Stop shipping AI slop. Detects empty functions, fake documentation, and inflate。⭐61 · Python
Topics ai-code-qualityai-detectioncode-analyzer
GitHub https://github.com/flamehaven01/AI-SLOP-Detector
License MIT
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/flamehaven01/AI-SLOP-Detector 🌐 官方网站  https://flamehaven.space/work/ai-slop-detector/

收录时间:2026-06-07 · 更新时间:2026-06-08 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →