clean-names
Skill193 starsChanged 7 months agoMITView on GitHub
Use when naming, renaming, or fixing names of variables, functions, classes, or modules in Python. Enforces Clean Code principles—descriptive names, appropriate length, no encodings.
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- phanijapps/memexword for word, first seen Oct 17, 2026
- ramybarsoum/claude-skillsedited, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 1
- phanijapps/memex★ 0100% same
Edited · 1
- ramybarsoum/claude-skills★ 099% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- boy-scoutSkill
- clean-commentsSkill
- clean-functionsSkill
- clean-generalSkill
- clean-testsSkill
- python-clean-codeSkill
- boy-scoutSkill
- clean-commentsSkill
- clean-functionsSkill
- clean-generalSkill
- clean-namesSkill
- clean-testsSkill
- typescript-clean-codeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Don't pick names that communicate implementation.
- Distinctive: line 46
Use terms from the domain, design patterns, or well-known conventions.
- Distinctive: line 88
Don't encode type or scope information into names.
- Distinctive: line 112
If a function does something beyond what its name suggests, the name is misleading.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clean Names
N1: Choose Descriptive Names
Names should reveal intent. If a name requires a comment, it doesn't reveal its intent.
# Bad - what is d?
d = 86400
# Good - obvious meaning
SECONDS_PER_DAY = 86400
# Bad - what does this function do?
def proc(lst):
return [x for x in lst if x > 0]
# Good - intent is clear
def filter_positive_numbers(numbers):
return [n for n in numbers if n > 0]N2: Choose Names at the Appropriate Level of Abstraction
Don't pick names that communicate implementation; choose names that reflect the level of abstraction of the class or function.
# Bad - too implementation-specific
def get_dict_of_user_ids_to_names():
...
# Good - abstracts the data structure
def get_user_directory():
...N3: Use Standard Nomenclature Where Possible
Use terms from the domain, design patterns, or well-known conventions.
# Good - uses pattern name
class UserFactory:
def create(self, data): ...
# Good - uses domain term
def calculate_amortization(principal, rate, term): ...N4: Unambiguous Names
Choose names that make the workings of a function or variable unambiguous.
# Bad - ambiguous
def rename(old, new):
...
# Good - clear what's being renamed
def rename_file(old_path: Path, new_path: Path):
...N5: Use Longer Names for Longer Scopes
Short names are fine for tiny scopes. Longer scopes need longer, more descriptive names.
# Good - short name for tiny scope
total = sum(x for x in numbers)
# Good - longer name for module-level constant
MAX_RETRY_ATTEMPTS_BEFORE_FAILURE = 5
# Bad - short name at module level
MAX = 5N6: Avoid Encodings
Don't encode type or scope information into names. Modern editors make this unnecessary.
# Bad - Hungarian notation
str_name = "Alice"
lst_users = []
i_count = 0
# Good - clean names
name = "Alice"
users = []
count = 0
# Bad - interface prefix
class IUserRepository:
...
# Good - just name it
class UserRepository:
...N7: Names Should Describe Side Effects
If a function does something beyond what its name suggests, the name is misleading.
# Bad - name doesn't mention file creation
def get_config():
if not config_path.exists():
config_path.write_text("{}") # Hidden side effect!
return json.loads(config_path.read_text())
# Good - name reveals behavior
def get_or_create_config():
if not config_path.exists():
config_path.write_text("{}")
return json.loads(config_path.read_text())Quick Reference
| Rule | Principle | Example |
| N1 | Descriptive names | SECONDS_PER_DAY not d |
| N2 | Right abstraction level | get_user_directory() not get_dict_of_... |
| N3 | Standard nomenclature | UserFactory, calculate_amortization |
| N4 | Unambiguous | rename_file(old_path, new_path) |
| N5 | Length matches scope | Short for loops, long for globals |
| N6 | No encodings | users not lst_users |
| N7 | Describe side effects | get_or_create_config() |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

