cleanser
Important — Spawn a sub-agent to perform this review. Pass it only these instructions and the target files. The review is most effective when the agent starts with a clean context window.
Scope
If the user specified files or directories, pass those to the sub-agent. If not, ask what they'd like you to review before proceeding.
Goal
Make this code trivially easy to pick up cold. Someone opening this file in six months should understand what it does in seconds. All changes should preserve the original functionality and behavior.
What to look for
Read the target code carefully, then apply these passes in order. Make changes directly — don't list suggestions.
1. Flatten control flow
Nested conditionals are the single biggest readability killer. Flatten them.
More from andrewgleave/skills
writing-for-interfaces
>
418critical-reasoning
Apply critical rationalist epistemology (Popper, Deutsch) to evaluate reasoning, identify errors, and refine understanding. Use when the user explicitly requests help with reasoning - phrases like "help me think this through", "does this make sense", "any flaws in this", "what am I missing", "critique this", "is this reasoning sound", "stress test this idea", "devil's advocate", or any request to evaluate arguments, identify logical problems, or improve thinking. Also use when errors in reasoning are significant enough to materially affect the user's goals, even if not explicitly requested.
62cleanse
>
205-steps
>
13navvy
>
10simplify
>
1