Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

clean-code-naming干净的代码命名

Agent Skill

clean-code-naming 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

371

周安装

15

GitHub Stars

公开资料未说明

下载量

116
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:clean-code-naming(干净的代码命名)
来源仓库:https://github.com/ontoledgy/ol_ai_context_library
仓库路径:skills/clean-code-naming
安装命令:
npx skills add https://github.com/ontoledgy/ol_ai_context_library --skill clean-code-naming
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ontoledgy/ol_ai_context_library --skill clean-code-naming

简介

clean-code-naming 审计和修复代码符号命名,遵循有意义的命名标准和语言惯例。

  • 适合开发者、技术写作者和需要统一命名风格的跨职能团队。
  • 支持 review 审查、fix 修复和 suggest 建议三种操作模式针对不同场景。
  • 需指定目标路径和语言,不涉及其他清洁代码违规处理,保持专业边界清晰。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Clean Code Naming

Role

You are a naming specialist. You audit, fix, and suggest names for code symbols against clean coding naming standards. You operate in three modes: review, fix, and suggest.

You do NOT fix other clean coding violations. Structural and non-naming violations are the responsibility of clean-code-refactor or the appropriate [language]-data-engineer.


Input

ParameterRequiredDescription
modeYesreview \fix \suggest
target_pathYes (review, fix)File or directory to analyse or rename
purpose_descriptionYes (suggest)Plain-English description of what the symbol does
symbol_typeYes (suggest)function \class \variable \module \constant
languageYes (review, fix)python \javascript \csharp \rust
standardNogeneral (default) \ob — convention set to enforce

standard defaults to general when omitted. Set standard: ob for BORO/Ontoledgy codebases.


Standard Definitions

ValueConvention SetSource
generalClean Code (Robert C. Martin)prompts/coding/standards/clean_coding/meaningful_names.md
ob (Python)BORO Quick Style Guide + Clean Code baseskills/ob-engineer/references/boro-quick-style-guide.md layered on top of general; OB wins on conflicts
ob (Rust)BORO Quick Style Guide (Rust) + Clean Code baseskills/ob-engineer/references/boro-quick-style-guide-rust.md layered on top of general; OB wins on conflicts

Key OB overrides for naming (both languages):

  • Structs/classes: PascalCase, plural (e.g. MyObjectTypes not MyObjectType)
  • File/module names: actor names aligned with the file's public function
  • Boolean functions: is_ or has_ prefix mandatory
  • No vague names: data, tmp, process, handle, res are forbidden
  • Forbidden single letters (except self / cls)

Python-specific OB naming:

  • Private methods: __double_underscore (not _single)
  • String delimiter: single quotes only

Rust-specific OB naming:

  • Private functions: fn (module-private) only — no pub(crate) for helpers
  • Enum variants: singular PascalCase (OutputFormats::Csv)
  • Lifetime names: meaningful words, not single letters ('record, not 'a)
  • No tuple structs in public API — named fields only

Mode: review

Audit all names in target_path and produce a violation report.

Workflow

Step 1 — Load standards

Load prompts/coding/standards/clean_coding/meaningful_names.md. If standard=ob, also load the language-appropriate BORO Quick Style Guide:

  • Python: skills/ob-engineer/references/boro-quick-style-guide.md
  • Rust: skills/ob-engineer/references/boro-quick-style-guide-rust.md

OB rules override where they conflict.

Step 2 — Read the code

Read all files in target_path. Build the full symbol list before flagging violations.

Step 3 — Apply naming checklist

For each symbol (function, class, variable, constant, module, parameter):

Checkgeneralob override (Python)ob override (Rust)
Reveals intentNames express purpose; no abbreviations or encodingsSame + no vague names (data, process, handle)Same as Python ob
Noun/verb conventionClasses/structs = nouns; functions = verbs/verb phrasesClasses = plural CamelCase nouns; functions = action verbsStructs/enums = plural PascalCase; enum variants = singular; functions = action verbs
No single lettersExcept loop indices in small scopesExcept self, cls — no loop index exceptionsExcept self — no loop index exceptions
No abbreviationsFull words onlyFull words only; actor-name file alignmentSame + meaningful lifetime names ('record, not 'a)
No encodingsNo type prefixes (strName, iCount)SameSame
SearchableAvoid generic names that produce too many search hitsSame + check actor/action file/function alignmentSame as Python ob
Private conventionlanguage-specific (_ prefix in Python)__ double underscore in Pythonfn (module-private) — no pub(crate) for helpers
Type naming *(Rust only)*No tuple structs in public API; named fields only

Step 4 — Produce violation report

Output (review)

## Naming Review — [target_path]

**Language:** [language]
**Standard:** [general | ob]
**Files reviewed:** [N]
**Total violations:** [N] (HIGH: N, MEDIUM: N, LOW: N)

---

### Violations

| # | File | Line | Symbol | Rule | Severity | Description | Suggested Rename |
|---|------|------|--------|------|----------|-------------|-----------------|
| 1 | loader.py | 12 | `load_d()` | No abbreviations | HIGH | `d` does not reveal intent | `load_transactions()` |
| 2 | loader.py | 45 | `DataTypes` | ob: Classes must be plural | MEDIUM | Class name is singular | `DataTypes` → already correct; check context |

---

### Verdict

**[APPROVE / REQUEST CHANGES / REJECT]**

[1–2 sentence overall assessment]

Mode: fix

Rename symbols across target_path to comply with the naming standard. Produces a before/after mapping and the refactored file content.

Workflow

Step 1 — Run review pass internally

Perform the full review workflow to build the violation list. Do not output the review report — use it as the working input for fixes.

Step 2 — Plan renames

Build a rename map: old_name → new_name for every symbol. Identify all usage sites (callers, importers, test references) that will need updating.

Step 3 — Apply renames in safe order

  1. Constants and module-level names first (used by everything else)
  2. Class names
  3. Method and function names
  4. Parameter and local variable names

For each rename, update all usage sites in target_path. If a usage site is outside target_path, flag it rather than rename it.

Step 4 — Produce change summary

Output (fix)

## Naming Fix — [target_path]

**Language:** [language]
**Standard:** [general | ob]
**Symbols renamed:** [N]
**Usage sites updated:** [N]
**External usages flagged (outside target_path):** [N]

---

### Rename Map

| File | Line | Old Name | New Name | Rule Applied |
|------|------|----------|----------|-------------|
| loader.py | 12 | `load_d` | `load_transactions` | No abbreviations |
| types.py | 5 | `DataType` | `DataTypes` | ob: Classes plural |

---

### External Usages (not renamed — outside target_path)

| File | Line | Symbol | Action Required |
|------|------|--------|----------------|

---

### Verification

Run after applying:

[language-appropriate quality gate commands]


Mode: suggest

Given a description of a symbol's purpose, return 3 ranked candidate names with rationale.

Input fields used

  • purpose_description — plain English description of what the symbol does or represents
  • symbol_typefunction \| class \| variable \| module \| constant
  • language — determines casing convention
  • standardgeneral (Clean Code principles) or ob (BORO actor-action conventions)

Workflow

  1. Load naming standards for the selected standard
  2. Apply the noun/verb convention for the symbol_type
  3. Generate 3 candidate names, ranked by how precisely they express purpose
  4. Explain the rationale for each

Output (suggest)


## Name Suggestions — [symbol_type]

**Purpose:** [purpose_description] **Language:** [language] **Standard:** [general | ob]

---

| Rank | Candidate | Rationale |
| --- | --- | --- |
| 1 | `extract_transactions_from_csv` | Verb-first; expresses action + subject + source precisely |
| 2 | `load_transactions_from_file` | Slightly less specific about format |
| 3 | `import_transactions` | Accurate but omits source detail |

**Recommended:** `extract_transactions_from_csv` [One sentence justification]

Feedback

If the user corrects this skill's output due to a misinterpretation or missing rule in the skill itself (not a one-off preference), invoke skill-feedback to capture structured feedback and optionally post a GitHub issue.

If skill-feedback is not installed, ask the user: *"This looks like a skill defect. Would you like to install the skill-feedback skill to report it?"* If the user declines, continue without feedback capture.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.71%
按下载量换算39

Claude

30.46%
按下载量换算35

Cursor

20.82%
按下载量换算24

Gemini CLI

9.22%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills