principle-clear-naming
Skill18 starsChanged 53 days agoMITView on GitHub
Apply when naming variables, functions, types, files, or endpoints. Enforces the 6-month amnesia test, language conventions, intent-based naming, and cross-boundary consistency.
In this repository75 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architectSkill
- arenaSkill
- automate-meSkill
- babysitSkill
- blast-radiusSkill
- broSkill
- browseSkill
- ceo-reviewSkill
- changelog-to-postSkill
- create-verification-skillSkill
- customer-lensSkill
- deslopSkill
- engineer-modeSkill
- figure-it-outSkill
- fix-ciSkill
- fix-merge-conflictsSkill
- founder-modeSkill
- founder-voiceSkill
- fstackSkill
- geo-pageSkill
- get-pr-commentsSkill
- howSkill
- inbox-triageSkill
- interrogateSkill
- lead-replySkill
- maintain-verification-skillSkill
- make-pr-easy-to-reviewSkill
- no-commentsSkill
- office-hoursSkill
- poteto-modeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-type-system-disciplineSkill
- recallSkill
- reflectSkill
- retroSkill
- setup-fstackSkill
- show-me-your-workSkill
- social-postSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
If the answer is *"Only if they read the function body"*, the name has failed.
- Distinctive: line 41
Always adhere to the idiom of the host language unless an explicit codebase convention overrides it:
- Very specific: line 50
Go / Rust: Follow standard idiomatic casing (userID, fetch_record).
- Very specific: line 57
If you use get... for database lookups, do not switch randomly to fetch..., retrieve..., or query....
- Very specific: line 58
If you use delete..., do not switch between remove..., drop..., and destroy...
≈ “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
Clear Naming Discipline
"There are only two hard things in Computer Science: cache invalidation and naming things." — Phil Karlton
Code is read far more often than it is written. A bad name forces every future reader to inspect the underlying implementation just to understand what a function or variable holds. A good name makes the surrounding code self-evident.
1. The 6-Month Amnesia Test
Whenever you name a variable, function, class, file, or endpoint, ask:
"If I wake up with amnesia in 6 months and read this line, will I immediately know what it is and what it does? Will a new teammate guess its exact purpose on their first day?"
If the answer is "Only if they read the function body", the name has failed. Rename it.
2. Intent Over Mechanism
Name by what problem it solves and what data it represents, not the mechanical data structure or plumbing:
| Mechanical / Bad | Intent-Driven / Good | Rationale |
dataArray | activeSubscriptions | Names the domain entity, not the memory structure. |
dictMap | cachedUserPermissions | Reveals what the lookup is for. |
processStuff() | syncStripeInvoices() | States the exact business operation. |
tempFlag | hasVerifiedEmail | Self-documenting state. |
3. Language & Ecosystem Conventions
Always adhere to the idiom of the host language unless an explicit codebase convention overrides it:
- TypeScript / JavaScript:
camelCasefor variables, properties, and functions (getUserSession,isOrgAdmin).PascalCasefor classes, types, interfaces, and React components (PaymentProcessor,UserProfileCard).UPPER_SNAKE_CASEfor immutable module-level constants (MAX_RETRY_ATTEMPTS).
- Python:
snake_casefor functions, methods, and variables (calculate_tax,user_id).PascalCasefor classes (DatabaseConnection).
- Go / Rust: Follow standard idiomatic casing (
userID,fetch_record).
4. Consistency Across Boundaries
Pick one verb per action in a subsystem and stick to it religiously. Do not mix semantic synonyms across files:
- If you use
get...for database lookups, do not switch randomly tofetch...,retrieve..., orquery.... - If you use
delete..., do not switch betweenremove...,drop..., anddestroy...for the same entity type.
5. Booleans as Clear Predicates
Booleans must sound like yes/no questions:
- Good:
isEnabled,hasAccess,shouldRetry,canEdit,isPendingApproval. - Bad:
status(ambiguous),access(noun),check(sounds like a function).
6. Ban Cryptic Abbreviations
Unless an abbreviation is universally recognized in the domain (id, url, req, res, ctx, err), spell it out:
- Bad:
usrMgrSvc,calcDiscTot(),custAddrStr. - Good:
userManager,calculateDiscountTotal(),customerAddress.
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.

