commit-and-push
Analyze the current git changes, split them into commits following "each commit does exactly one thing" with lowercase Conventional Commit subjects, and push…
Skill by asura1234
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/asura1234-commit-and-push
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/commit-and-push
What's inside
- Skill name
commit-and-push- Description
- Analyze the current git changes, split them into commits following "each commit does exactly one thing" with lowercase Conventional Commit subjects, and push with an explicit source:destination refspec. Works on a feature branch and pushes to the same-name branch on origin, never upstream; refuses to commit on master (local commits included) unless the developer explicitly asked to commit or push directly to master.
- License
- Apache-2.0
- Instructions
- 142 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
Analyze the current changes, split them into commits following "each commit does exactly one thing", then push to the remote branch. Pure git/gh; runnable by any AI agent (claude / cursor / codex).
```
-- Guard: refuse detached HEAD and the protected branch (master / main)
branch = `git branch --show-current`
IF branch empty
Print "❌ commit and push is not allowed on a detached HEAD."
STOP
IF branch IN {main, master} AND the developer did NOT explicitly ask to commit or push directly to master
Print "❌ This repo forbids committing on master by default — **local commits are forbidden too**, not only pushes."
Print " Create a feature branch first and rerun: `git checkout --no-track -b feat/<desc> origin/master` (fix/ or chore/ likewise),"
Print " then, after landing, open a PR back to master with /pr."
STOP
-- An explicit developer request to commit/push directly to master authorizes the normal commit and
-- `git push origin master:master`; every ownership and validation check below still runs. Never force-push master.
-- Only master/main is listed: it is the only protected branch in this repo. No positive
-- `feat|fix|chore/*` allowlist — the remote has normal working branches without those prefixes
-- (e.g. `codex/*`), and an allowlist would block them too. "Other public/shared branches" cannot be
-- judged mechanically; the developer gates them.
-- Rules
Commit subject is a lowercase Conventional Commit accepted by `python3 scripts/conventional_commits.py --message-file <message-file>`
(types: the validator's ALLOWED_TYPES — feat, fix, perf, docs, ci, test, refactor, chore, release)
Never use `git add -A` or `git add .` — add files individually
Each commit should do exactly one thing:
- one feature slice
- one bug fix
- one test-only change
- one docs-only change
- one tooling/config change
Do not mix unrelated docs, tooling, tests, generated files, and production behavior in the same commit unless they are required for the same logical change.
Do not commit pre-existing unrelated dirty worktree changes unless the user explicitly asked for them.
-- Gather info
status = `git status` # never use -uall
short_status = `git status --short`
unstaged_diff = `git diff`
staged_diff = `git diff --staged`
name_status = union of:
`git diff --name-status`
`git diff --name-status --staged`
`git ls-files --others --exclude-standard`
remote_contains_head = `git merge-base --is-ancestor HEAD refs/remotes/origin/<current-branch>`
# an unborn HEAD or a missing remote ref both count as false
IF no changes AND remote_contains_head:
Print "No changes to commit or push."
STOP
IF no changes AND NOT remote_contains_head:
Print "Working tree is clean, but the current HEAD is not yet contained in the same-name remote branch; skipping commit and continuing to the explicit push."
Skip the commit loop and continue to Push below.
-- Analyze commit groups
Read the changed files and diffs.
Group changes by logical purpose, not by file extension alone.
Suggested grouping rules:
- Production code and its directly required tests can be one commit when they prove the same behavior.
- Pure test additions for existing behavior can be their own commit.
- Docs/guide updates should usually be separate from code changes.
- Lint/tooling/CI command changes should usually be separate from product code.
- Mechanical renames/moves should be separate from behavioral edits when practical.
- Generated files should be committed with the source change that generated them, if required.
Write an execution plan before staging:
Commit 1:
Purpose: <one thing>
Files/hunks: <paths and, if needed, hunk descriptions>
Message: <type>: <lowercase summary>
Commit 2:
...
If one file contains unrelated hunks for different commits:
Use `git add -p <file>` to stage only the intended hunk.
If interactive staging is too risky, ask the user before proceeding.
-- Commit loop
FOR EACH planned commit group:
Confirm working tree still contains the expected files.
Stage only this commit group's files/hunks:
`git add <file1> <file2> ...` # specific files only
or `git add -p <file>` # only when one file has mixed-purpose hunks
Verify staged content:
`git diff --staged --name-status`
`git diff --staged`
IF staged content includes unrelated changes:
Unstage only the unrelated paths/hunks.
Re-check staged diff.
Compose commit message:
title = "<type>: <lowercase summary>" # optional (scope) and ! allowed per the validator
body = 2-3 sentence description if useful (reason, issue reference)
Append the Co-Authored-By trailer per your agent's own convention (if it has one);
Do NOT hardcode a model name.
Validate: `python3 scripts/conventional_commits.py --message-file <message-file>`
IF it rejects the subject: fix the subject and re-validate before committing.
Run `git commit` with HEREDOC:
<type>: <lowercase summary>
Description (if needed)
<Co-Authored-By trailer per agent convention, if applicable>
Record commit hash and files included.
-- Push: ALWAYS origin + explicit refspec <branch>:<branch> (source and destination both pinned) + SSH/HTTPS fallback
-- Pinning the destination with an explicit refspec takes push.default out of the decision; even if the
-- branch's upstream was mistakenly set to origin/master, a bare `git push` cannot land the commits on master.
-- -u only sets the upstream to the same-name remote branch.
-- Never push to the `upstream` remote (the Herdr source) unless the user explicitly requests that exact remote.
push_cmd = `git push -u origin <current-branch>:<current-branch>`
TRY: run push_cmdFrom asura1234/bus, Apache-2.0.
More from asura1234/bus
- 0.592score
e2e-test
asura1234
Use to test the Bus TUI end to end like a manual QA tester, against a QA test doc (default tests/e2e-tui/app.md, optionally only some case IDs).
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-pr
asura1234
Iterative code review in which the reviewer proves suspicions in the correctness / security / bug dimensions by writing tests that run red or, preferably for…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-plan
asura1234
Iteratively and read-only review a plan file that follows the project plan template.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
split-pr
asura1234
Split a multi-purpose Bus branch into single-purpose branches from an explicit base, as parallel PRs, a stacked PR train, or a mix of both, with dependencies…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
address-review-comments
asura1234
Author-side adjudication and handling of plan/PR review comments, including fixed whole-file chunks with the same --scope as review-pr.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
delete-dead-code
asura1234
Clean up entropy on two tracks.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
gate-and-fix
asura1234
Use on a feature branch that is getting ready to commit, when lint, unit, integration, coverage, and diff gates must pass and failures must be remediated from…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
pr
asura1234
Feature-branch PR workflow.
SkillAFreshness: A★ 1Claude Code +9 - 0.588score
merge-pr
asura1234
Watch an open PR's two signals until it can merge — CI conclusions and review comments.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
worktree-new
asura1234
Create a new git worktree (an isolated working copy of the repo) and provision it so it can build, test and commit out of the box — create it from a freshly…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
rebase-origin-main
asura1234
Rebase the current feature branch onto the latest origin/master, triage conflicts by severity, then force-with-lease push with an explicit refspec.
SkillAFreshness: A★ 1Claude Code +9 - 0.583score
worktree-close
asura1234
Remove a git worktree that is no longer needed.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 7, 2026 (22 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/asura1234/bus
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from asura1234
- 0.592score
e2e-test
asura1234
Use to test the Bus TUI end to end like a manual QA tester, against a QA test doc (default tests/e2e-tui/app.md, optionally only some case IDs).
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
pr
asura1234
Feature-branch PR workflow.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
address-review-comments
asura1234
Author-side adjudication and handling of plan/PR review comments, including fixed whole-file chunks with the same --scope as review-pr.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
delete-dead-code
asura1234
Clean up entropy on two tracks.
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
gate-and-fix
asura1234
Use on a feature branch that is getting ready to commit, when lint, unit, integration, coverage, and diff gates must pass and failures must be remediated from…
SkillAFreshness: A★ 1Claude Code +9 - 0.592score
review-plan
asura1234
Iteratively and read-only review a plan file that follows the project plan template.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
commit-and-push skill. Agent Mart. https://agentmart.dev/skills/asura1234-commit-and-push (last updated 2026-10-24)