Skip to content

Commit c08f0cf

Browse files
committed
.claude: add write-git-commit skill
1 parent 10876a2 commit c08f0cf

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
name: write-git-commit
3+
description: Create a git commit following repository conventions
4+
---
5+
6+
# Git Commit
7+
8+
Create git commits following the repository's established conventions.
9+
10+
## Commit Message Format
11+
12+
```
13+
<scope>: <subject>
14+
15+
[optional body]
16+
```
17+
18+
## Scope
19+
20+
The scope indicates which part of the codebase is affected:
21+
22+
- `plugin` - Plugin source code changes (most common)
23+
- `docs` - Documentation changes
24+
- `scripts` - Build/release script changes
25+
- `.github` - GitHub workflows and actions
26+
- `.claude` - Claude configuration and skills
27+
- `.vscode` - VS Code settings
28+
- `*` - Changes spanning multiple packages/areas
29+
30+
For focused changes within a scope, you may use a more specific prefix like `plugin api`, `plugin settings`, etc.
31+
32+
## Subject Line
33+
34+
- Use lowercase after the colon
35+
- Use imperative mood ("add feature" not "added feature")
36+
- No period at the end
37+
- Keep concise (ideally under 72 characters total)
38+
39+
Examples:
40+
41+
- `plugin: add support for task filtering`
42+
- `docs: update query-blocks documentation`
43+
- `*: bump versions across the board`
44+
- `.github: add separate build job`
45+
46+
## Body (Optional)
47+
48+
- Separate from subject with a blank line
49+
- Explain **why** the change was made, not what
50+
- Use sparingly - only when the subject isn't self-explanatory
51+
52+
Example:
53+
54+
```
55+
plugin: restore react & react-dom dedupe
56+
57+
While the tests pass after aligning react versions between docs/ and
58+
plugin/, the build still breaks at runtime without this.
59+
```
60+
61+
DO NOT add Claude as a coauthor to the commit.
62+
63+
## Process
64+
65+
1. Run `git status` to see staged and unstaged changes
66+
2. Run `git diff --staged` to review what will be committed
67+
3. Stage files with `git add <files>` (prefer specific files over `git add -A`)
68+
4. Determine the appropriate scope based on changed files
69+
5. Write a clear, concise subject line
70+
6. Add a body only if the "why" isn't obvious
71+
7. Create the commit

0 commit comments

Comments
 (0)