with one click
naming-validator
命名规范校验——函数 / 变量 / 文件 / 接口 / 错误码 / 表名 / 分支等命名是否符合团队规范。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
命名规范校验——函数 / 变量 / 文件 / 接口 / 错误码 / 表名 / 分支等命名是否符合团队规范。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
校验业务代码与 IDL 契约同步、字段冻结状态是否被破坏。作为 8 维度 code review 的"契约一致"维度,可被 design-checker / code-review-preparer 调用,也可独立运行。
聚合 8 维度 review Agent 的产出,生成统一的 review 报告并写入 reviews/{ts}.md。
当 context/ 下新增/删除文件时,自动更新对应层级的 INDEX.md,避免"孤儿文件"。
按 templates/detail-design.md 模板撰写详细设计文档,包括数据模型、IDL 变更、接口设计、决策、错误处理、监控、灰度等。
运维操作中心(Operations Center)通用适配器——为团队的运营/运维操作(开关、灰度、限流、降级)提供统一调用约定。具体实现按团队接入。
DevOps CLI 通用适配器——把团队的部署/构建/发布命令包装成一致的高层接口。具体实现按团队接入。
| name | naming-validator |
| description | 命名规范校验——函数 / 变量 / 文件 / 接口 / 错误码 / 表名 / 分支等命名是否符合团队规范。 |
| allowed-tools | Read, Bash, Grep |
原文 §8.3 规范查询类。命名是"低成本对齐"的最佳入口。
context/team/coding-style.md(团队级)+ context/project/{p}/coding-style.md(项目级覆盖)。
| 对象 | 规则 | 示例 |
|---|---|---|
| Go 函数 | UpperCamelCase 导出 / lowerCamelCase 内部 | GrantCoupon / grantCoupon |
| Go 变量 | lowerCamelCase | userID (不是 userId) |
| 文件 | snake_case.go | coupon_grant.go |
| 接口 path | kebab-case | /coupon/grant-by-tag |
| 错误码 | 6 位整数,按规范分段 | 4010001 |
| MySQL 表 | snake_case 单数 | coupon_grant_task |
| MySQL 字段 | snake_case | tag_rule_json |
| Git 分支 | feature/T12345-coupon-tag | 见 git-conventions |
| FT 编号 | FT-001, FT-002 | 不能省零 |
输入文件路径或 diff → 逐条提取命名 → 匹配规则 → 输出违规列表。
=== Naming Validation: coupon_grant.go ===
✓ 文件名:coupon_grant.go
✓ 函数:GrantByTag (导出,UpperCamelCase)
❌ 变量:UserId → 应为 userID(Go 习惯:ID/URL/JSON 等首字母缩写应全大写)
❌ 错误码:401001 → 位数错误,应为 6 位
✓ 接口 path:/coupon/grantByTag → 建议改 /coupon/grant-by-tag(kebab-case)
项目级覆盖团队级(详见 AGENTS.md §10)。
auxiliary-checker Agent 调用(review 维度⑧)feature-implementer 在 commit 前自检