git-commit
SKILL.md
Git Commit and Push
Commit staged git changes with a well-formed message and push to the remote branch.
Workflow
1. Verify prerequisites
git branch --show-current
git status --porcelain | grep "^[MARC]"
If no staged changes exist, tell the user "No staged changes found" and stop.
2. Analyze changes
git diff --cached --name-status
3. Create the commit message
Check for a project-specific template at .github/commit-message-template. If none exists, use conventional commits:
<type>[optional scope]: <description>
[optional body]
[optional footer]
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore Description: imperative mood, 50 chars max, capitalized, no trailing period Body: optional, 72-char line wrap, explain what and why Footer: breaking changes, issue references
If staged changes fall into multiple logical groups, create separate commits for each group.
4. Commit and push
git commit -m "<message>"
git log -1 --oneline
git push origin <current_branch>
5. Handle errors
- Push rejected:
git pull --rebasethen retry - Merge conflicts: stop and tell the user to resolve conflicts first
- Auth failure: report the error
6. Report result
{
"commits_created": ["<hash>: <message>"],
"branch_pushed": "<branch>",
"status": "success|failed",
"error_message": "<if failed>"
}
Weekly Installs
1
Repository
delexw/claude-code-miscGitHub Stars
24
First Seen
8 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1