Code Naming Auditor logo

Code Naming Auditor

Community
cafe3310
code-naming-auditor

审计代码库中的命名,确保符合既定的术语和规范

Overview

Publishercafe3310
Repositorypublic-agent-skills
Skill namecode-naming-auditor
Stars
256
Forks
30
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by cafe3310 on GitHub. Read the source before you install it.

Installation

Install the Code Naming Auditor AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/cafe3310/public-agent-skills/tree/main/skills_parked/code-naming-auditor
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cafe3310/public-agent-skills.git /tmp/public-agent-skills
mkdir -p .claude/skills
cp -r /tmp/public-agent-skills/skills_parked/code-naming-auditor .claude/skills/code-naming-auditor
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Code Naming Auditor in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Code Naming Auditor on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Code Naming Auditor is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

代码命名审计 Skill (Code Naming Auditor)

本 Skill 指导一个 AI Agent 对代码库执行全面的审计,以确保其遵循一套明确定义的术语和命名规范。其核心目标是在整个项目中强制执行“通用语言”(Ubiquitous Language),从而提高代码的清晰度、一致性和可维护性。

在使用本 Skill 期间,Agent 的输出避免 Markdown Table 格式。使用无格式文本列表即可。

工作流 (Workflow)

审计过程遵循一个结构化的、分步骤的工作流。

第一步:建立术语表 (Establish the Glossary)

清晰、明确的术语表是所有代码审计工作的基础。

  1. 检查现有术语表: 首先,在项目中搜索一个已存在的术语文档。在 docs/ 或根目录中寻找名为 glossary.md、terminology.md 或类似的文件。
  2. 与用户确认: 如果找到了文档,需向用户展示并确认它是否是本次审计工作的“事实之源”(source of truth)。
  3. 创建新术语表: 如果项目中不存在术语表,应告知用户其重要性。使用位于 references/glossary_template.md 的模板来引导用户创建一个。术语表应精确定义项目核心的 名词 (Nouns) (例如 Content, Section, Line) 和 动词 (Verbs) (例如 get, find, search, list) 的语义。定义术语表的时候,要考虑使用精确、足够特殊的命名;避免模糊或歧义的术语。

在拥有一个清晰且双方同意的术语表之前,不应继续下一步。

第二步:定义审计范围 (Define the Audit Scope)

  1. 询问用户: 提示用户指定他们希望审计的目录或文件。
  2. 确认范围: 在继续之前,与用户确认范围。例如:“我将审计 src/basics/ 目录下的所有文件。这样对吗?”

第三步:分析与报告 (Analyze and Report)

这是核心执行阶段。系统地分析在已定义范围内的每一个文件。

  1. 读取文件: 一次读取一个文件内容。
  2. 分析命名: 仔细检查文件中的编程命名:
    • 方法 / 函数名
    • 参数名
    • 变量名
    • 类型名 / 别名
  3. 对照术语表: 将每一个命名与术语表中的规则和定义进行比较。尤其要注意:
    • 动词错用: 函数名是否在应该使用 search 的地方误用了 find?
    • 名词不一致: 一个代表文件多行内容的 string[] 是否被命名为 lines 而不是术语表中定义的 Content?
    • 模糊性/歧义: 是否存在像 data, item, val, str 这样的模糊命名?在这些地方,是否可以使用术语表中更精确的术语?
  4. 汇总偏差: 为当前文件创建一个清单,列出所有已识别的命名偏差。对于每一项偏差,记录其位置(例如,方法名、参数名)、问题描述,以及根据术语表得出的明确修改建议。
  5. 重复: 对范围内的所有文件重复此过程。
  6. 提交报告: 分析完成后,以清晰、结构化的格式(例如,按文件分组的列表)向用户呈现汇总后的偏差与建议清单。

第四步:实施重构 (Refactor - 可选)

在提交报告后,Agent 可以主动提出应用这些修改建议。

  1. 提议重构: 询问用户:“您希望我将这些命名修正应用到代码库中吗?”
  2. 应用修改: 如果用户同意,使用 replace 工具系统地应用每一个修改建议。为确保准确性,应逐一或按小的逻辑批次执行这些变更。
  3. 验证: 重构完成后,最好能运行项目的测试套件,以确保这些变更没有引入任何回归问题。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Code Naming Auditor AI skill do?

审计代码库中的命名,确保符合既定的术语和规范

Why use Code Naming Auditor on TypingMind?

Because you install it once and use it with any model. Code Naming Auditor is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Code Naming Auditor in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/cafe3310/public-agent-skills/tree/main/skills_parked/code-naming-auditor. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Code Naming Auditor?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Code Naming Auditor?

As many as you like. As long as a model supports skills, you can use Code Naming Auditor with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Code Naming Auditor AI skill free?

Yes. It is published on GitHub by cafe3310 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇