naming-things

naming-things is a skill for Claude Code, Codex from Wade-DevCode/awesome-coding-skills-cn. It costs 24 tokens per session (2,179 once invoked), scanned A, original, MIT.

A guide for choosing clear names for variables, functions, types, constants, and files.

In plain words
What is it for?
Use it when creating code, reviewing confusing names, or making terminology consistent during a refactor.
Why use it?
It makes code easier to understand by replacing vague names, unnecessary abbreviations, and inconsistent terms with names that show meaning and intent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating code, reviewing confusing names, or making terminology consistent during a refactor.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wade-devcode/awesome-coding-skills-cn/naming-things
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Wade-DevCode/awesome-coding-skills-cn --skill naming-things
Clone the repo
git clone --depth 1 https://github.com/Wade-DevCode/awesome-coding-skills-cn

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for naming-things

README.md
[![agentmods](https://agentmods.dev/badge/skills/wade-devcode/awesome-coding-skills-cn/naming-things/github.svg)](https://agentmods.dev/skills/wade-devcode/awesome-coding-skills-cn/naming-things)
Your own site
<a href="https://agentmods.dev/skills/wade-devcode/awesome-coding-skills-cn/naming-things"><img src="https://agentmods.dev/badge/skills/wade-devcode/awesome-coding-skills-cn/naming-things/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for naming-things

Your own site · 80×15
<a href="https://agentmods.dev/skills/wade-devcode/awesome-coding-skills-cn/naming-things"><img src="https://agentmods.dev/badge/skills/wade-devcode/awesome-coding-skills-cn/naming-things.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.02179
Opus 5.5 $0.00010 $0.00872
Sonnet 5.5 $0.00005 $0.00436
Haiku 4.5 $0.00002 $0.00218

Measured 1mo ago against content hash f93fa5cc58b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

naming-things scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/naming-things/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

命名之道

何时用

  • 新建变量、函数、类、接口、常量、文件时。
  • review 代码发现读了三遍还不明白某个名字是什么意思。
  • 重构阶段整理命名一致性,消除同一概念在项目里的多种叫法。
  • 发现自己犹豫"这个变量叫 d 还是 data 还是 result"时。

核心规则

1. 名字说"是什么/做什么",不说"怎么做";避免缩写与匈牙利命名

规则: 名字应表达业务语义或功能意图,不暴露实现机制;除公认缩写(URL、HTTP、ID)外不缩写,不加类型前缀。

为什么: AI 生成的代码里频繁出现 strName、arrItems、bIsValid(匈牙利命名)或 tmp、res、d(无意义缩写)。读者看到 strName 不但没获得额外信息(类型系统已知道它是 string),反而被迫在脑中翻译。缩写制造认知负担:是 mgr 还是 manager?是 usr 还是 user?项目大了以后每个人缩写规则不同,读起来像乱码。

怎么做:

  • 写出完整单词:invoiceTotal 而非 invTot,userRepository 而非 usrRepo。
  • 去掉类型前缀:isActive 而非 bIsActive,items 而非 arrItems。
  • 例外:循环变量 i/j、数学公式里的 x/y 等约定俗成的短名可保留。

2. 布尔用 is/has/can;函数用动词;集合用复数

规则: 按照名字的语法角色选前缀/形式:布尔量用 is/has/can/should,函数/方法用动词短语,集合类型用复数名词。

为什么: AI 生成的代码常出现 active(布尔?状态枚举?名词?)、data()(函数?属性?做什么?)、item(一个?列表?)这类模糊命名。读者必须跳到定义处才知道类型,增加认知跳跃次数。命名的语法结构是免费的文档:看到 isLoading 立刻知道是 bool,看到 fetchUser() 立刻知道是动作且有 I/O。

怎么做:

  • 布尔:isLoading、hasPermission、canEdit、shouldRetry。
  • 函数:getUserById()、validateEmail()、sendNotification()。
  • 集合:users、orderItems、pendingTasks(复数)。
  • 避免:active、flag、check()、handle()、process()——太泛,说不清做什么。

3. 一致性:同一概念全项目同一词,不混用 fetch/get/load

规则: 确定一个动词/名词后全项目统一使用,相同语义的操作不能在不同文件里用不同词。

为什么: AI 在不同上下文里会随意选词:getUserById 在一处、fetchUserById 在另一处、loadUser 在第三处,做的是完全相同的事。读者面对三种叫法会疑惑:有什么区别?哪个有缓存?哪个走网络?实际上三者等价,只是 AI 在不同时刻生成了不同的词。这种不一致积累到一定规模后,代码库变成"方言集合",新人入手极难。

怎么做:

  • 项目初期在 GLOSSARY.md 或 ADR 里约定核心动词:fetch=网络请求、get=本地/同步读取、load=带副作用的初始化。
  • review 时主动检查:新增函数的动词是否与现有命名一致。
  • 发现不一致,批量重命名统一,不要新旧并存。

4. 避免无意义名(data/info/manager/tmp)与误导名

规则: 禁止使用 data、info、manager、handler、helper、util、tmp、obj 等意义模糊的名字作为正式命名;不用听起来像 X 但实际是 Y 的名字。

为什么: AI 生成代码时最爱用 UserManager、DataHelper、handleStuff() 这类名字——因为它们"总能用上"。但这些名字不提供任何信息:什么数据?哪种管理?处理什么?误导名更危险:函数叫 saveUser 却同时发了邮件;变量叫 userList 里实际是 Map。读者建立了错误预期,bug 由此而生。

怎么做:

  • 用具体职责替换空洞词:UserManager → UserRegistrationService/UserSessionCache。
  • 用行为描述替换 -helper/-util:formatCurrency()、parseISO8601() 而非 DateHelper.format()。
  • 名字不准确宁可改名,也别加注释解释"为什么名字不准确"。

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 144 lines · 24 tokens per session scan A f93fa5cc58b0

Subscribe to this mod's changes

naming-things is a skill published in the GitHub repository Wade-DevCode/awesome-coding-skills-cn (7 stars, last pushed 4mo ago), licensed MIT. It adds 24 tokens to every session and 2,179 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.