naming-as-design
Skill1 starsChanged 3 months agoMITView on GitHub
Use when code feels tangled or needs a comment to explain what something is, when reaching for a name and nothing fits, or when a name is vague (data, tmp, handle, process, manager, util, doStuff) and the fuzziness hides a fuzzy design
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/beads.mdcCursor rule
- beadsSkill
- builderSkill
- consulting-codexSkill
- dispatching-subagentsSkill
- evidence-before-claimsSkill
- finishingSkill
- hacking-workflowSkill
- planningSkill
- reading-like-proseSkill
- reviewing-workSkill
- shapingSkill
- spike-and-stabilizeSkill
- subtraction-firstSkill
- test-firstSkill
- using-beadsSkill
- using-hackinatorSkill
- using-worktreesSkill
- walking-skeletonSkill
- whittlerSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 14
When the right name is obvious, the design underneath is sound.
- Distinctive: line 35
Let a failure to name change the code, not just the label: If nothing fits, don't force a bad name — split, merge, or reshape until a good …
≈ “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
Naming-as-Design
Overview
Core principle: Naming is not decoration applied after the design — naming is the design. A thing you can't name cleanly is usually a thing that isn't cleanly one thing. Use the struggle to name as a signal about the structure, and renaming as a tool to fix it.
When the right name is obvious, the design underneath is sound. When no name fits, the name isn't the problem — the shape is.
The Diagnostic
A hard-to-name thing is telling you something. Read the signal:
| Naming symptom | What it usually means | The fix |
The name needs "and" (parseAndValidate) | It does two things | Split it into two named things |
Only a vague name fits (data, manager, process) | Its responsibility is vague | Sharpen the responsibility, then name it |
| The name lies about what it does now | Behavior drifted from intent | Rename to the truth, or restore the intent |
| You reach for a comment to say what it is | The name is underperforming | Move the comment's content into the name |
| Same concept, three different names across the file | You haven't decided what it is | Pick one true name, use it everywhere |
The Practice
- Name for the reader, from the outside. A name describes what a thing is or returns,
in the caller's vocabulary — not how it's implemented inside.
activeUsers, notfilteredList. - Make the name carry the weight a comment would.
secondsUntilExpiryneeds no comment;tplus a comment does the same job worse. Every comment explaining a name is a naming bug. - Let a failure to name change the code, not just the label. If nothing fits, don't force a bad name — split, merge, or reshape until a good name becomes available. The name comes last because it's the design's signature.
- One concept, one name; one name, one concept. Synonyms drifting across a codebase
(
fetch/get/load/retrievefor the same act) make readers hunt for distinctions that aren't there. Consistency is kindness.
Quick Reference
| Weak name | Why it's weak | Stronger |
data, info, obj | Says nothing | invoice, userProfile |
tmp, x, result | No meaning | remainder, parsedDate |
handle, process, doIt | Verb without object | retryFailedJobs, renderInvoice |
manager, helper, util | Junk-drawer | Name the actual job it does |
flag, check, isValid | Which flag? valid how? | hasUnsavedChanges, isPastDue |
getData() returning a filtered subset | Hides the filter | getActiveUsers() |
Common Mistakes
- Naming by implementation, not by meaning.
sortedListbreaks the day you switch to a set;rankedCandidatessurvives. Name the what, not the how. - Renaming the label without re-reading the passage. A name is only better if the code around it reads better. Names live in sentences; read the sentence.
- Encoding types into names (
strName,listUsers) when the language already tracks types. The name should add meaning the type can't. - Accepting a bad name because "it's just a local." Locals are where the reader spends the most time. They deserve the most care, not the least.
Relationship to Other Skills
This is the whittler's second pass, after subtraction-first (a good name often deletes a comment or a helper). Renaming for the reader flows directly into reading-like-prose.
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.

