git-commit

Analyzes uncommitted changes and creates a git commit with optional squash into unpushed commits.

Updated Dec 18, 2025
One-click install
npx skills add https://github.com/l0lxl0lw/dotfiles --skill git-commit-l0lxl0lw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/l0lxl0lw/dotfiles/tree/main/ai/shared/skills/git/git-commit
Command: npx skills add https://github.com/l0lxl0lw/dotfiles --skill git-commit-l0lxl0lw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Writing good commit messages and deciding whether to stack or squash changes is repetitive and error-prone. This Skill inspects your working tree, proposes a commit message based on the actual diff, and creates the commit through a single confirmation dialog — without ever pushing. ## Core Features & Use Cases - Repository Analysis: Runs a script that reports git status, unpushed commits, staged and unstaged diffs, untracked files, and recent commit style for message reference. - Stack or Squash: When unpushed commits exist, one dialog lets you commit on top, squash into the last commit via --amend, or reword the proposed message. - Safety Guardrails: Staging script warns about sensitive files (.env, .pem, .key) and the commit script rejects any AI attribution in messages. - Use Case: You finished a feature with several modified files and one unpushed commit. Invoke the skill, review the proposed message, choose "Squash into the last commit", and the changes are amended in — nothing is pushed. ## Quick Start Ask the assistant to commit your current changes, for example by saying "commit my changes but don't push".

Frequently Asked Questions about git-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit changes without pushing in git?

Run the commit workflow, which analyzes your working tree, proposes a commit message, and creates the commit after your confirmation. It never runs git push, so the commit stays local until you push manually or use a push-specific skill.

How to squash new changes into the last git commit?

When unpushed commits exist, the confirmation dialog offers a squash option that amends your staged changes into the previous commit using git commit --amend. If the commit was already pushed, it warns that amending rewrites published history and requires a force-push.

Does this skill prevent committing sensitive files like .env?

Yes, the staging script detects files matching patterns like .env, .pem, .key, .secret, .credentials, and .token. It warns about them and excludes them from automatic staging, requiring you to add them manually if intended.

Why was my commit message rejected by the script?

The commit script rejects messages containing AI attribution such as Co-Authored-By, Generated with Claude Code, or the robot emoji. Remove the attribution text and retry with a clean message.

When should I use git-commit versus git-push-branch?

Use git-commit when you only want to record changes locally on the current branch. Use git-push-branch when you want to commit and push on a feature branch, or git-push-to-main for the default branch.