Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 17:54:51 +08:00
commit cd396e3575
13 changed files with 311 additions and 0 deletions

36
commands/commit.md Normal file
View File

@@ -0,0 +1,36 @@
Generate a well-structured commit message for the current changes. Analyze the git diff and create a commit message that follows best practices.
## Commit Message Guidelines
1. **Format**
- First line: Brief summary (50 chars or less)
- Blank line
- Detailed description explaining what and why (wrap at 72 chars)
- Focus on the motivation and context, not just what changed
2. **Content Requirements**
- Use imperative mood ("Add feature" not "Added feature")
- Be specific and descriptive
- Explain the reasoning behind changes
- Mention any breaking changes or important notes
- Group related changes logically
3. **Structure**
- Start with the type: feat, fix, refactor, docs, test, chore, style, perf
- Provide context about the problem being solved
- Explain the solution approach if non-obvious
- List key changes in bullet points for complex commits
4. **Important Restrictions**
- Do NOT include any AI assistant names or references
- Do NOT include tool attribution
- Do NOT add co-author tags for AI assistants
- Keep the message focused on the code changes only
5. **Quality Checks**
- Is the message clear to someone unfamiliar with the change?
- Does it explain both WHAT and WHY?
- Would this be helpful when reviewing git history later?
- Is it concise but complete?
Generate a commit message that is professional, clear, and follows these guidelines strictly.