Get the FREE Ultimate OpenClaw Setup Guide →

commit

npx machina-cli add skill aiskillstore/marketplace/commit --openclaw
Files (1)
SKILL.md
1016 B

Commit Skill

Workflow

  1. Analyze Results: Review git status and git diff --staged.
  2. Draft Message: Follow Conventional Commits.
    • feat, fix, docs, style, refactor, test, chore.
    • Max 50 chars for subject.
    • Explain "why" in body if needed (wrap at 72).
  3. Atomic Commits: Ensure one logical change per commit.
  4. Templates: Use assets/commit-template.txt for consistency.

Safe Git Commands

  • git add <files>
  • git commit -m "message"
  • git diff --staged
  • git status, git show, git log --oneline

Limitations

  • No interactive commands (git add -p, git rebase -i).
  • No force pushing or amending without explicit user guidance.
  • Always confirm before final commit/push.

Source

git clone https://github.com/aiskillstore/marketplace/blob/main/skills/0xmsc/commit/SKILL.mdView on GitHub

Overview

This skill helps you write conventional commit messages, create atomic commits, and follow Git best practices. It analyzes the working tree, drafts messages with Conventional Commits types, and uses a template for consistency. It also emphasizes safety by avoiding interactive or destructive commands and requires confirmation before finalizing commits or pushes.

How This Skill Works

Process begins by analyzing git status and git diff --staged to understand changes. It then drafts a conventional commit message using types like feat, fix, docs, style, refactor, test, or chore, keeping the subject under 50 chars and placing a reason in the body if needed (wrap at 72). Each commit should be atomic, containing a single logical change, and messages can be templated with assets/commit-template.txt for consistency.

When to Use It

  • When preparing a feature, fix, or docs update that should follow Conventional Commits.
  • When you need to review staged changes with git status and git diff --staged before committing.
  • When ensuring every commit is atomic and contains only a single logical change.
  • When applying a standardized commit message template using assets/commit-template.txt.
  • When you want guidance and safeguards before finalizing a commit or push.

Quick Start

  1. Step 1: Run git status and git diff --staged to review changes.
  2. Step 2: Draft a conventional commit with a concise subject (<= 50 chars) and an optional body explaining why.
  3. Step 3: Stage and commit with git add and git commit -m "<message>"; reference assets/commit-template.txt if using the template; confirm before pushing.

Best Practices

  • Review the staged changes with git diff --staged before drafting a message.
  • Use a Conventional Commits type: feat, fix, docs, style, refactor, test, or chore.
  • Keep the subject under 50 chars and wrap the body at 72 chars; explain why if needed.
  • Make one logical change per commit to ensure atomic commits.
  • Use the commit template (assets/commit-template.txt) for consistency.

Example Use Cases

  • feat: add user authentication login
  • fix: correct email validation logic
  • docs: update CONTRIBUTING with commit guidelines
  • refactor: simplify auth flow without changing behavior
  • chore: update lint config and dependencies

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers