← ClaudeAtlas

analyze-code-densitylisted

Analyze code for AI-generation slop: duplication, dead code, redundant comments, verbosity inflation, over-abstraction, error masking, convention violations, hallucinated dependencies, and performance waste. Score mode only: dispatches 10 analysis methods as parallel subagents and aggregates a composite 0-100 density score with per-method findings. Works on a git diff/branch/PR with repo context, or on standalone files. Use when asked to "check code density", "find AI slop in this code", "is this code bloated", "review this AI-generated code", "code slop check", or before merging agent-authored changes.
Max-Levitskiy/skills · ★ 0 · AI & Automation · score 66
Install: claude install-skill Max-Levitskiy/skills
# Code Density Analyzer (score mode) Detect AI-code slop — repeated logic, filler constructs, and reviewer-repellent patterns — and score how dense the code is. This skill only reports; it never edits code. ## Step 0: Determine target and mode **Diff mode** (preferred) — use when inside a git repository and any of: - the user names a branch/PR/commit range → target = that range's diff - uncommitted changes exist → target = `git diff HEAD` (staged + unstaged) **Standalone mode** — use when the user names specific files/snippets, or no git repo is present. If ambiguous, ask: "Analyze the current diff, or specific files?" ## Step 1: Assemble the analysis input Both modes: number all lines (`cat -n` style) and prefix each file with its path. Diff mode: 1. Collect the diff and the full post-change content of each changed file (subagents need surrounding context, not just hunks). 2. Build repo-context excerpts, bounded to ~300 lines total: for each changed file, include the signatures + docstrings of util/helper modules it imports or that live in obviously shared locations (`utils/`, `lib/`, `common/`, `helpers/`), plus one sibling file as a convention sample. Use `grep -rn "def \|function \|class " <shared dirs> | head -80` to build a signature index rather than pasting whole files. 3. If the diff exceeds ~3000 changed lines, split by top-level directory and run the whole analysis per split, then report per-split scores. Standalone mode: the named file