clarification
Use when a user's request is vague, ambiguous, or underspecified. Explores the codebase first, then runs an iterative Q&A loop…
Corrective cleanup of AI-generated code — removes LLM-specific patterns while preserving behavior. Use when the user says "deslop", "slop", "clean AI code", "remove AI patterns", or when you spot LLM-generated code smells after any generation session. For general post-change
$ npx -y skills add tmdgusya/engineering-discipline --skill clean-ai-slop --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/clean-ai-slopContext preview
The summary Claude sees to decide when to auto-load this skill.
Corrective cleanup of AI-generated code — removes LLM-specific patterns while preserving behavior. Use when the user says "deslop", "slop", "clean AI code", "remove AI patterns", or when you spot LLM-generated code smells after any generation session. For general post-change
name: clean-ai-slop
description: Corrective cleanup of AI-generated code — removes LLM-specific patterns while preserving behavior. Use when the user says "deslop", "slop", "clean AI code", "remove AI patterns", or when you spot LLM-generated code smells after any generation session. For general post-change review and fixes ("clean up", "simplify"), use the simplify skill instead.A corrective discipline for cleaning AI-generated code. Runs after code generation — whether from `run-plan`, a manual session, or any other source.
The core problem: LLMs produce code that works but carries distinctive smells. Over-commenting, unnecessary abstractions, defensive paranoia for impossible scenarios, verbose naming. Left unchecked, these accumulate into a codebase that is harder to read and maintain than hand-written code.
This skill removes those smells systematically, one category at a time, without changing behavior.
These rules have no exceptions.
1. **Lock behavior before cleaning.** Run existing tests. If coverage is insufficient, add regression tests for the code you're about to touch. No test coverage, no cleanup. 2. **One smell category per pass.** Do not mix dead code removal with naming fixes. Complete one pass, verify, then start the next. 3. **Run tests after every pass.** If tests fail, revert the pass and investigate. Do not proceed to the next category. 4. **Stay in scope.** Only touch files that were generated or modified by AI. Do not expand into "nearby" code that looks like it could use improvement. 5. **Preserve behavior exactly.** If a cleanup changes observable behavior — even if you think the new behavior is "better" — revert it. Behavior changes require a separate task.
Passes execute in this order. Each pass completes fully before the next begins.
Remove code that serves no purpose.
Detection: compiler warnings, linter output, IDE grayed-out symbols. Trust the tooling.
Remove comments that restate what the code already says.
Targets:
Keep: comments that explain *why*, not *what*. Comments about non-obvious constraints. Links to external documentation or issues.
Remove indirection that serves no purpose.
Targets:
Test: if removing the abstraction makes the code shorter *and* equally readable, it was unnecessary.
Remove error handling for scenarios that cannot occur.
Targets:
Keep: validation at system boundaries (user input, external APIs, file I/O). Error handling where the runtime genuinely can fail.
Shorten names that carry redundant information.
Targets:
Rule: a name should be as short as possible while remaining unambiguous in its scope. Longer scope = longer name. Short scope = short name.
Remove artifacts of LLM generation style.
Targets:
1. Identify scope (which files to clean) 2. Run existing tests — all must pass before starting 3. Add regression tests if coverage is thin 4. Execute Pass 1 → verify → commit 5. Execute Pass 2 → verify → commit 6. ... continue through all relevant passes 7. Run full test suite 8. Report summary of changes
Not every pass applies to every codebase. Skip passes that have zero findings. But execute in order — never jump ahead.
| Impulse | Why It Fails | |---|---| | "I'll clean everything in one big pass" | Mixed changes are impossible to debug when tests break | | "This abstraction is bad, let me redesign it" | Redesign is a separate task, not cleanup | | "Tests pass, so I'll skip the per-pass verification" | A later pass may interact with an earlier change | | "This code nearb
Engineering discipline skills for AI coding agents. Works with Claude Code, Gemini CLI, OpenCode, Codex, and Cursor.
Use when a user's request is vague, ambiguous, or underspecified. Explores the codebase first, then runs an iterative Q&A loop…
Behavioral guardrails to prevent common LLM coding mistakes — enforces surgical changes, assumption verification, and scope…
Orchestrates multi-day execution of complex tasks through milestones. Each milestone goes through plan-crafting, run-plan…
Decomposes complex, multi-day tasks into optimized milestones (ultraplan). Broad parallel exploration grounds a draft milestone…
Use when a task's scope is clear and multi-step implementation is needed, before touching code. Triggered after clarification is…
Use after run-plan completes to independently verify the implementation. Reads only the plan document and inspects the codebase…