commit
Generate commit messages following project conventions. Use when committing changes or reviewing staged files.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Commit Message Generator
Instructions
- Run
git statusto check for all changes (staged, unstaged, untracked) - If there are unstaged or untracked files, run
git add -Ato stage all changes - Run
git diff --stagedto see what will be committed - If no changes to commit, inform the user and stop
Pre-commit Checks
-
Run lint and test checks before committing:
- Run
cargo fmt --checkto check formatting - Run
cargo clippy -- -D warningsto check for lint errors - Run
cargo testto run tests
- Run
-
If any checks fail:
- For formatting issues: Run
cargo fmtto auto-fix - For clippy warnings: Read the affected files and fix the issues
- For test failures: Investigate and fix the failing tests
- After fixes, run
git add -Ato stage the fixes - Re-run the failed checks to verify fixes
- For formatting issues: Run
-
Once all checks pass, generate a commit message following the rules below
-
Run
git commit -m "message"immediately (no confirmation needed)
Format
- Line 1: Summary (max 50 chars, imperative mood)
- Line 2: Blank
- Line 3+: Description (optional, explain what and why)
Rules
- Write in English
- Use imperative mood: "Add", "Fix", "Change" (not "Added", "Fixed")
- NO prefixes like feat:, fix:, docs:
- Be specific, avoid vague messages
Examples
❌ Bad
- Fix
- Bug fix
- Various changes
✅ Good
- Change audio capture buffer size to 20ms
- Add retry logic for P2P connection failures
- Remove unused audio codec parameters
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!