Commit and push

From Kevin-Liu-01/Agent-Machines · View interactive version

Commit and push is an AI agent skill from the GitHub repository Kevin-Liu-01/Agent-Machines. Stage, commit, and push changes without opening a PR. Use when the user says "commit and push", "commit these to a new branch", "push this branch", or wants a branch + commit summary but does not want PR creation. Distinct from `yeet`, which owns the commit + push + PR flow.

How to use this skill

Skill file

Commit and Push

Handle the common "just get this committed and pushed" workflow without drifting into PR creation.

When to use

Use this skill when the user explicitly wants git changes committed and pushed, but does not

ask for a pull request.

Examples:

If the user wants a PR too, use yeet instead.

Workflow

1. Inspect before staging

Always gather context first:

git status --short
git diff --stat
git diff --cached --stat
git log --oneline -6

You are looking for:

2. Decide branch behavior

a feature branch first, preferably kevin/<slug>.

Use non-destructive branch commands only:

git switch -c <branch>
git switch <branch>

Never use git checkout or git restore as the default path.

3. Stage intentionally

Do not blindly add everything if the tree includes junk. Exclude generated browser artifacts,

scratch outputs, and anything that should not ship.

Typical exclusions:

If the user said "everything," interpret that as everything relevant to the requested work, not

every piece of machine exhaust in the working tree.

4. Validate once if warranted

If the changes are code and the repo has an obvious targeted validation command, run it once before

committing. Prefer the narrowest meaningful check.

If validation is too expensive or unavailable, say so in the final summary.

5. Commit with repo-style messaging

Use the recent log to match local style. Prefer a concise imperative subject. If the repo uses

conventional commits, follow that convention.

Before committing, review the staged diff:

git diff --cached --stat
git diff --cached

6. Push and report cleanly

Push the current branch with upstream tracking:

git push -u origin "$(git branch --show-current)"

Then report:

If the user asked for an explanation of code changes, summarize the changes by area, not file spam.

Guardrails

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.