agentleFS
mikestangdevsmikestangdevs/craft-skills/skills/craft/name-things/SKILL.md

name-things

Skill4 starsChanged 6 months agoMITView on GitHub

Use when naming or renaming functions, variables, types, files, or modules — or when a code review keeps stumbling over confusing names. Forces names to reveal intent and role, kills generic names (data, handle, process, manager, util), and aligns vocabulary with the domain. Use when reading code feels harder than it should, when two things have nearly the same name, or before extracting a new function or type that needs a name.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 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.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If two names differ only by a vague suffix (user / userData / userInfo), they are lying about being different.

    line 44
  2. Very specific:

    Use the team's and the product's actual vocabulary.

    line 48
  3. Distinctive:

    Update all of them in one change, or don't rename at all — a half-propagated rename creates two vocabularies for the same thing, which is …

    line 59
  4. Distinctive:

    When proposing renames, present a table so the human can scan and approve:

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Name Things

The failure mode this fixes

Bad names are the cheapest bug to introduce and the most expensive to live with. data, handle, process, manager, info, util, temp, obj — every one is a place where the author gave up on saying what the thing is. Agents are especially prone to this: they generate plausible-but-vague names at scale. The result is code that's technically correct and cognitively exhausting.

This skill makes names carry their weight: a good name tells you what something is and what role it plays, so you don't have to read the implementation to use it.

When to Use This Skill

  • Naming a new function, variable, type, file, or module
  • Renaming during a refactor or extraction
  • A review keeps tripping over what something means
  • Two identifiers are confusingly similar (user vs userData vs userInfo)
  • You're about to write a comment to explain a name — the name should do that job

Don't use when: the name is already domain-standard and clear (id, i in a tight loop, well-known abbreviations like url, db). Framework-idiomatic names in their conventional position (req/res in an Express handler, ctx, self/cls) are also exempt — fighting the ecosystem costs more than it clarifies. Don't rename for the sake of renaming.

Instructions

1. Ask what role the thing plays

Names encode role. Before naming, classify:

  • Boolean → reads as a question/state: isReady, hasAccess, shouldRetry (not flag, status, check). Phrase it positively — isEnabled, not isNotDisabled; negatives double up at the call site (!isNotReady)
  • Function → verb phrase naming the effect: chargeCard, parseWebhook, evictStaleSessions (not handle, process, doWork)
  • Collection → plural noun: pendingInvoices (not list, arr, data)
  • Transformation → name the output, not the act: cents not convert, normalizedEmail not fixEmail

2. Run the ban list

Reject any name that is, or contains, a filler word unless it's genuinely the most precise term:

data, info, value, item, obj, thing, stuff, temp, tmp, handle, process, manage(r), do, util(s), helper, misc, common, base, foo, result, response, res, ret, val, x/y/z (outside math/loops)

For each, ask: "data about what? handle what event? manager of what?" The answer is the real name.

3. Make distinct things distinctly named

If two names differ only by a vague suffix (user / userData / userInfo), they are lying about being different. Either they're the same thing (merge the name) or they play different roles (name the role: requestingUser vs targetUser).

4. Match the domain's words

Use the team's and the product's actual vocabulary. If the business says "subscriber," don't invent "memberAccount." If a CONTEXT.md or glossary exists, names must match it. Mismatched vocabulary is how two engineers build the same thing twice.

5. Length follows scope

  • Tiny scope (one-line lambda, tight loop) → short is fine.
  • Wide scope (exported symbol, module-level, long-lived) → spell it out. A name read in 50 places earns its letters.

6. Propagate the rename completely

A rename isn't done until every reference moves with it. Before applying:

  • Grep the whole repo for the old name and every call site, including strings used for dynamic access (reflection, serialized config, route tables, DB columns, API field names).
  • Update all of them in one change, or don't rename at all — a half-propagated rename creates two vocabularies for the same thing, which is worse than the original vague name.
  • For an exported/public symbol, weigh the blast radius: a rename that ripples through consumers may need a deprecation alias rather than a hard cut. When in doubt, propose and confirm before applying.

Output format

When proposing renames, present a table so the human can scan and approve:

| Current      | Proposed            | Why                                   |
|--------------|---------------------|---------------------------------------|
| data         | pendingInvoices     | it's a list of invoices awaiting send |
| handle()     | retryFailedCharge() | it retries; "handle" hides the effect |
| userInfo     | requestingUser      | distinguishes from targetUser         |

Anti-Patterns

Anti-PatternWhy it defeats the skill
Type-in-the-name (userObject, nameString, itemsArray)The type system already knows. The name should add meaning, not repeat it.
Comment-as-crutch (// the list of active users above data)Move the meaning into the name; delete the comment.
Cute or clever namesThanos.snap() is funny once and confusing forever.
Renaming without grepA rename you don't propagate creates two vocabularies. Find every call site.

Mental Model

A name is a one-word comment that can never go stale. If you need a comment to explain a name, the name is wrong.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.