Commit push
Create a commit and push its branch with safeguards for default-branch pushes.From its SKILL.md
npx -y skills add shihyuho/skills --skill commit-pushAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.3 KB, as published. Nobody here has run it
commit-push
Invocation input
$ARGUMENTS below means the arguments supplied with the user's explicit invocation. In inherited Context blocks, run each ! command to collect the named value; those expressions are not expanded automatically in a skill.
Context
- Current git status: !
git status - Current git diff (staged and unstaged changes): !
git diff HEAD - Current branch: !
git branch --show-current - Default branch: !
git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || true - Recent commits: !
git log --oneline -10 - Arguments received: "$ARGUMENTS"
Your task
You MUST invoke the git-commit-co-author skill before running git commit.
Based on the above changes:
- Assess whether the diff clearly spans several unrelated concerns (e.g. a bug fix plus an unrelated rename plus a new doc). Treat a cohesive change that merely touches many files as one concern — bias toward NOT splitting; only flag clear, separable concerns.
- One concern: create a single commit with an appropriate message.
- Clearly several unrelated concerns: ask the user whether to record one single commit or split into atomic commits (one per concern), then commit accordingly. If the arguments received above ask for atomic commits (or similar), skip that question and split into atomic commits (one per concern) directly.
- Push the branch to origin. Safety gate: If the current branch equals the default branch, STOP before pushing and get explicit confirmation that pushing directly to the default branch is intended. If the arguments received above already confirm this, take that as the confirmation and skip the question; otherwise use the AskUserQuestion tool to ask. Commit first regardless — only the push step gates on confirmation.
- After the push succeeds, get the branch's URL on the remote with
gh browse -n -b <branch>and give it to the user.
When no safety-gate question is needed — a non-default branch, or the arguments already confirm the default-branch push — do the commit and push tool calls in a single message, then send the branch link as your only text output. Do not use any other tools or send any other text.