审计代码库中的命名,确保符合既定的术语和规范
npx skills add https://github.com/cafe3310/public-agent-skills --skill code-naming-auditor
本 Skill 指导一个 AI Agent 对代码库执行全面的审计,以确保其遵循一套明确定义的术语和命名规范。其核心目标是在整个项目中强制执行“通用语言”(Ubiquitous Language),从而提高代码的清晰度、一致性和可维护性。
在使用本 Skill 期间,Agent 的输出避免 Markdown Table 格式。使用无格式文本列表即可。
审计过程遵循一个结构化的、分步骤的工作流。
清晰、明确的术语表是所有代码审计工作的基础。
docs/ 或根目录中寻找名为 glossary.md、terminology.md 或类似的文件。references/glossary_template.md 的模板来引导用户创建一个。术语表应精确定义项目核心的 名词 (Nouns) (例如 Content, Section, Line) 和 动词 (Verbs) (例如 get, find, search, list) 的语义。定义术语表的时候,要考虑使用精确、足够特殊的命名;避免模糊或歧义的术语。在拥有一个清晰且双方同意的术语表之前,不应继续下一步。
src/basics/ 目录下的所有文件。这样对吗?”这是核心执行阶段。系统地分析在已定义范围内的每一个文件。
search 的地方误用了 find?string[] 是否被命名为 lines 而不是术语表中定义的 Content?data, item, val, str 这样的模糊命名?在这些地方,是否可以使用术语表中更精确的术语?在提交报告后,Agent 可以主动提出应用这些修改建议。
replace 工具系统地应用每一个修改建议。为确保准确性,应逐一或按小的逻辑批次执行这些变更。Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take cafe3310/code-naming-auditor from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.