naming
The code-naming rules. Use before naming a variable, function, file, type, table, route, component, event, or env var, and when a request's word differs from the repo's.
How do I install this agent skill?
npx skills add https://github.com/timschoch/skilly --skill namingIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The 'naming' skill is a development tool for enforcing consistent naming conventions in codebases. It provides instructions and Node.js scripts to lint files, check for naming violations, and manage project-specific overrides. It uses standard Git and file system integrations to perform its tasks. No malicious patterns were detected.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Naming
One list, synced from the hub. The gate naming checks what a machine can check, on push and in CI; the rest is your judgement. references/lint.md draws the line.
Before you name anything, run node .agents/skills/naming/scripts/config.mjs and read its output as the current rules: it prints references/naming.json merged with the project's overrides.
Rules
-
One word per thing, and the word comes from
GLOSSARY.md. Look there first, then in existing types, DB tables and API routes. The repo's word beats the request's word.Good Bad Why testimonialcustomerQuotethe request said "customer quotes", the repo says testimonialTestimonialtype,testimonialstable,/api/testimonialsTestimonialtype,reviewstableone word per thing, everywhere orderpurchasebesideordertwo words for one thing splits the search -
No word yet? Run term-check, show the result to the user, get sign-off, then add the word to
GLOSSARY.mdthrough domain-modeling, which owns that file.Good Bad Why carryOver, term-checked, inGLOSSARY.mdcarryOver, invented in the PRa new word needs the user's sign-off caseStudyrecorded with pluralcaseStudiescaseStudywith no entrythe next agent picks a different word gridadded to the role listGridused, list unchangeda role outside the closed list is a new word -
Name by role, not by type. No
IorTprefix, no Hungarian, no noise word (seenoiseWordsin naming.json).Good Bad Why UserIUserno IprefixcountnCountno Hungarian accountsaccountList,accountDatano noise word, the plural already says many -
Full words only, no single-letter name, no magic number. The banned short words are
shortWordsin naming.json.Good Bad Why optionsoptsfull word errore,errno single letter, no abbreviation const MAX_RETRIES = 3a bare 3a number needs a name -
Say nothing the call site already says.
Good Bad Why user.nameuser.userNamethe object says usertestimonials.add(item)testimonials.addTestimonial(item)the collection says testimonialfield namein tabletestimonialsfield testimonial_namethe table says testimonial -
An action starts with a verb from
prefixesin naming.json, one verb per meaning. A pure derived value may be a noun.Good Bad Why fetchTestimonialsloadTestimonialsbeside itone verb per meaning, fetchis over the networklistUsersgetAllUserslistmeans manybranchShagetBranchShaa pure derived value may be a noun A prefix promises its meaning:
getonly reads,setreturns nothing,isreturns a boolean,findmay return nothing whilegetmay not. A name withandin it (saveAndNotify) is two functions. -
Stored boolean state is a bare adjective; a check is
is,has,canorshould; nevernotX.Good Bad Why archivedisArchivedstored state is a bare adjective isEmpty,canRetryempty(),retryAlloweda check carries the prefix enablednotDisabledpositive names only -
Entity singular, collection plural. Record an irregular plural in
GLOSSARY.mdnext to the word.Good Bad Why type Testimonial, filetestimonial.tstype Testimonialsone entity is singular table, path, folder testimonialstable testimoniala collection is plural case_studies, plural recorded inGLOSSARY.mdcase_studysan irregular plural is written down once -
No
enum. Use a string-literal union or anas constobject. The discriminant key isdiscriminantin naming.json (kind). Own values are kebab-case; values mirrored from an external API stay verbatim.Good Bad Why type Status = 'open' | 'in-progress'enum Status { Open }no enum{ kind: 'pull-request' }{ type: 'pull-request' }the discriminant key is kind'MERGED'from the GitHub API'merged'a mirrored value stays verbatim -
Build every name from
partsin naming.json, big to small:project · area · entity · role · action · attribute · consumer. Take the parts you need, keep their order. Eachartifactsentry lists parts, case and examples.roleis a closed list per repo (artifacts.component.roles,artifacts.env.roles). Env vars followartifacts.env.shape. Payload CMS: collection slug = API path = table; the slug is kebab-case and plural (case-studies), the table replaces the hyphen with an underscore (case_studies).Good Bad Why COLIN_SYNC_KEY_FOR_TWENTYTWENTY_API_KEYissuer first, then what the key is for, then who holds it TestimonialGridGridTestimonialentity first, then role testimonial.addedaddTestimonialan event is a fact in the past, not a command -
Casing follows the language guide and the repo's linter. Files and folders are lowercase kebab-case. An existing repo convention wins over this line: set it in
artifacts.file.caseandartifacts.folder.case, one case or a list (["kebab", "PascalCase", "camelCase"]for React components and hooks).Good Bad Why render-pr-body.mjsrenderPrBody.mjsfiles are kebab-case src/components/case-studies/src/components/case_studies/folders are kebab-case loadUserin a repo that usesloadeverywherefetchUserbeside itthe existing convention wins -
Meaning changed? Rename everywhere in the same change, rule 204 in writing-rules.
Good Bad Why draftrenamed toproposalin code, docs and DB in one PRcode renamed, docs still say drafttwo words for one thing retryCountafter the value stopped being a limitmaxRetrieskeptthe name lies rename plus a GLOSSARY.mdupdaterename only the glossary is the source
Per-project overrides
Override file: .skilly/naming.json, same shape as references/naming.json, only the keys you change. An old docs/agents/naming.json is read only while .skilly/naming.json is missing: move it to .skilly/naming.json.
Merge order:
- references/naming.json
references/stacks/<bundle>.json, for each bundle listed in.skilly/config.jsonbundles, in that order. Missing file: skipped. Bundles reached only throughincludesdo not count..skilly/naming.json
Merge rules:
- Objects merge by key.
nulldrops a key. - Arrays append and dedupe.
"-Data"drops the defaultData. - Scalars override.
{
"prefixes": { "sync": { "meaning": "mirror to a remote system", "not": ["push", "mirror"] } },
"noiseWords": ["-Data"],
"allow": {
"ctxTools": { "names": ["^ctx_"], "rules": ["short-word"], "why": "lean-ctx tool names." },
"payload/migrations": null
}
}
allow holds named entries. Shape and what they silence: references/lint.md.
References
- references/naming.json: prefixes, parts, artifacts, short words, noise words, synonyms, discriminant, allow
- references/stacks/: per-bundle defaults, same shape
- references/lint.md: what the gate checks, what you judge, per-repo exceptions
- references/biome.json: opt-in Biome block for consumers
- scripts/config.mjs: prints the merged config
- scripts/check.mjs: runs the gate on the files the branch changes
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/timschoch/skilly/naming">View naming on skillZs</a>