commit-push

Creates atomic git commits with Conventional Commits messages and pushes to the remote.

3|1|Updated Aug 23, 2025
One-click install
npx skills add https://github.com/samuelpatro/.claude --skill commit-push-samuelpatro
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: commit-push
Source: https://github.com/samuelpatro/.claude/tree/main/skills/commit-push
Command: npx skills add https://github.com/samuelpatro/.claude --skill commit-push-samuelpatro

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing clear, consistent git commit messages and deciding how to split changes into atomic commits is tedious and error-prone. This Skill automates the full stage-commit-push flow while enforcing Conventional Commits style and safe git practices. ## Core Features & Use Cases - Atomic Commit Splitting: Analyzes your working tree and splits changes by concern, type, and file pattern so each commit builds and makes sense on its own. - Conventional Commits Messages: Generates terse imperative subjects (≤50 chars) with optional bodies only when the "why" is not obvious, matching your repo's existing style. - Safe Staging and Pushing: Stages files by name (never git add -A), skips potential secret files like .env or *.pem, pushes to the current branch, and never force-pushes. - Use Case: After finishing a feature plus a docs tweak, say "commit and push" and get two clean commits — feat(api): add profile endpoint and docs: update api readme — pushed to origin without touching unrelated files. ## Quick Start Ask the assistant to commit and push my current changes using the commit-push skill.

Frequently Asked Questions about commit-push

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

FAQPage Schema
How do I write Conventional Commits messages automatically?▼

Invoke the skill with a request like "commit and push" and it inspects git status and diffs, then generates Conventional Commits messages in the format type(scope): summary. Subjects stay under 50 characters in imperative mood, with bodies added only when the reasoning is not obvious.

How to split large git changes into atomic commits?▼

The skill splits changes when they involve different concerns, different commit types (feat, fix, docs), or different file patterns such as source versus config. Each resulting commit must build and make sense independently, and files are staged by name rather than with git add -A.

Does it prevent committing secret files like .env?▼

Yes, the skill never stages files that may contain secrets, including .env, credentials.json, *.key, *.pem, *.p12, id_rsa*, and token.json. It warns you and skips those files instead of committing them.

What happens if git push fails due to diverged history?▼

The skill never force pushes. If the push fails because of diverged history, it stops and informs you so you can resolve the divergence manually, for example by pulling or rebasing first.

When should a commit message include a body?▼

A body is added only when the why is not obvious from the subject, such as breaking changes, security fixes, data migrations, or reverts. Bodies wrap at 72 characters and reference issues with trailers like Closes #42.