Smart Commit for Openclaw

Smart Commit is an AI-powered git utility that analyzes staged changes to generate precise, structured commit messages following the Conventional Commits standard.

wusuiling-if
v1.0.0
Mar 12, 2026
0
1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install git-smart-commit

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install git-smart-commit using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Smart Commit?

Smart Commit is a specialized tool within the Openclaw Skills ecosystem designed to eliminate the friction of writing manual git messages. By inspecting your staged diffs, it intelligently identifies the intent of your code changes—whether it is a new feature, a bug fix, or a performance optimization—and formats them into a standardized structure.

This skill ensures that your project's version history remains clean, searchable, and professional. It goes beyond simple text generation by detecting breaking changes and suggesting logical splits for overly complex diffs, making it an essential asset for any developer using Openclaw Skills for version control management.

Smart Commit Use Cases

  • When a developer wants to quickly generate a professional commit message without manual typing.
  • When a team requires strict adherence to the Conventional Commits specification for automated changelogs.
  • When staged changes are complex and need an AI-driven summary to identify the primary impact.
  • When performing routine maintenance like dependency updates (chore) or documentation tweaks (docs).

How Smart Commit Works

  1. The skill executes git diff --cached --stat to get a high-level overview of staged modifications.
  2. It performs a deep analysis of the full diff via git diff --cached to understand logic changes.
  3. The AI selects the appropriate type (feat, fix, refactor, etc.) and infers a relevant scope based on the file paths.
  4. A draft message is generated and presented to the user for review.
  5. Upon approval, the skill executes the final git commit -m command to finalize the change.

Smart Commit Setup

To integrate this capability into your workflow, ensure your Openclaw environment is configured and run the following in your terminal:

# Navigate to your git repository
cd your-project-repo

# Stage your changes
git add .

# Trigger the smart-commit skill through your AI agent
openclaw run smart-commit

Smart Commit Data Schema & Taxonomy

Smart Commit utilizes Git's internal metadata and the Conventional Commits taxonomy to organize information:

Component Source Description
Type Diff Analysis Classifies change (e.g., feat, fix, style)
Scope File Path Identifies the module affected (e.g., api, ui)
Subject Hunk Analysis Imperative description of the change
Breaking Change Code Impact Detection of breaking API or logic changes

For large diffs (over 4000 lines), it generates a summary based on git diff --stat to maintain token efficiency.

Smart Commit Advanced Features

  • Breaking Change Detection: Automatically adds ! to the header and populates the BREAKING CHANGE: footer.
  • Custom Scoping: Ability to force specific scopes or types using --scope and --type flags.
  • Amending Support: Seamlessly update the last commit message using the --amend option.
  • Dry Run Mode: Review the generated message without executing the commit command to verify accuracy.
  • Large Diff Sampling: Intelligent hunk sampling for massive changesets to ensure context is never lost.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*