push-commit

Stage all changes, commit with a descriptive message, and push to the remote. Trigger with "push commit", "commit and push", "push changes", "/push-commit".

16 stars

Best use case

push-commit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Stage all changes, commit with a descriptive message, and push to the remote. Trigger with "push commit", "commit and push", "push changes", "/push-commit".

Teams using push-commit should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/push-commit/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/cli-automation/push-commit/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/push-commit/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How push-commit Compares

Feature / Agentpush-commitStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Stage all changes, commit with a descriptive message, and push to the remote. Trigger with "push commit", "commit and push", "push changes", "/push-commit".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Push & Commit

Stage all local changes, generate a commit message, and push to the current branch's remote.

## Workflow

### Step 1: Check State

Run these in parallel:

- `git status` — see what's changed (never use `-uall`)
- `git diff --stat` — summary of staged and unstaged changes
- `git log --oneline -5` — recent commit messages for style reference
- `git branch --show-current` — confirm current branch

If there are no changes (no untracked files, no modifications), stop and tell the user there's nothing to commit.

### Step 2: Stage Changes

Run `git add -A` to stage everything.

**Exception:** If you see files that likely contain secrets (`.env`, `credentials.json`, API keys, tokens), do NOT stage them. Warn the user and list the suspicious files. Stage everything else by name.

### Step 3: Generate Commit Message

Analyze the staged diff and write a commit message that:

- Summarizes the nature of the changes (new feature, update, fix, refactor, docs, etc.)
- Focuses on the **why**, not the **what**
- Follows the style of recent commits in the repo
- Is 1-2 sentences max
- Ends with `Co-Authored-By: Claude <noreply@anthropic.com>`

Use a HEREDOC to pass the message:

```bash
git commit -m "$(cat <<'EOF'
Your commit message here.

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
```

### Step 4: Push

Run `git push origin <current-branch>`.

If the branch has no upstream, use `git push -u origin <current-branch>`.

### Step 5: Confirm

Run `git status` to verify the working tree is clean, and tell the user the commit hash and what was pushed.

## Edge Cases

- **No changes:** Tell the user there's nothing to commit. Don't create an empty commit.
- **Secrets detected:** Warn the user and skip those files. Stage and commit everything else.
- **Push fails (no upstream):** Retry with `-u` flag to set upstream tracking.
- **Push fails (rejected):** Tell the user — do NOT force push. Suggest `git pull --rebase` first.
- **Pre-commit hook fails:** Fix the issue, re-stage, and create a NEW commit (never amend).

Related Skills

git-commit-for-ai-agents

16
from diegosouzapw/awesome-omni-skill

Commit changes to a git repository. Use whenever a git commit is to be executed.

adversarial-committee

16
from diegosouzapw/awesome-omni-skill

Committee of personas with opposing propensities forcing genuine debate

push

16
from diegosouzapw/awesome-omni-skill

Add all changes, commit, and push to GitHub

git-pushing

16
from diegosouzapw/awesome-omni-skill

Stage, commit, and push git changes with conventional commit messages. Use when user wants to commit and push changes, mentions pushing to remote, or asks to save and push their work. Also activates when user says "push changes", "commit and push", "push this", "push to github", or similar git workflow requests.

git-create-commit-skill

16
from diegosouzapw/awesome-omni-skill

Use when creating git commits - mandates commits format with required scopes for all new commits, provides scope discovery from codebase structure, and prevents rationalization under pressure (emergency, fatigue, ambiguity)

git-commit-push

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user wants to commit their work to git and push to GitHub. It guides through reviewing changes, crafting meaningful commit messages following project conventions (including Conventional Commits when detected), creating commits with security checks, and pushing to remote repositories.

Git Commit Helper

16
from diegosouzapw/awesome-omni-skill

Creates well-formatted conventional commits with intelligent change analysis. Use when creating commits, committing changes, staging files, or when the user mentions "commit", "git commit", or wants to save their work to version control. Analyzes diffs to suggest splitting commits when multiple concerns are detected.

commit

16
from diegosouzapw/awesome-omni-skill

diff分析 → 論理的に分割コミット。conventional commitメッセージを自動生成。

commit-quick

16
from diegosouzapw/awesome-omni-skill

codemapの更新をスキップして素早くgit commitする。変更内容を分析し、適切なコミットメッセージを自動生成してコミットを作成する。

commit-feature

16
from diegosouzapw/awesome-omni-skill

Stage changes, create conventional commit (no co-author), push to origin, and add detailed PR comment with session context

commit-conventions

16
from diegosouzapw/awesome-omni-skill

This skill should be used when writing commit messages, when asked about commit format, when reviewing a commit message, or when creating a git commit. Provides Conventional Commits format and project-specific conventions.

commit-assistant

16
from diegosouzapw/awesome-omni-skill

Provides conventional commits guidance and auto-generates commit messages from git changes. Integrates with /ccpm:commit for automated git commits linked to Linear issues. Auto-activates when users ask about committing, creating git commits, or discussing commit message formats.