Git commit

From sequenzia/agent-alchemy · View interactive version

Git commit is an AI agent skill from the GitHub repository sequenzia/agent-alchemy. Commit staged changes with conventional commit message. Use when user says "commit changes", "commit this", "save my changes", or wants to create a git commit.

How to use this skill

Skill file

Git Commit

Create a commit with a conventional commit message based on staged changes. Automatically stages all changes and analyzes the diff to generate an appropriate commit message.

Workflow

Execute these steps in order.


Step 1: Check Repository State

Check for changes to commit:

git status --porcelain

Step 2: Stage All Changes

Stage all changes including untracked files:

git add .

Report: "Staged all changes."


Step 3: Analyze Changes

View the staged diff to understand what changed:

git diff --cached --stat
git diff --cached

Analyze the diff to determine:


Step 4: Construct Commit Message

Build a conventional commit message following this format:

<type>(<optional-scope>): <description>

[optional body]

Types:

Rules:


Step 5: Create Commit

Create the commit using a heredoc for proper formatting:

git commit -m "$(cat <<'EOF'
<commit message here>
EOF
)"

Step 6: Handle Result

On success:

On pre-commit hook failure:


Error Recovery

If the commit fails:

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.