技能 naming-analyzer
🔍

naming-analyzer

安全 🌐 网络访问⚙️ 外部命令🔑 环境变量

分析並改善程式碼命名慣例

也可从以下获取: softaworks

不良的命名會讓程式碼難以理解和維護。此技能會分析您的程式碼並建議更清晰、更具描述性的名稱,遵循既定的程式語言慣例以提升程式碼品質。

支持: Claude Codex Code(CC)
⚠️ 68
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“naming-analyzer”。 Check if getUserInfo is a good name for a function that fetches user and updates lastLogin

预期结果:

  • Issue: Function name implies read-only but has side effects
  • Current: getUserInfo() fetches user and updates lastLogin timestamp
  • Suggestion: fetchAndUpdateUser() or fetchUserWithLoginUpdate()
  • Reason: Name should reflect data mutation, not just retrieval

正在使用“naming-analyzer”。 Are these Python names following PEP 8 conventions: user_name, getUserData, is_valid

预期结果:

  • user_name: Correct (snake_case for variables)
  • getUserData: Should be get_user_data in Python
  • is_valid: Correct (boolean with is_ prefix)

安全审计

安全
v5 • 1/16/2026

This is a pure documentation skill with no code execution, file system access, or network capabilities. All 156 static findings are false positives: the scanner misinterpreted Markdown code block delimiters as Ruby backticks, and naming convention terms like 'case' as weak cryptographic algorithms. This skill only provides naming guidance - no executable code exists.

2
已扫描文件
530
分析行数
3
发现项
5
审计总数

风险因素

🌐 网络访问 (1)
⚙️ 外部命令 (131)
SKILL.md:45 SKILL.md:46 SKILL.md:47 SKILL.md:48 SKILL.md:48 SKILL.md:49 SKILL.md:49 SKILL.md:49 SKILL.md:49 SKILL.md:52 SKILL.md:53 SKILL.md:54 SKILL.md:55 SKILL.md:56 SKILL.md:56 SKILL.md:56 SKILL.md:59 SKILL.md:60 SKILL.md:61 SKILL.md:62 SKILL.md:65 SKILL.md:66 SKILL.md:67 SKILL.md:67 SKILL.md:72-82 SKILL.md:82-85 SKILL.md:85-101 SKILL.md:101-104 SKILL.md:104-116 SKILL.md:116-119 SKILL.md:119-130 SKILL.md:130-133 SKILL.md:133-144 SKILL.md:144-148 SKILL.md:148-154 SKILL.md:154-158 SKILL.md:158-173 SKILL.md:173-176 SKILL.md:176-180 SKILL.md:180-183 SKILL.md:183-191 SKILL.md:191-194 SKILL.md:194-198 SKILL.md:198-201 SKILL.md:201-205 SKILL.md:205-208 SKILL.md:208-212 SKILL.md:212-215 SKILL.md:215-223 SKILL.md:223-226 SKILL.md:226 SKILL.md:226-230 SKILL.md:230-233 SKILL.md:233-242 SKILL.md:242 SKILL.md:242 SKILL.md:242-244 SKILL.md:244 SKILL.md:244 SKILL.md:244-245 SKILL.md:245 SKILL.md:245 SKILL.md:245-246 SKILL.md:246 SKILL.md:246 SKILL.md:246-247 SKILL.md:247 SKILL.md:247 SKILL.md:247-259 SKILL.md:259 SKILL.md:259-260 SKILL.md:260 SKILL.md:260-261 SKILL.md:261 SKILL.md:261-264 SKILL.md:264 SKILL.md:264-265 SKILL.md:265 SKILL.md:265-266 SKILL.md:266 SKILL.md:266-267 SKILL.md:267 SKILL.md:267 SKILL.md:267-270 SKILL.md:270 SKILL.md:270-271 SKILL.md:271 SKILL.md:271-272 SKILL.md:272 SKILL.md:272-279 SKILL.md:279 SKILL.md:279 SKILL.md:279 SKILL.md:279 SKILL.md:279 SKILL.md:279 SKILL.md:279 SKILL.md:279-280 SKILL.md:280 SKILL.md:280 SKILL.md:280-283 SKILL.md:283 SKILL.md:283 SKILL.md:283-284 SKILL.md:284 SKILL.md:284 SKILL.md:284-287 SKILL.md:287 SKILL.md:287 SKILL.md:287-288 SKILL.md:288 SKILL.md:288 SKILL.md:288 SKILL.md:288-291 SKILL.md:291 SKILL.md:291-292 SKILL.md:292 SKILL.md:292-295 SKILL.md:295 SKILL.md:295 SKILL.md:295-296 SKILL.md:296 SKILL.md:296-328 SKILL.md:328-332 SKILL.md:332-342 SKILL.md:342-347 SKILL.md:347 SKILL.md:347-348 SKILL.md:348 SKILL.md:348 SKILL.md:348
🔑 环境变量 (2)
审计者: claude 查看审计历史 →

质量评分

38
架构
100
可维护性
85
内容
20
社区
100
安全
83
规范符合性

你能构建什么

學習正確的命名習慣

獲得變數和函式命名的即時回饋,從程式設計旅程開始就培養良好的編碼習慣。

執行命名標準

在程式碼審查和拉取請求期間,確保團隊程式碼庫中的命名模式一致。

重構不清楚的名稱

在具有混亂或過時命名模式的舊程式碼庫中,識別並優先處理重新命名工作。

试试这些提示

快速檢查
@naming-analyzer Is processData(data) a good function name? It validates and transforms user input.
完整檔案審查
@naming-analyzer Review the naming in src/utils/helpers.js and suggest improvements
慣例驗證
@naming-analyzer --conventions Are these Python names following PEP 8? user_name, getUserData, is_valid
批次重新命名
@naming-analyzer Suggest better names for: usr, tmp, proc, data, val, arr in my codebase

最佳实践

  • 使用能揭示意圖的描述性名稱,無需額外註解
  • 持續遵循程式語言慣例(camelCase、snake_case、PascalCase)
  • 使用 is、has、can、should 前綴讓布林值名稱顯而易見
  • 避免縮寫,除非是廣為認可的術語如 HTML、API、URL

避免

  • 在迴圈計數器之外使用單字母變數(除了 i、j、k)
  • 使用不傳達意義的通用名稱,如 data、info、temp
  • 在同一專案中混用命名慣例
  • 在現代程式碼中使用匈牙利命名法或過於複雜的命名

常见问题

它支援哪些程式語言?
JavaScript、TypeScript、Python、Java、Go,以及適用於大多數程式語言的一般命名原則。
它如何偵測誤導性名稱?
它會分析名稱是否準確描述程式碼行為,包括副作用和變更。
它能自動重新命名變數嗎?
不行,它提供建議和指導,但您必須在編輯器中套用更改。
我的程式碼會被傳送到外部伺服器嗎?
不會,分析在您的 AI 工具內本地進行。程式碼不會離開您的機器。
如果我的團隊有不同的慣例怎麼辦?
將建議作為指南,並根據您團隊的特定編碼標準進行調整。
這與 IDE 重構相比如何?
提供帶有說明的智慧命名建議,而 IDE 主要自動執行安全的重新命名。

开发者详情

文件结构

📄 SKILL.md