/install contextual-git-committer
Contextual Git-Committer
An AI-powered Git assistant that writes descriptive, high-quality commit messages by analyzing your local workspace context.
How It Works
- Gathers staged changes via
git diff --cachedto see exactly what you're about to commit. - Correlates terminal history by reading recent shell commands to understand why changes were made (e.g., did you just run
npm install?pytest?). - Checks recent commits via
git logto maintain consistency with your project's existing style. - Parses diff hunks to identify which functions, classes, or sections were modified.
AI Prompt Instructions
When the suggest_commit tool returns its output, use the gathered context to generate exactly 3 commit message options:
Option 1: Conventional Commit
A short, standards-compliant message using the Conventional Commits format:
- Prefix with the correct type:
feat:,fix:,refactor:,docs:,test:,chore:,style:,perf:,build:, orci: - Include the scope if provided
- Keep the subject line under 72 characters
- Example:
fix(auth): resolve null pointer when session expires
Option 2: Story / Detailed
A narrative-style message that explains what the change achieves in plain English:
- Focus on the "why" and the outcome, not just the mechanics
- 1-2 sentences
- Example: "Updated the header logic to prevent crashes when a user is logged out, which was causing intermittent 500 errors on the dashboard."
Option 3: Emoji Style
A casual, emoji-prefixed message for less formal projects:
- Use relevant emojis to convey the type of change
- Keep it concise and fun
- Example: "🐛 Fixed header crash on logout | 🛡️ Added null checks for session object"
Output Format
Present the three options as a numbered list:
📝 Suggested Commit Messages:
1. **Conventional:**
`fix(auth): resolve null pointer when session expires`
2. **Story:**
Updated the header logic to prevent crashes when a user is logged out, which was causing intermittent 500 errors on the dashboard.
3. **Emoji:**
🐛 Fixed header crash on logout | 🛡️ Added null checks for session object
If no staged changes are found, inform the user and suggest running git add to stage their changes first.
Usage Examples
/suggest_commit— Analyze staged changes and suggest 3 messages/suggest_commit --style detailed— Provide more verbose explanations/suggest_commit --scope api— Focus the message on the API module/suggest_commit --style detailed --scope auth— Detailed messages scoped to auth
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install contextual-git-committer - 安装完成后,直接呼叫该 Skill 的名称或使用
/contextual-git-committer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Contextual Git-Committer 是什么?
AI-powered Git assistant that analyzes staged changes and terminal history to craft meaningful, conventional commit messages. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 107 次。
如何安装 Contextual Git-Committer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install contextual-git-committer」即可一键安装,无需额外配置。
Contextual Git-Committer 是免费的吗?
是的,Contextual Git-Committer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Contextual Git-Committer 支持哪些平台?
Contextual Git-Committer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Contextual Git-Committer?
由 Peter Lum(@liverock)开发并维护,当前版本 v1.0.0。