Files
K12Study/.agents/skills/k12-comment-header-standard/SKILL.md

18 lines
993 B
Markdown
Raw Normal View History

2026-04-16 18:12:09 +08:00
---
name: k12-comment-header-standard
description: 当任务涉及注释模板、global.code-snippets 或 .fileheader 配置时使用,确保 author 与当前仓库 git user.name 对齐
---
# K12 注释头规范技能
## 何时使用
- 用户要求统一文件头/函数注释规范
- 用户要求 `@author` 与 git 用户名一致
- 任务涉及 `global.code-snippets``.fileheader/fileheader.config.yaml`
## 执行步骤
1. 读取仓库 `git config user.name`,以此作为 `author` 基线。
2. 更新 `global.code-snippets``FileHeader``Method` 的 author 默认值。
3. 若项目使用 `turbo-file-header`,检查 `.fileheader/fileheader.config.yaml``@author` 字段,确保与团队约定一致。
4. 修改后验证 JSON/YAML 可解析,避免因注释模板格式错误导致编辑器失效。
## 约束
- 不修改业务逻辑代码,只处理注释与模板规范。
- 需要保留已有注释字段顺序description/filename/author/copyright/since