Git Shortcut: Commit, Add, Push

VerifiedCaution

Quick command to stage, commit, and push changes for the current project.

Sby Skills Guide Bot
DevelopmentBeginner
7/24/2026
Claude Code
#git#commit#push#workflow#version-control

Recommended for

Automated summary

A /cap command that chains change review, file staging, commit message generation, and pushing to the current branch's remote.

Strengths

  • Runs status, diff, and log in parallel so the commit is prepared in one pass
  • Writes a concise commit message that matches the repository's existing history style
  • Skips files likely to hold secrets and prefers git add on specific files
  • Handles a missing upstream automatically with git push -u origin <branch>

Limitations

  • Runs no tests or lint before committing and pushing
  • Does not handle merge conflicts, rebase, or pull request creation
  • Secret protection is a filename heuristic rather than a content scan
When to use it

Use it when a batch of edits is ready and you want to commit and push in a single command.

When not to use it

Avoid it for sensitive or risky changes that need tests, review, or manual conflict handling before pushing.

Security analysis

Caution
Quality score78/100

The skill only uses standard git operations (status, diff, log, add, commit, push) for a legitimate developer workflow, with no obfuscation, network calls to unknown hosts, or destructive commands. The main risk is that it performs an automatic commit-and-push to the remote, so mistakes or vulnerable files could be published irreversibly; this warrants caution rather than a safe rating.

Findings
  • •Automatically stages and pushes commits to a remote without explicit user confirmation, which can publish unintended changes
  • •Push step could propagate accidentally-committed secrets to a remote repository, though it does instruct avoiding common secret files
  • •Adds a fixed Co-Authored-By trailer attributing commits to Claude, which may be unwanted in some repositories
How this analysis is made

Examples

Quick commit and push
/cap
Commit with a given message
/cap fix typo in README installation section
Ship current work
/cap add retry logic to the API client

cap (Commit, Add, Push)

Quick commit-add-push shortcut for the current project.

Usage

/cap [optional commit message]

Instructions

<command-name>cap</command-name>

When this command is invoked:

Step 1: Review changes

Run these in parallel:

  • git status (no -uall flag) to see modified and untracked files
  • git diff to see staged and unstaged changes
  • git log --oneline -5 to see recent commit message style

Step 2: Stage relevant files

  • Stage all modified and untracked files that are part of the current work
  • Do NOT stage files that likely contain secrets (.env, credentials.json, etc.)
  • Prefer git add <specific files> over git add -A

Step 3: Commit

  • If the user provided a commit message argument, use it
  • Otherwise, generate a concise commit message summarizing the changes (1-2 sentences, focus on "why" not "what")
  • Follow the repository's existing commit message style
  • Always include the co-author trailer:
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    
  • Use a HEREDOC for the commit message to ensure proper formatting

Step 4: Push

  • Push to the current branch's remote tracking branch
  • If no upstream is set, use git push -u origin <branch>

Step 5: Confirm

Report to the user:

Pushed <commit-hash> to <remote>/<branch>
<commit message summary>
<N> files changed

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/git-shortcut-commit-add-push-mryiqh6n/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/git-shortcut-commit-add-push-mryiqh6n' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-shortcut-commit-add-push-mryiqh6n/download' --output '.skill-downloads/git-shortcut-commit-add-push-mryiqh6n/SKILL.md.part' && mv '.skill-downloads/git-shortcut-commit-add-push-mryiqh6n/SKILL.md.part' '.skill-downloads/git-shortcut-commit-add-push-mryiqh6n/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/git-shortcut-commit-add-push-mryiqh6n/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills