clean-code

Solid

Language-agnostic clean-code baseline: naming, functions, error handling, comments, duplication. Use before writing or reviewing code in any language, when no language-specific clean-* skill applies.

Code & Development 5 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
26
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Clean Code Principles Use these when you write, review, or refactor code. Treat these as directional principles. Where a repo's established precedent or a language's own idioms conflict with a rule here, follow the local convention and match the surrounding code. --- ## 1. Naming & Readability ### 1.1 Avoid Disinformation Never use variable names that create false expectations, contain misleading technical terms, or use visually confusing characters. **Do:** - Use names that honestly reflect the data structure (`accountsMap`, `accountsGroup`). - Use distinct names for classes/variables so autocomplete doesn't trick you. **Don't:** - Name a map `accountList` just because it holds several items; to a programmer "list" means an indexed structure. - Create names that vary in tiny ways (e.g., `ABCManagerForEfficientProcessingOfUsers` vs `...PersistingOfUsers`). - Use characters that look identical (lowercase `l` vs `1`, uppercase `O` vs `0`). - Bad: `int a = l; if (O == l) a = O1; else l = O1;` ### 1.2 Make Meaningful Distinctions If two things have different names, they must do different things. Avoid meaningless noise words and number series. **Do:** - Reveal the actual role of variables (e.g., `array`, `condition`, `transformation`). - Use specific, role-based names for classes (e.g., `OrderValidator`, `OrderRepository`, `OrderCalculator`). **Don't:** - Add meaningless noise suffixes when you can't think of a better name (e.g., `OrderManager`, `OrderHandler`, `O...

Details

Author
uwuclxdy
Repository
uwuclxdy/agenticat
Created
5 months ago
Last Updated
today
Language
TypeScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category