- Home
- Skills
- Baz Scm
- Awesome Reviewers
- Code Readability
code-readability_skill
- HTML
93
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill baz-scm/awesome-reviewers --skill code-readability- SKILL.md1.6 KB
Overview
This skill helps authors write clean, understandable, and self-documenting code that is easy to review and maintain over time. It focuses on naming, clarity, and structure so code communicates its intent without heavy external documentation. The result is fewer bugs, faster reviews, and smoother handoffs between teammates.
How this skill works
The skill inspects code for readability patterns: naming quality, explicitness of logic, use of magic numbers, and clarity of flow. It suggests concrete rewrites such as more descriptive names, intermediate variables to expose intent, and replacement of implicit conversions with explicit, named constructs. It also highlights areas where simplification improves maintainability.
When to use it
- During pull request reviews to highlight readability regressions
- When refactoring legacy code to make intent explicit
- Before handing work off to another team or new engineer
- When writing library or API code that others will depend on
- While applying consistent style and naming conventions across a codebase
Best practices
- Prefer descriptive names that convey intent (e.g., getUserProfile over getData)
- Choose clarity over clever one-liners; favor explicit constructs
- Replace magic numbers and implicit casts with named constants and conversions
- Introduce well-named intermediate variables to expose complex logic
- Keep functions short and focused; single responsibility improves readability
Example use cases
- Suggest renaming ambiguous variables and functions in a code review
- Refactor a dense expression into several named steps for easier debugging
- Audit a module for hidden side effects or implicit type coercion
- Convert magic literals into constants with descriptive names
- Evaluate API surface for self-documenting method and parameter names
FAQ
Aim for names that make intent obvious while staying concise; prefer clarity over micro-optimization of length.
When is a one-liner acceptable?
Use one-liners only when they remain immediately clear to a reader; otherwise split into named steps.