skills/de-slop/SKILL.md
Detect and fix AI-generated code anti-patterns ("slop") across Rust, Python, TypeScript, Go, and Shell. Use whenever you generate or edit code, when the user says "de-slop", "clean up AI code", "remove AI slop", or during /simplify and /cook flows. Also trigger proactively as a pre-commit checklist on AI-written changes. Do NOT use for correctness or bug review — use /age or /code-review.
npx skillsauth add paulnsorensen/dotfiles de-slopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fix AI-generated code anti-patterns. Don't audit — just fix and explain.
AI coding assistants pattern-match from training data full of beginner code, tutorial examples, and over-documented libraries. The result is code that looks professional but violates the engineering principles that matter: fail fast, YAGNI, loose coupling, real-world naming.
This skill teaches you what to catch and how to fix it.
references/ (only the languages present)These apply to every language. They're the most common AI tells.
AI explains what code does instead of why. Every function gets a docstring. Every line gets a narration comment.
Fix: Delete comments that restate the code. Keep only comments that explain non-obvious intent, business rules, or "why not the obvious approach."
Try/catch wrapping every operation, swallowing errors silently, returning empty defaults instead of propagating failures.
Fix: Let errors propagate to where they can be handled meaningfully.
A function that returns {} on failure is worse than one that throws —
the caller silently gets corrupted data.
Abstract base classes, interfaces, factory functions, and plugin systems for problems with exactly one concrete implementation.
Fix: Delete the abstraction. Write the concrete implementation directly. Three similar lines of code is better than a premature abstraction. Extract only when there are 3+ real consumers.
user_data_dictionary, list_of_user_objects, current_item_being_processed.
These names couple to the data structure and add noise.
Fix: Name after the domain concept: users, items, user.
A name should tell you what the thing represents, not what container it lives in.
Annotating local variables where the type is immediately obvious from the
right-hand side. Function signatures deserve annotations; const x: number = 5 doesn't.
Fix: Remove annotations where inference handles it. Keep them on function signatures (they're the public contract) and where the inferred type would be unclear.
AI imports entire module sets "just in case" and leaves commented-out alternative implementations.
Fix: Delete unused imports and dead code. No // Alternative approach:
blocks. If it's not called, it's not code.
Patterns copied without understanding: if __name__ == "__main__": in every
Python file, "use strict" in TypeScript, context.TODO() in non-concurrent
Go paths.
Fix: Remove boilerplate that serves no purpose in context. Apply patterns only where they're needed.
AI generates many shallow tests covering the same code path with slightly different inputs ("write empty bytes succeeds", "write binary data succeeds", "write special characters succeeds" — all testing the same thing).
Fix: Consolidate into parameterized tests. One test per behavior, not one test per input variation. 35 tests for a 119-line implementation is a smell — aim for focused tests that cover actual edge cases and error paths.
AI silences compiler/linter warnings with suppression comments instead of fixing
the underlying issue: #[allow(dead_code)], # noqa, // @ts-ignore,
//nolint, // eslint-disable.
High-confidence smells (almost always slop):
#[allow(clippy::unwrap_used)], #[allow(clippy::dbg_macro)], #[allow(clippy::print_stdout)], #[allow(clippy::panic)], #[allow(clippy::todo)]# noqa: E501 (line too long), # pylint: disable=missing-docstring// @ts-ignore (error suppression without @ts-expect-error)//nolint (generic suppression without specific lint name)# shellcheck disable=SCxxxx (broad suppression instead of fixing the script)Fix: Remove the suppression, read the warning, fix the root cause. If the suppression is truly needed, scope it narrowly and add a comment explaining why. See language references for specific patterns (Rust has the deepest taxonomy).
AI writes set -e but omits -u (undefined variables) and -o pipefail
(pipeline error propagation). This is especially dangerous in scripts that
pipe through jq/yq/grep — a failure in the left side of the pipe is
silently ignored.
Fix: Always use set -euo pipefail in bash scripts. All three flags
together. set -e alone is a half-measure.
Read these only for languages present in the code being reviewed:
| Language | Reference |
|----------|-----------|
| Rust | references/rust.md |
| Python | references/python.md |
| TypeScript/JavaScript | references/typescript.md |
| Go | references/go.md |
| Shell/Bash | references/shell.md |
When fixing code, explain each change concisely:
De-slopped 4 patterns:
- Removed 3 docstrings that restated function names
- Replaced try/except swallowing with error propagation (fail fast)
- Deleted unused imports (os, sys, logging)
- Renamed `user_data_dictionary` → `users`
Don't over-explain. The fix speaks for itself.
unwrap() in Rust test code is idiomatic, not slop — only flag in production code#[cfg(test)] are often legitimate — check context before removing#[allow(clippy::pedantic)] at crate level is a style choice, not sloptools
Reconstruct what a past coding-agent session was doing so you can resume it — goal, files touched, last verified state, and the next step — by querying the session logs. Use when the user says "what was I working on", "recover that session", "reconstruct where I left off", "resume my last session", "what did that session change", "rebuild context from logs", or invokes /work-recovery. Report-only — it never scores or judges. Do NOT use for usage scoring (that is /skill-improver, /tool-efficiency, /prompt-analytics) or one-off interactive log queries (that is /session-analytics).
development
Curate this repo's hallouminate wiki (.hallouminate/wiki/, the repo:dotfiles:wiki corpus) — add or update architecture pages, per-harness docs, and gotchas. Use when the user says "update the wiki", "document this in the wiki", "refresh the harness docs", "add a wiki page", "curate the wiki", "the wiki is stale", or invokes /wiki-curator. Also use at session end to write back a non-obvious decision or gotcha worth preserving. Grounds the existing wiki first, follows one-topic-per-file conventions, verifies every external doc URL before writing, and reindexes. Do NOT use for general code search (that is cheez-search) or for editing AGENTS.md command reference.
tools
Audit how a tool, command, or MCP server is actually used across coding-agent sessions and produce calibrated recommendations — tool-vs-task fit, error forensics, fix recommendations, permission friction, MCP health, and token economics. Use when the user says "tool efficiency", "am I using X efficiently", "audit tool usage", "why does X keep failing", "how do I fix this error", "what should I change", "permission friction", "is this MCP worth it", "tool error rate", "fix recommendations", or invokes /tool-efficiency. Do NOT use for auditing a skill or agent definition (that is /skill-improver) or for one-off interactive log queries (that is /session-analytics).
tools
Analyze how prompts and skill routing behave across coding-agent sessions and produce calibrated recommendations — prompt-pattern analysis, routing accuracy, and knowledge gaps. Use when the user says "analyze my prompts", "prompt patterns", "is routing working", "which skill should have fired", "knowledge gaps", "what do I keep asking", or invokes /prompt-analytics. Do NOT use for auditing a single skill/agent definition (that is /skill-improver), tool/MCP efficiency (that is /tool-efficiency), or one-off interactive log queries (that is /session-analytics).