/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
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install contextual-git-committer - After installation, invoke the skill by name or use
/contextual-git-committer - Provide required inputs per the skill's parameter spec and get structured output
What is Contextual Git-Committer?
AI-powered Git assistant that analyzes staged changes and terminal history to craft meaningful, conventional commit messages. It is an AI Agent Skill for Claude Code / OpenClaw, with 107 downloads so far.
How do I install Contextual Git-Committer?
Run "/install contextual-git-committer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Contextual Git-Committer free?
Yes, Contextual Git-Committer is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Contextual Git-Committer support?
Contextual Git-Committer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Contextual Git-Committer?
It is built and maintained by Peter Lum (@liverock); the current version is v1.0.0.