Skip to content

Commit d3fd2fe

Browse files
SilverRainZDeepSeek
andcommitted
[conf] Update docs-git-commit skill with docname format and interaction modes
- Use Sphinx docname format (blog/post-a) in examples instead of full paths - Add '不允许交互' mode for non-interactive execution scenarios - Add body format specification with per-file change details using docname format - Update commit message规范 with body format rules Co-authored-by: DeepSeek <service@deepseek.com>
1 parent c2a5a70 commit d3fd2fe

1 file changed

Lines changed: 23 additions & 16 deletions

File tree

.agents/skills/docs-git-commit/SKILL.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,17 @@ git diff --cached -- "*.rst" "*.md"
6060
计划创建以下 commit:
6161
6262
Commit 1: [中文描述]
63-
- src/blog/post-a.rst
64-
- src/blog/post-b.rst
63+
- blog/post-a
64+
- blog/post-b
6565
6666
Commit 2: [中文描述]
67-
- src/index.rst
68-
- src/about/contact.rst
67+
- index
68+
- about/contact
6969
```
7070

71-
**必须等我确认后再执行。** 若我明确说「直接提交」或者你当前不被允许和用户交互,
72-
跳过确认。
71+
**允许交互:** 必须等我确认后再执行。若我明确说「直接提交」,跳过确认。
72+
73+
**不允许交互:** 展示方案后直接执行,跳过等待确认。
7374

7475
### 第五步:逐个提交
7576

@@ -79,12 +80,16 @@ git commit -m "<中文描述>" -- <文件列表>
7980

8081
`git commit -- <files>` 只提交指定文件,staging area 中其他文件不变。
8182

82-
在 commit body 中附加 co-author 信息,参见 `model-co-authors` skill:
83+
在 commit body 中逐文件写明改动明细,仅列出 `*.rst` 文件(使用 Sphinx docname 格式,省略 `src/` 前缀和 `.rst` 后缀),最后附加 co-author 信息,参见 `model-co-authors` skill:
8384

8485
```bash
85-
git commit -m "<中文描述>" -m "" -m "Co-authored-by: DeepSeek <service@deepseek.com>" -- <files>
86+
git commit -m "<中文描述>" -m ""
87+
-m "- index: 改动说明
88+
- about/me: 改动说明" -m "Co-authored-by: DeepSeek <service@deepseek.com>" -- <files>
8689
```
8790

91+
每条明细的说明要独立自洽,避免使用代词(如「该文章」「此处」),也不要依赖其他条目或 commit message 标题才能理解。同时避免提到文档自身的名字。例如 `contact` 的改动写「修正邮箱地址」而非「修正联系页面邮箱地址」。
92+
8893
完成后展示:
8994

9095
```
@@ -96,8 +101,8 @@ git commit -m "<中文描述>" -m "" -m "Co-authored-by: DeepSeek <service@deeps
96101
## commit message 规范
97102

98103
- 使用中文
99-
- 描述改动目的,避免出现文件名
100-
- 控制在 50 字符内
104+
- 标题描述改动目的,避免出现文件名,控制在 50 字符内
105+
- body 逐文件写明改动明细(仅列 `*.rst`,使用 Sphinx docname 格式),格式 `- path: 说明`;说明需独立自洽,避免代词,不依赖其他条目或标题
101106

102107
## 常见错误
103108

@@ -107,7 +112,8 @@ git commit -m "<中文描述>" -m "" -m "Co-authored-by: DeepSeek <service@deeps
107112
| 把不同主题的文章混在一个 commit | 按主题拆分 |
108113
| 文章和配图分两个 commit | 同一篇文章的图文合并提交 |
109114
| 不展示方案直接提交 | 必须展示等我确认 |
110-
| commit message 写「修改了 a.rst b.rst」 | 描述目的,如「修正导航栏失效链接」 |
115+
| commit 标题写「修改了 a.rst b.rst」 | 描述目的,如「修正导航栏失效链接」 |
116+
| body 缺文件明细或说明含文档名 | 用 docname 格式,如 `- contact: 修正邮箱地址` |
111117

112118
## 示例
113119

@@ -124,10 +130,11 @@ git commit -m "<中文描述>" -m "" -m "Co-authored-by: DeepSeek <service@deeps
124130
**展示:**
125131
```
126132
Commit 1: 新增「2026 年度回顾」文章及配图
127-
- src/blog/2026-review.rst
128-
- static/images/2026-chart.png
129-
- src/index.rst
130133
131-
Commit 2: 修正联系页面邮箱地址
132-
- src/about/contact.rst
134+
- blog/2026-review: 年度回顾正文
135+
- index: toctree 新增年度回顾条目
136+
137+
Commit 2: 修正邮箱地址
138+
139+
- about/contact: 修正邮箱地址
133140
```

0 commit comments

Comments
 (0)