]> git.giacomolli.uk - onechat/blob - .agents/skills/commit/SKILL.md
Send the end of the view in one part with the task
[onechat] / .agents / skills / commit / SKILL.md
1 ---
2 name: commit
3 description: Commit procedure and message rules. Use for every commit.
4 ---
5
6 # Commit
7
8 ## Procedure
9
10 1. Do the `check` skill. All checks must pass before you commit.
11 2. Stage only the files that belong to this change. Keep unrelated
12 changes in separate commits.
13 3. Write the message to a file or a here-document and commit with
14 `git commit -F`. Never put `\n` in `git commit -m`.
15 4. When `.githooks/commit-msg` rejects the message, fix the message and
16 commit again. Do not skip the hook with `--no-verify`.
17
18 ## Size
19
20 - Commit often. Split the work into small, coherent, working steps, and
21 do not wait for a full feature.
22 - Before a push, rebase on the latest `master` and fix conflicts during
23 the rebase. Never make a merge commit.
24
25 ## Subject
26
27 - Use 50 characters or fewer.
28 - Write a short summary in the present-tense imperative mood.
29 - Capitalize the first word. Do not end with a period.
30 - Do not use a subsystem or prefix.
31
32 ## Body
33
34 - Separate the subject from the body with exactly one blank line.
35 - Always write a body. Wrap each line at 72 characters. Fill each line
36 of a paragraph before you wrap it.
37 - Write in the present-tense declarative mood.
38 - Start with a direct summary of the complete change. Do not only repeat
39 the subject.
40 - Explain what the change does and why it is necessary. Describe the
41 resulting behavior and design.
42 - Do not describe the development process, list the changed files, or
43 give obvious implementation steps.
44
45 ## Trailers
46
47 - When the change belongs to an issue, end the message with one `Issue:`
48 trailer with the git-bug ID of that issue. Add it with
49 `git commit --trailer`. Never use a closing keyword such as "Fixes" or
50 "Closes".
51 - Link the bug report when a change fixes a reported bug.
52 - Do not add an AI tool as co-author. Do not add attribution trailers.
53
54 ## Example
55
56 ```
57 Print the program name
58
59 OneChat prints its name and exits. The program gives the Nix package a
60 binary that the install check can run, so the build pipeline is tested
61 before the first feature.
62 ```