| name | dandy-code-readability-pass |
| description | Improve code readability by tightening formatting, visual grouping, method size, comments, and dead-code removal. |
| argument-hint | [file, diff, or code snippet] |
Readability Pass
Use this skill when a user asks for cleaner, more readable code, a style-focused review, or a refactor that preserves behavior.
The output should identify readability blockers and, when editing is requested, apply small behavior-preserving changes.
Workflow
- Separate machine-formatting issues from human-structure issues. Formatters handle spacing; the agent handles logical grouping.
- Group code into visible paragraphs: setup, main action, side effects, and return.
- Shorten methods by extracting real responsibilities, not by creating private step wrappers with no independent meaning.
- Remove commented-out code, unreachable code, obsolete names, and justification comments.
- Keep comments that explain why, constraints, or examples. Remove comments that restate obvious code.
- Prefer straightforward code over clever compression.
- Preserve behavior unless the user explicitly asks for a semantic refactor.
References
Artifact Ownership
This skill may read and edit source files when the user asks for readability improvements. Do not change formatter configuration, architecture docs, or project rules unless requested.
Config Policy
If project config defines an artifact language, use it for review notes and generated comments. Keep code identifiers in the project language and naming style.