agentleFS
Mingo07-devMingo07-dev/claude_skills/git-commit-push/SKILL.md

git-commit-push

Skill2 starsChanged 7 months agoApache-2.0View on GitHub

Create Git commits and push to GitHub with Conventional Commits and a detailed body. Trigger on 'commit', 'git commit', 'push', 'commit and push', 'save to git', or 'push to main'. Builds a message from diffs and optional plan.md, and respects safety hooks.

  • Commits and pushes

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the message rules and body template in references/commit-message.md.

    line 35
  2. Distinctive:

    If user specified files, stage only those.

    line 39
  3. Distinctive:

    If target branch differs from current, ask for confirmation before switching.

    line 41
  4. Distinctive:

    If target is main or master, warn explicitly.

    line 42
  5. Distinctive:

    Commit only (no push)

    line 58

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git commit and push (Conventional Commits)

When to use

  • User asks to commit or push work
  • End of a milestone or session

Goal

Produce a Conventional Commit message (subject + structured body) and push to the correct branch, respecting prevent-git-commit-push hooks.

Step 1: Gather context

git status
git diff --cached --stat
git diff --stat
git diff --cached
git diff
git branch --show-current
git remote -v
cat plan.md 2>/dev/null || echo "[plan.md not found]"
git log --oneline -5

Step 2: Build the commit message

Use the message rules and body template in references/commit-message.md.

Step 3: Stage and branch safety

  • If user specified files, stage only those; otherwise git add -A.
  • Show git diff --cached --stat before committing.
  • If target branch differs from current, ask for confirmation before switching.
  • If target is main or master, warn explicitly.

Step 4: Execute

git add <target>
git commit -m "<subject>" -m "<body>"
git push origin <branch>

Step 5: Post-push confirmation

Summarize branch, remote, commit hash, and key changes.

Special cases

  • Commit only (no push)
  • Push only (no new commits)
  • Repo not initialized
  • Clean working tree
  • Push rejected or conflicts (no force push)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.