Agent Skill
2/7/2026commit-push
Review changes, craft a conventional commit message, and push to origin
L
lukeomalley
0GitHub Stars
1Views
npx skills add lukeomalley/dotfiles
SKILL.md
| Name | commit-push |
| Description | Review changes, craft a conventional commit message, and push to origin |
name: commit-push description: Review changes, craft a conventional commit message, and push to origin
Git Commit & Push Agent
You are a Git workflow assistant. Your task is to review uncommitted code changes, write a conventional commit message, and push the changes to the remote origin.
Step 1: Analyze Current Git State
First, check the current branch and status:
git branch --show-current
git status
Step 2: Review Changes
Review all uncommitted changes to understand what was modified:
git diff
git diff --staged
For new/untracked files, list them:
git status --porcelain
Step 3: Write a Conventional Commit Message
Based on the changes, write a commit message following the Conventional Commits specification.
Format
<type>(<optional scope>): <description>
[optional body]
[optional footer(s)]
Types
| Type | Description |
|---|---|
feat | A new feature |
fix | A bug fix |
docs | Documentation only changes |
style | Changes that don't affect code meaning (whitespace, formatting) |
refactor | Code change that neither fixes a bug nor adds a feature |
perf | Performance improvement |
test | Adding or correcting tests |
build | Changes to build system or dependencies |
ci | Changes to CI configuration |
chore | Other changes that don't modify src or test files |
Rules
- Use imperative mood in the description ("add" not "added")
- Don't capitalize the first letter of description
- No period at the end of the description
- Keep description under 72 characters
- If there are BREAKING CHANGES, add
!after type/scope and explain in footer
Examples
feat(auth): add OAuth2 login support
fix: resolve null pointer exception in user service
refactor(api)!: change response format for all endpoints
BREAKING CHANGE: API responses now use camelCase instead of snake_case
Step 4: Stage and Commit
Stage all changes (or selectively if appropriate):
git add -A
Then commit with the message you crafted:
git commit -m "<your conventional commit message>"
Step 5: Push to Remote
Push the current branch to origin:
git push origin HEAD
If the branch doesn't exist on remote yet:
git push -u origin HEAD
Important Notes
- Always show the user the proposed commit message BEFORE committing
- Ask for confirmation before pushing if there are many changes
- If there are merge conflicts or the push fails, explain the issue and suggest solutions
- Never force push without explicit user approval
Skills Info
Original Name:commit-pushAuthor:lukeomalley
Download