← Back to Skills Marketplace
wusuiling-if

Git Smart Commit

by wusuiling-if · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
284
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install git-smart-commit
Description
Analyze staged git changes and generate high-quality commit messages following Conventional Commits format. Use when: (1) user asks to commit changes, (2) us...
README (SKILL.md)

Smart Commit

Generate precise, conventional commit messages from staged git changes and optionally commit in one step.

Workflow

  1. Run git diff --cached --stat to see what's staged. If nothing is staged, check git diff --stat and ask the user if they want to stage all changes first.
  2. Run git diff --cached to get the full diff (if very large, use --stat summary + sample key hunks).
  3. Analyze the diff and generate a commit message following the rules below.
  4. Present the message to the user. If approved, run git commit -m "\x3Cmessage>".

Commit Message Format

Follow Conventional Commits:

\x3Ctype>(\x3Cscope>): \x3Csubject>

[optional body]

[optional footer]

Rules

  • type: One of feat, fix, refactor, docs, chore, test, style, perf, ci, build
  • scope: Optional. Infer from changed files (e.g., auth, api, ui, db). Omit if changes span too many areas.
  • subject: Imperative mood, lowercase, no period, max 72 chars. Be specific — not "update files" but "add retry logic to HTTP client".
  • body: Add only when the "why" isn't obvious from the subject. Wrap at 72 chars.
  • breaking changes: Add ! after type/scope and BREAKING CHANGE: footer.
  • Multiple logical changes: If the diff contains clearly unrelated changes, suggest splitting into multiple commits with git add -p.

Type Selection Guide

Signal Type
New feature, new endpoint, new UI element feat
Bug fix, error correction, patch fix
Code restructure, no behavior change refactor
Comments, README, docs, JSDoc docs
Dependencies, configs, tooling chore
Test files added/modified test
Formatting, whitespace, linting style
Performance improvement perf
CI/CD pipeline changes ci
Build system, compilation build

Quality Checklist

Before presenting the message, verify:

  • Subject is specific and descriptive (someone reading git log --oneline can understand the change)
  • Type accurately reflects the change
  • Scope is correct or intentionally omitted
  • No vague words: "update", "change", "modify", "fix stuff", "misc"
  • Breaking changes are flagged if applicable

Examples

Single file fix:

fix(auth): handle expired JWT tokens in refresh flow

Multi-file feature:

feat(api): add pagination support to list endpoints

Implement cursor-based pagination for /users, /posts, and /comments.
Default page size is 20, max 100.

Breaking change:

feat(config)!: migrate from YAML to TOML configuration

BREAKING CHANGE: config.yaml is no longer supported.
Run `migrate-config` to convert existing configs.

Chore:

chore(deps): bump express from 4.18.2 to 4.19.0

Large Diffs

For diffs exceeding ~4000 lines:

  1. Use git diff --cached --stat for overview
  2. Read key files with git diff --cached -- \x3Cimportant-file>
  3. Summarize the overall change from the stat + sampled hunks
  4. If changes are too diverse, recommend splitting the commit

Options

The user may specify preferences:

  • --no-body: Skip the body, subject only
  • --scope \x3Cname>: Force a specific scope
  • --type \x3Ctype>: Force a specific type
  • --amend: Amend the previous commit instead
  • --dry-run: Generate message without committing
Usage Guidance
This skill appears to do exactly what it says: it reads your git diffs and proposes Conventional Commit messages, and can run git commit if approved. Before installing or using it: (1) ensure the git CLI is available on the agent/runtime (the skill assumes git but didn't declare it), (2) be aware the agent will read diffs from your working tree — avoid committing secrets or sensitive data without review, (3) prefer using --dry-run first or require explicit user approval before committing, and (4) review generated commit messages before allowing an automatic commit or amend.
Capability Analysis
Type: OpenClaw Skill Name: git-smart-commit Version: 1.0.0 The skill bundle provides a legitimate utility for generating and applying Conventional Commits based on staged git changes. It uses standard git commands (git diff, git commit) as described in SKILL.md and lacks any indicators of data exfiltration, malicious execution, or harmful prompt injection.
Capability Assessment
Purpose & Capability
Name/description match the instructions: it analyzes staged diffs and produces Conventional Commits messages and can run git commit. However, the skill's manifest lists no required binaries while the runtime steps clearly require the git CLI (git diff, git commit). This is a small metadata mismatch but not a functional incoherence.
Instruction Scope
SKILL.md stays within scope: it directs the agent to run git diff/git commit, analyze diffs, infer type/scope/subject, and optionally stage/amend/commit. It does not instruct reading unrelated files, contacting external endpoints, or accessing unrelated credentials. It may recommend staging all changes if nothing is staged — the agent should confirm with the user before making changes.
Install Mechanism
Instruction-only skill with no install spec and no code files; this has the lowest install risk. Nothing is downloaded or written to disk by the skill itself.
Credentials
No environment variables or credentials are requested, which is appropriate. The only proportionality issue is the missing declared dependency on the git binary. Also, the skill will read repository diffs (including staged and possibly unstaged content if user chooses to stage everything) — that means local code and any secrets contained in diffs could be observed by the agent during analysis; this is expected behavior for a commit-message helper but worth the user's awareness.
Persistence & Privilege
always is false and there are no config paths or requests to modify other skills or system-wide settings. The skill may run git commit if the user approves (or the agent is allowed to act autonomously), which is expected capability for this type of tool.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install git-smart-commit
  3. After installation, invoke the skill by name or use /git-smart-commit
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: auto-generate Conventional Commits messages from staged git changes
Metadata
Slug git-smart-commit
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Git Smart Commit?

Analyze staged git changes and generate high-quality commit messages following Conventional Commits format. Use when: (1) user asks to commit changes, (2) us... It is an AI Agent Skill for Claude Code / OpenClaw, with 284 downloads so far.

How do I install Git Smart Commit?

Run "/install git-smart-commit" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Git Smart Commit free?

Yes, Git Smart Commit is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Git Smart Commit support?

Git Smart Commit is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Git Smart Commit?

It is built and maintained by wusuiling-if (@wusuiling-if); the current version is v1.0.0.

💬 Comments