Ai assist git commit

From jparkerweb/ai-assist-skills · View interactive version

Ai assist git commit is an AI agent skill from the GitHub repository jparkerweb/ai-assist-skills. Stage and commit changes using the team's standard commit message format. Only invoke when the user explicitly types /ai-assist-git-commit. Never auto-trigger from general conversation about commits or git.

How to use this skill

Skill file

Git Commit

Stages and commits changes using a standard commit message format. This skill is only invoked manually by the user — never auto-trigger.

Commit Message Format

<description>

AI Assisted

Workflow

Step 1 — Check for changes

Run git status (never use the -uall flag) and git diff (staged and unstaged) to see what has changed.

If there are no changes to commit, tell the user and stop.

Step 2 — Determine the commit description

Review the staged and unstaged changes from Step 1 to understand what was done.

If the user provided a description as an argument (e.g., /ai-assist-git-commit fix timeout on report export), use that as the commit description.

Otherwise, draft a concise commit description (1-2 sentences) based on the changes. Focus on the "why" rather than the "what". Present it to the user for approval:

Here's the commit I'll create:

```

<description>

AI Assisted

```

Stage and commit these changes? (Yes / Edit / No)

If the user provided a description as an argument, skip the approval prompt and proceed directly to Step 3.

Step 3 — Stage and commit

Stage the relevant changed files. Prefer adding specific files by name rather than git add -A or git add . — avoid accidentally staging sensitive files (.env, credentials) or large binaries. If unsure which files to include, ask the user.

Create the commit using the format from above. Pass the message via a heredoc to preserve formatting:

git commit -m "$(cat <<'EOF'
<description>

AI Assisted
EOF
)"

Do not push to the remote. Only commit locally.

Step 4 — Confirm

After committing, run git log -1 and show the user the resulting commit to confirm it was created correctly.

Rules

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.