naming-conventions

naming-conventions is a skill for Claude Code, Codex from 2428424081cn/Skill-mcp. It costs 51 tokens per session (916 once invoked), scanned A, original, MIT.

A set of rules for clear names in code, including variables, Boolean values, and functions. Boolean values are yes-or-no results such as true or false.

In plain words
What is it for?
Use it when writing, refactoring, or reviewing code to enforce names such as isLoading, hasPermission, and fetchUserList.
Why use it?
It reduces confusing names, unclear abbreviations, and inconsistent naming across languages.

Skill for Claude CodeCodex

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

Good fit Use it when writing, refactoring, or reviewing code to enforce names such as isLoading, hasPermission, and fetchUserList.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/2428424081cn/skill-mcp/naming-conventions
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 2428424081cn/Skill-mcp --skill naming-conventions
Clone the repo
git clone --depth 1 https://github.com/2428424081cn/Skill-mcp

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-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/2428424081cn/skill-mcp/naming-conventions/github.svg)](https://agentmods.dev/skills/2428424081cn/skill-mcp/naming-conventions)
Your own site
<a href="https://agentmods.dev/skills/2428424081cn/skill-mcp/naming-conventions"><img src="https://agentmods.dev/badge/skills/2428424081cn/skill-mcp/naming-conventions/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-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/2428424081cn/skill-mcp/naming-conventions"><img src="https://agentmods.dev/badge/skills/2428424081cn/skill-mcp/naming-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 916 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.00051 $0.00916
Opus 5 $0.00026 $0.00458
Sonnet 5 $0.00010 $0.00183
Haiku 4.5 $0.00005 $0.00092

Measured 11d ago against content hash 14e1ffd22a69, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

naming-conventions 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/audit_naming_rules.mjs, scripts/convert_naming_case.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/dev/naming-conventions/SKILL.md · 54 lines

What it actually says

代码与变量命名规范守则 (Naming Conventions)

在生成任何代码、重构模块或审查代码时,必须无条件遵守以下命名法则,坚决杜绝随意拼写、中英混杂与含义不清的缩写。

核心命名铁律

1. 布尔值必须具有“谓词前缀” (Boolean Predicates)

布尔变量或返回布尔值的函数必须能一眼看出返回 truefalse

  • 严禁使用const status = true;, const valid = ...;, const open = ...;
  • 强制使用
    • is...:状态判断(如 isOpen, isLoading, isValid, isReady
    • has...:持有与归属(如 hasPermission, hasChildren, hasError
    • should...:条件行为(如 shouldAutoRetry, shouldRender
    • can...:能力与权限(如 canEdit, canSubmit
    • did...:已发生状态(如 didTimeout, didComplete

2. 函数/方法命名:动词 + 名词 (Verb + Noun)

函数必须清晰表达“对什么实体做了什么动作”:

  • 严禁使用function user() {}, const data = () => {}, function process() {}
  • 推荐动词列表
    • 查询获取:getUserById(), fetchOrderList(), findActiveAccount()
    • 创建与构建:createInvoice(), buildSummaryReport()
    • 修改与更新:updateProfile(), setAuthToken()
    • 校验与断言:validateEmailAddress(), assertNonEmpty()
    • 事件与回调:handleSubmit(), onUserSelect(), handleError()

3. 多语言命名风格对齐矩阵

语法实体 TypeScript / JavaScript Python (PEP 8) Go 规范示例
变量 / 属性 camelCase snake_case camelCase / PascalCase userProfile, maxLimit
函数 / 方法 camelCase snake_case camelCase / PascalCase calculateTotal(), get_user()
类 / 接口 / 类型 PascalCase PascalCase PascalCase OrderService, UserProfile
React 组件 / Hook PascalCase / useXxx - - UserProfileCard, useAuth
全局不可变常量 SCREAMING_SNAKE SCREAMING_SNAKE PascalCase / SCREAMING MAX_RETRY_COUNT, API_TIMEOUT_MS

4. 严禁无意义缩写与单字母变量

  • 严禁usr, mgr, btn_clk, tmp, chk_auth, const a = ...
  • 强制全拼user, manager, handleButtonClick, temporaryBuffer, checkAuthentication
  • (注:仅允许在极短的循环体内使用 i, j 作为下标计数器)

自动化变量扫描工具

运行脚本自动扫描代码库中的不合规命名:

node scripts/audit_naming_rules.mjs <待扫描文件或目录>
Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 54 lines · 51 tokens per session scan A 14e1ffd22a69

Subscribe to this mod's changes

naming-conventions is a skill published in the GitHub repository 2428424081cn/Skill-mcp (1 stars, last pushed 18d ago), licensed MIT. It adds 51 tokens to every session and 916 once invoked, about $0.0003 per session on Opus 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.