Skip to content
Agentmart
Submit a tool

git-commit

Commit pending changes to git, optionally pushing after.

Skill by lucaspimentel

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/lucaspimentel-git-commit

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Commit pending changes to git, optionally pushing after. Use when the user says 'commit', 'commit my changes', 'commit all', 'commit everything', 'save my work to git', 'stage and commit', or any variation of wanting to create a git commit. Accepts an optional 'push' keyword to push after committing, and optionally specific file names or a description of what to commit.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/git-commit

What's inside

Skill name
git-commit
Description
Commit pending changes to git, optionally pushing after. Use when the user says 'commit', 'commit my changes', 'commit all', 'commit everything', 'save my work to git', 'stage and commit', or any variation of wanting to create a git commit. Accepts an optional 'push' keyword to push after committing, and optionally specific file names or a description of what to commit.
License
MIT
Instructions
45 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

Commit pending changes to git.
If the user's arguments include the keyword `push`, push the new commits after committing. Otherwise, do not push.

## Workflow

Start by running `git status` to check the current state.

### If anything is already staged

Commit exactly what is staged as a **single commit**. Do not split it into multiple commits, do not stage additional files, and do not unstage anything. The user has curated the staging area intentionally — respect it.

If the user provided an argument mentioning specific files but something different is staged, tell the user about the mismatch and ask how to proceed rather than silently changing the staging area.

### If nothing is staged

Analyze all pending changes (unstaged modifications, untracked files) and determine how to group them into logical commits. Consider:

- **File proximity**: changes in the same module/directory often belong together
- **Semantic cohesion**: related changes (e.g., a feature + its tests + its docs) should be one commit
- **Independence**: unrelated changes (e.g., a bug fix and a new feature) should be separate commits

Then stage and commit each group in sequence. If the user's argument narrows the scope (specific files, "all", etc.), honor that:
- Specific files or paths → stage and commit only those files (single commit)
- "all", "everything" → stage everything (`git add -A`) and split into logical commits if warranted
- If all changes are cohesive → a single commit is fine; don't split for the sake of splitting

## Commit messages
- Keep subject line concise (≤ 50 chars recommended)
- Write in imperative mood (e.g., use "Add feature", not "Added feature" or "Adds feature")
- Each commit should represent a single logical change

## Windows path handling
- If you are already in the correct directory, run `git` commands directly — don't prepend `cd <path> &&`.
- In git bash on Windows, these path forms are equivalent: `D:\foo`, `D:/foo`, `/d/foo`. Don't try to cd between them.

## Push (only if requested)

After all commits succeed, if `push` was requested:

1. Check if the current branch has an upstream: `git rev-parse --abbrev-ref @{upstream}`
2. If no upstream: `git push -u origin HEAD`
3. Otherwise: `git push`
4. **Never force-push.** If push fails due to diverged history, report the error and let the user decide.

From lucaspimentel/agent-skills, MIT.

More from lucaspimentel/agent-skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Sep 30, 2026 (29 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from lucaspimentel

Cite this page

git-commit skill. Agent Mart. https://agentmart.dev/skills/lucaspimentel-git-commit (last updated 2026-10-24)