deslop

Launches seven parallel agents to detect and remove code duplication, dead code, weak types, and AI slop.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/brandhaug/skills --skill deslop-brandhaug
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: deslop
Source: https://github.com/brandhaug/skills/tree/main/deslop
Command: npx skills add https://github.com/brandhaug/skills --skill deslop-brandhaug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate duplication, dead code, weak typing, defensive clutter, and AI-generation tells that degrade maintainability, and manually auditing a large codebase or PR for all of these at once is slow and inconsistent. ## Core Features & Use Cases - Seven parallel analysis agents: Deduplication, type consolidation, unused code, weak types, defensive programming, legacy code, and AI slop / over-nesting / style drift, all reporting findings in a shared JSON format. - Scoped sweeps: Run against the full codebase, a directory, a PR number (resolved via gh), or a branch diff, with automatic excludes for build output, vendored code, and lockfiles. - Safe apply workflow: Findings are consolidated into deslop-report.md, reviewed with the user, then applied by category in isolated git worktrees with build, typecheck, and tests run between merges. - Use Case: Before merging a large feature branch, run a deslop sweep on the diff to strip AI-generated comments, flatten over-nested conditionals, and remove unused exports, then apply the approved fixes on a dedicated cleanup branch. ## Quick Start Ask the assistant to deslop the current branch or a directory such as src/api and review the consolidated report before applying fixes.

Frequently Asked Questions about deslop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up AI-generated code in a pull request?▼

Run the deslop sweep scoped to the PR number, which resolves changed files via gh and analyzes only that diff. Seven agents flag AI slop such as narrating comments, over-nesting, and style drift, and approved fixes are applied on a separate cleanup branch.

How to find unused code in a TypeScript or Python codebase?▼

The unused-code agent runs tools like knip, ts-prune, ruff, and vulture, then verifies every finding with a full-codebase grep to catch dynamic references and public API surface. Only findings confirmed by both tool and grep are marked high confidence.

Does deslop support languages besides TypeScript?▼

Yes, it covers TypeScript, JavaScript, Python, Go, and Rust, with language-specific checks for weak types, unused code, and error-swallowing patterns. Polyglot repos are bucketed by language, and each language gets its own set of seven agents.

Can deslop edit my code automatically without review?▼

No. The analysis pass never edits files, and findings below 0.7 confidence are quarantined as needing review. Changes are applied only after user approval, on a dated deslop branch, never directly on main or master.

What happens when the codebase scope is too large to analyze?▼

If the resolved scope exceeds 500 files, the workflow stops and prompts you to narrow it by directory, by recent churn using git log, or by the largest files. This prevents agents from exceeding their context on huge scopes.