feat(agents): add commit writing skill
This commit is contained in:
1 file changed
+102
@@ -0,0 +1,102 @@
|
||||
---
|
||||
name: commit
|
||||
description: How to write git commits the way the user likes - tiny atomic commits following Conventional Commits (qoomon cheatsheet), with key decisions in the body and an Assisted-by footer. Use whenever you are about to commit, stage, or split work into commits.
|
||||
disable-model-invocation: false
|
||||
---
|
||||
|
||||
Create commits following these rules. Reference for Conventional Commits: the qoomon cheatsheet (https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13).
|
||||
|
||||
## Tiny atomic commits
|
||||
|
||||
Split the work into the smallest commits that each make sense on their own: one commit = one purpose (a fix, a refactor step, a doc update...). Never bundle unrelated changes into one commit. If a task touches several concerns, make several commits. Prefer many small commits over few large ones.
|
||||
|
||||
## Conventional Commits
|
||||
|
||||
Subject line format:
|
||||
|
||||
```
|
||||
<type>(<optional scope>): <description>
|
||||
```
|
||||
|
||||
### Types
|
||||
|
||||
Pick the first match in this order:
|
||||
|
||||
| The commit... | Type |
|
||||
|---|---|
|
||||
| fixes a bug | `fix` |
|
||||
| adds, adjusts or removes a feature (API or UI) | `feat` |
|
||||
| adds missing tests or corrects existing ones | `test` |
|
||||
| addresses code style only (formatting, whitespace...) | `style` |
|
||||
| affects documentation only | `docs` |
|
||||
| affects build tools, dependencies, project version | `build` |
|
||||
| affects operational aspects (infra, deploy scripts, CI/CD, backups, monitoring) | `ops` |
|
||||
| is a maintenance or non-code task (init commit, `.gitignore`...) | `chore` |
|
||||
| rewrites/restructures code specifically to improve performance | `perf` |
|
||||
| rewrites/restructures code without changing behavior | `refactor` |
|
||||
|
||||
### Scope
|
||||
|
||||
- Optional; a logical section of the project (`api`, `auth`, `cli`...), as defined by the project.
|
||||
- Never use issue identifiers as scopes.
|
||||
|
||||
### Description
|
||||
|
||||
- Imperative, present tense: "add", not "added" nor "adds".
|
||||
- Lowercase first letter, no trailing period.
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Add `!` before the `:` in the subject, e.g. `feat(api)!: remove status endpoint`.
|
||||
- Describe the breaking change in the footer with `BREAKING CHANGE: <description>`.
|
||||
|
||||
## Body: key decisions
|
||||
|
||||
Add a body when the commit contains a **key decision** (a design choice, a trade-off, why this approach over another). Describe the decision and its rationale, and contrast with previous behavior. If there is no meaningful decision to record, skip the body.
|
||||
|
||||
## Footer
|
||||
|
||||
The footer may reference issues (`Closes #123`, `Fixes JIRA-456`) and must carry `BREAKING CHANGE:` when applicable.
|
||||
|
||||
Additionally, every commit made by an agent **must** end with this trailer, and only this one:
|
||||
|
||||
```
|
||||
Assisted-by: <agent/harness>:<model>
|
||||
```
|
||||
|
||||
- `<agent/harness>`: the harness you run in, e.g. `Zed`, `Delta`, `MistralVibe`, `Junie`, `Antigravity`.
|
||||
- `<model>`: the model you run on, e.g. `glm-5.3`, `glm-5.3-flash`, `mistral-large-4`, `gemini-4-neon`, `gemini-4-hydrogen`, `gemini-4-carbon`, `gemini-3.8-flash`, `gpt-6-luna`.
|
||||
|
||||
Strictly **no** other agent trailer: no `Co-authored-by` for the agent, no `Made with`, no generated-by lines. `Assisted-by` only.
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
feat(shopping cart): add the amazing button
|
||||
|
||||
Assisted-by: MistralVibe:glm-5.3
|
||||
```
|
||||
|
||||
```
|
||||
fix(api): fix wrong calculation of request body checksum
|
||||
|
||||
Assisted-by: Zed:gpt-6-luna
|
||||
```
|
||||
|
||||
```
|
||||
feat!: remove ticket list endpoint
|
||||
|
||||
BREAKING CHANGE: ticket endpoints no longer support list all entities.
|
||||
|
||||
Fixes JIRA-1337
|
||||
Assisted-by: Junie:glm-5.3-flash
|
||||
```
|
||||
|
||||
```
|
||||
refactor(auth): implement token validation as middleware
|
||||
|
||||
Validate tokens in a single middleware instead of each
|
||||
route handler, so new routes get protection by default.
|
||||
|
||||
Assisted-by: Delta:glm-5.3
|
||||
```
|
||||
Reference in new issue
Block a user