/mays:deslopfrom mays
Measures code complexity with real tools, deletes dead/redundant code, refactors hotspots, and proves behavior unchanged. Targets AI-generated slop, spaghetti, and god functions.
Ships in mays. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
AI-generated code often works but branches like a jungle and hoards code nobody asked for. This skill measures the mess, deletes what shouldn't exist, and restructures what should.
git diff main...HEAD (or the repo's default branch). Leave pre-existing slop alone unless asked.Run a complexity tool on every target file before touching anything. Prefer, in order:
radon cc -s -a <path>complexity rulegocyclolizard <path> (pip install lizard into a venv if missing)if, case, loops, catch, ternary, &&, ||).The project's own linter threshold wins if one is configured. Otherwise use these soft defaults — they inform judgment, they don't replace it:
| Signal | Fine | Refactor when touching | Fix now |
|---|---|---|---|
| CC per function | ≤ 10 | 11–15 | > 15 |
| Nesting depth | ≤ 2 | 3 | ≥ 4 |
| Lines per file | ≤ 500 | 500–1000 | > 1000 |
Rank all functions by CC descending. Report the hotspot table with numbers before editing anything.
Hunt these in every target file. Each is a deletion or merge, not a rewrite:
any / unknown / bare casts: replace with the real type. unknown survives only at a true trust boundary, immediately narrowed.Before refactoring a function, climb this ladder and stop at the first rung that holds:
isEligibleForRefund(order) beats four-clause boolean soup.continue instead of nested if.Do not game the metric. A dense one-liner hiding six branches is worse than the if-chain it replaced. Complexity moves into well-named units; it doesn't vanish into cleverness.
End with:
## Deslop report
| Function | CC before | CC after |
|----------|-----------|----------|
| parseOrder | 18 | 4 |
Deleted: 120 lines (dead: retryLegacy, duplicate: formatDate2)
Extracted: validateHeader, resolveDiscount
Types fixed: 3 `any` → typed
Behavior verified: <test command and result>
Keep prose minimal. Numbers and diffs do the talking.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub stevenmays/dotfiles --plugin mays14 skills in this plugin
/adversarial-reviewTwo-family adversarial review of a plan or a diff — one fresh Claude subagent and one external run (GPT through Codex, or Grok through Cursor) on identical briefs, launched concurrently, then triaged into verified blockers, concerns, and rejected findings. Use before approving a plan, before shipping a change, or whenever a workflow asks for an adversarial review./claims-verificationCheck the factual claims a plan makes about existing code against the repo — extract atomic claims, have a fresh subagent answer neutral questions without seeing the plan, then score each claim. Use after a plan is drafted and before adversarial review, or whenever a workflow asks to verify a plan's claims./claude-subagentsDispatch planning, review, implementation, or a scoped question to a fresh Claude subagent with the Agent tool — which subagent type and model to pick, what the prompt must carry, and how to check what comes back. Use whenever a workflow hands work to a Claude subagent, including the Claude half of adversarial-review./codex-image-generatorDefault image generation path. Generate or edit raster images (hero images, illustrations, textures, product shots, mockups, transparent cutouts) through the Codex CLI's built-in image_gen tool, run in a subagent. Use whenever the user asks for an image, picture, illustration, or visual asset and does not name a provider. Not for SVG, icons, or diagrams that belong in code./external-subagentsRun a planning, research, review, or implementation task on a second model family as a background subagent that cannot hang the session — GPT through the Codex CLI, or the newest Grok through the Cursor CLI where Codex is missing. A wrapper kills stalled runs and salvages partial output. Use whenever a workflow sends work to Codex, Cursor, GPT, Grok, a second model, or a non-Claude subagent, including the external half of adversarial-review. Not for images./extreme-code-quality-reviewRun an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for an extreme code quality review, deep code quality audit, or especially harsh maintainability review.Other plugins' skills for the same job