plugins/tools/git/skills/commit/SKILL.md
Git commit提交规范:生成符合Conventional Commits的提交信息,支持type/scope/subject/body/footer结构,适用于提交代码、暂存变更、编写commit message场景
npx skillsauth add lazygophers/ccplugin plugins/tools/git/skills/commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
提交信息生成模板
<type>(<scope>): <subject>
<body>
<footer>
其中:
type: 必填,类型,可选值:feat、fix、docs、style、refactor、perf、test、chore、revert、build、ci、wip、
workflow、types、release、otherscope: 可选,作用域,如:app、api、db、utils、server、client、config、test、docs、build、ci、wip、
workflow、types、release、othersubject: 必填,提交信息,不超过50个字符,如:add app module、fix api bug、update docs、refactor code、
perf optimize、test add unit test、chore update build、revert commit、build update package、ci add ci、
wip add wip、workflow update workflow、types update types、release update release、other update otherbody: 可选,详细描述,不超过80个字符,如:add app module、fix api bug、update docs、refactor code、perf optimize、
test add unit test、chore update build、revert commit、build update package、ci add ci、wip add wip、
workflow update workflow、types update types、release update release、other update otherfooter: 可选,关闭issue,如:close #123、fix #123、resolve #123、close #123, #456、fix #123, #456、
resolve #123, #456注意
commit进行提交,每个commit的type和subject需要分别填写.*.bak.*.log.*.tmp/.*.temp.*.exe/.*.dll/.*.so/.*.dylib/.*.a/.*.lib/.*.o/.*.obj/.*.img.*.zip/.*.rar/.*.7z/.*.tar/.*.gz/.*.bz2/.*.xz/.*.tar.gzgit status 查看未提交的文件和变更类型<type>(<scope>): <subject>git log -1 确认提交成功development
Go 数据库规范——GORM Model 命名 ModelXxx、表名单数、枚举 uint8 + 常量、索引 idx_ 前缀 + deleted_at leading column、禁 time.Time 统一 int64 unix、禁指针/nullable 字段、TEXT/BLOB/JSON 禁 default、AutoMigrate 禁改主键。设计 DB model、写 GORM tag、建索引、做 migration 审查时触发。
development
Go HTTP API 规范——响应始终 200 + body code 字段、路由 /api/* 全 POST 单段 <Action><Model>、中间件逐路由注册禁 Group(prefix,mw...)、handler 仅返回 (rsp,error)、认证走 header。设计 HTTP API、写路由/handler/中间件时触发。
development
Go 项目结构规范——三层架构(API → Impl → State)、全局状态模式、internal/ 私有包、cmd/ 仅 main.go、go.work 多模块、禁止 Repository 接口和 DI 容器、struct 公共字段开头全 omitempty、handler var rsp 顶声明、禁 legacy migration。设计项目骨架、新建目录、组织包、做架构评审时触发。
development
Go 命名规范——Id/Uid 字段(非 ID)、IsActive/HasMFA 布尔前缀、CreatedAt 时间字段、接收者统一用 p、包名全小写无下划线、泛型类型参数描述性命名、集合字段 xxx_list 禁 xxxs 复数、Enum 0 值 XxxNil 禁 Unknown、禁 Status 统一 State、Set/Update 语义区分。定义结构体字段、函数、变量、包、接收者名、泛型、枚举时触发。