Skip to main content

clear-naming

Review and improve confusing code identifiers and technical explanations. Use for naming reviews, jargon cleanup, clearer explanations, or adding naming and communication guidance to AGENTS.md / CLAUDE.md. 中文触发:命名审查、消除黑话、解释通俗一点、不要直译变量名、添加清晰表达规则。 Ordinary coding requests alone do not require a naming audit or repository-wide renaming.

Quellinformationen

Repository
ox01024/clear-naming
Letzte Quellaktivität
29. Oktober 2026 um 08:08
Erkannte Sprache von SKILL.md
Chinesisch
Sterne
0
Forks
0

clear-naming: clearer names and explanations

Reviews identifiers and technical explanations against their actual context, returning clearer wording or scoped edits while preserving meaning.

Examples

English rendering of a source-document example: in_flight holds tasks already started but not finished. An opaque instruction to wait for the “in-flight tasks” to drain becomes “The scheduler waits for all running tasks to finish, then exits.” This improves the explanation only; running_tasks is an optional rename only when requested and after checking membership conditions. It is a documented example, not a run here. Document example

Uses

For a naming review, jargon cleanup, clearer explanation or requested project guidance. A normal coding request is not itself a request for an audit. The method distinguishes running tasks from requests awaiting responses and keeps established technical terms when they are accurate.

Prerequisites

Use a host that reads local SKILL.md; README describes explicit invocation in Codex. Supply the relevant code or explanation and say whether you want advice or edits. It is instruction-only: README lists no runtime scripts, extra dependencies or external services. Project checks depend on the actual code change, not a bundled test runner.

How to use

For Codex, the README’s naming-review request invokes $clear-naming on the current changes’ names, comments and explanations, asking for suggestions first without file edits. It inspects definitions, callers, types and state changes, then reports location, actual meaning, proposed wording and reasons. If you explicitly request edits, it updates related references and runs proportionate checks. Only a request for lasting rules merges the two principles into the specified guidance file; existing equivalents remain a single copy.

Limitations

Unknown meaning is a reason to retain the current name and ask for evidence, not guess a replacement. Public interfaces, persisted fields, configuration keys and protocol fields require compatibility review rather than local-variable treatment. Keep prerequisites, failure causes, time scope and uncertainty intact. Local clarification does not authorize a repository-wide rename or global guidance update; persistent rules still need usage feedback. The source adds no external runtime service, but does not define the host/model provider’s data handling or guarantee on-device confidentiality. The saved LICENSE is MIT.

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
clear-naming
description
Review and improve confusing code identifiers and technical explanations. Use for naming reviews, jargon cleanup, clearer explanations, or adding naming and communication guidance to AGENTS.md / CLAUDE.md. 中文触发:命名审查、消除黑话、解释通俗一点、不要直译变量名、添加清晰表达规则。 Ordinary coding requests alone do not require a naming audit or repository-wide renaming.
license
MIT
# 清晰命名与表达 帮助读者从名称和说明中理解具体对象、行为与结果,同时保持技术含义准确。 ## 两条核心原则 1. **名称表达实际含义。** 先确认对象是什么、包含哪些状态、执行什么动作,再选用直白且符合项目约定的名称。名称的长度由区分含义的需要决定。 2. **说明直接描述行为。** 跟随用户的语言和熟悉程度,解释发生了什么、为什么以及有什么影响。代码标识符用于定位实现;必要的专业术语在首次出现时简要解释。 ## 按用户请求选择工作范围 | 用户意图 | 行为 | | --- | --- | | 让说明更清楚、解释某个术语 | 直接改善本次说明,结合当前上下文解释含义。 | | 检查命名、审查黑话 | 阅读指定内容,给出有依据的发现和替代方案,保持文件不变。 | | 修改命名、清理文案 | 在指定范围内修改,更新受影响的引用,运行与改动相称的检查。 | | 把原则写入项目规则 | 将本文的简短规则合并到用户指定的指导文件。 | 继承当前任务已经确定的改动范围与授权。局部解释请求只需要解决当前理解问题;跨仓库重命名或修改全局配置需要对应的任务范围。 ## 判断一个名称或表达是否需要改进 - 读代码确定含义:检查定义、调用位置、类型、状态变化,以及集合包含和排除的对象。证据不足时说明不确定之处,保留现名并提出待确认的问题。 - 从读者角度判断:如果必须知道内部比喻、逐词拆解英文,或了解当前对话的历史才能理解,优先给出更直接的表达。 - 保留领域精度:HTTP、事务、幂等等已有明确含义的术语可以保留,并按读者需要解释。项目已经定义清楚的术语和通行缩写可继续使用。 - 按语义选择替代词:任务已开始且尚未结束时,`running_tasks` 可以准确表达含义;请求已经发出、正在等待响应时,`requests_awaiting_response` 更具体。`in_flight` 的替代名称需要由这类实际条件决定。 - 同时检查说明:代码名称符合约定时,可以直接把中文解释改成“正在执行的任务”。语言问题可以通过改善语言解决。 遇到多义名称、需要解释专业术语,或要查看前后对照时,再读 [示例与边界](references/examples.md)。 ## 修改代码与说明 1. 检查当前改动,保护用户已有工作。为每个拟改名称写清它的实际含义以及新名称的理由。 2. 根据作用范围更新定义、调用、类型、注释和相关文档。区分局部名称与对外接口、持久化字段、配置键及协议字段;后者需要检查调用方和兼容要求,再在任务范围内采取相应迁移方式。 3. 保持行为和信息完整。说明应保留前置条件、失败原因、时间范围和不确定性;同时用具体动作替代含糊表达。 4. 纯文案改动检查含义和引用;代码重命名运行相关测试、类型检查或项目要求的检查。验证标准是含义准确、引用完整及行为一致。 名称或关键词检索只用于寻找候选项与引用。结合上下文决定是否修改,以改善理解作为验收标准。 ## 将原则写入指导文件 只有用户要求设置长期规则时才执行此项。检查已有章节,把下面两条合并到用户指定的 `AGENTS.md`、`CLAUDE.md` 或等价指导文件。已有等价规则时保留或原地改善,重复执行时保持规则只有一份。 ```markdown ## 命名与表达 - **命名直接表意**:变量、函数和状态名称准确表达对象、动作与实际含义,使用直白且符合项目约定的名称;结合实现判断多义词,保留有明确含义的领域术语。 - **说明自然易懂**:跟随用户语言直接描述行为、原因与结果,按需解释专业术语。代码标识符用于定位实现;中文说明使用“正在执行的任务”等自然表达。 ``` 目标文件由请求决定;修改全局指导文件需要用户将全局设置纳入范围。写入后说明文件位置与影响范围。规则是持续指导,实际遵循情况仍需通过使用反馈检查。 ## 汇报方式 普通解释直接给出清楚的答案。审查发现包含位置、实际含义、原表达、建议表达及理由;有多项平行发现时使用表格。已经清楚的内容保持原样,有歧义的内容说明证据缺口。 修改完成后,简要说明改了什么、含义如何保持、做了哪些检查,以及仍然存在的兼容或理解问题。
Auf GitHub ansehen