commit-and-push
Skill3 starsChanged 3 months agoMITView on GitHub
Safely review, verify, commit, and push intended repository changes to an established upstream branch, with sensitive-content gates. Use when the user invokes /commit-and-push, asks to commit and push current work, or requests publishing completed changes without creating a pull request.
- Commits and pushes
12 other projects use a version of this.
Adopted by
Most recently taken up by
- gigio1023/agent-skillstheir own version, first seen Oct 13, 2026
- FradSer/skillstheir own version, first seen Oct 13, 2026
- BUGLAN/skillstheir own version, first seen Oct 13, 2026
- zhiding512/claude-skillstheir own version, first seen Oct 13, 2026
- gigio1023/gigio-skillstheir own version, first seen Oct 13, 2026
- nopanderer/claude-skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use skill-builder and frontend-design.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
BlockSkillskill-builder
Create, edit, or inspect Berd skills stored as skill folders with SKILL.md files. Use when the user wants to build a new skill, update an existing skill, convert a workflow into a reusable skill, or decide whether instructions, scripts, references, or assets belong in a skill.
Also in 3 projects that use this
BlockSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Also in 5 projects that use this
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- legions-developer/evilcharts★ 3.2ksame name
- FradSer/skills★ 4same name
- Gusen1453/creed★ 3same name
- gigio1023/agent-skills★ 2same name
- gigio1023/gigio-skills★ 2same name
- BUGLAN/skills★ 1same name
- iden0605/Claude-Skills★ 1same name
- lsaOntact/claude-skills★ 0same name
- nopanderer/claude-skills★ 0same name
- ProstDev/skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-docsSkill
- be-conciseSkill
- build-contextSkill
- deploy-prototypeSkill
- response-analysisSkill
- suggest-nextSkill
- wind-downSkill
- wrap-upSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
73 rules. 0 are common, 63 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
63
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 14
Read and follow all applicable repository instructions before acting.
- Distinctive: line 15
Never assume every worktree change belongs to the current task.
- Distinctive: line 16
Never discard, reset, restore, stash, overwrite, or otherwise alter unrelated changes.
- Distinctive: line 17
Treat the existing index as user-owned state.
- Very specific: line 18
Never bypass Git hooks or verification with --no-verify.
- Distinctive: line 19
Never pull, merge, rebase, amend, reset, force-push, or retry a rejected push as part of this workflow.
- Distinctive: line 20
Treat any in-progress merge, rebase, cherry-pick, or revert as an absolute stop.
- Distinctive: line 21
Never infer or create an upstream branch.
- Distinctive: line 22
Never expose secret values when describing files or failures.
- Distinctive: line 23
Treat the original invocation as permission to prepare a commit, not permission to push.
- Very specific: line 28
Use <skill-dir>/scripts/check-sensitive-content.py to block routable IP address literals, likely credentials or private keys, oversized …
- Very specific: line 39
After reading repository instructions, run <skill-dir>/scripts/git-review.py gate as the first repository command.
- Very specific: line 43
If operations reports a merge or rebase, or conflicts is non-empty, immediately:
- Very specific: line 50
Do not inspect or edit conflicted files, suggest resolutions, fetch, stage, commit, run hooks, or invoke merge --continue, merge --abort, …
- Distinctive: line 58
When no upstream is configured, report the current branch and available remote names without printing potentially credential-bearing URLs.
- Very specific: line 60
After the gate passes, run <skill-dir>/scripts/check-sensitive-content.py --worktree.
- Very specific: line 64
Run <skill-dir>/scripts/check-hooks.py.
- Distinctive: line 66
Use its evidence with repository instructions, setup documentation, package scripts, and manager configuration to determine how hooks are …
- Very specific: line 68
Treat only verified-active as confirmed active.
- Distinctive: line 73
ask whether to continue.
- Distinctive: line 75
Wait for explicit confirmation before continuing.
- Distinctive: line 81
If fetch fails, stop and report that the outgoing range cannot be verified reliably.
- Distinctive: line 85
If HEAD and the upstream have diverged, stop and report both counts.
- Distinctive: line 86
If HEAD is only behind the upstream, stop and report that synchronization is required.
- Distinctive: line 87
Do not pull, merge, or rebase to reconcile either state.
- Distinctive: line 89
Before doing any other work, identify every commit and file already waiting to be pushed from that report.
- Distinctive: line 91
If existing outgoing commits are present, show:
- Distinctive: line 94
every outgoing commit SHA and subject.
- Distinctive: line 95
every changed file when the outgoing range contains 50 files or fewer.
- Distinctive: line 99
Ask whether those existing commits should be included.
- Distinctive: line 101
If the existing outgoing range contains more than 50 files, use the large-change gate below instead of printing every filename.
- Distinctive: line 103
If the worktree is clean and outgoing commits exist, skip commit preparation and proceed to the final outgoing-range review.
- Distinctive: line 109
When the count exceeds 50, stop and show:
- Distinctive: line 117
Ask whether to continue reviewing that large change set.
- Distinctive: line 123
Treat paths staged before this workflow as user-owned staging.
- Distinctive: line 130
If any path would be left uncommitted, show:
- Distinctive: line 137
Ask whether to leave those paths out, include them, or revise the selection.
- Distinctive: line 139
Do not mention ordinary ignored files unless they are suspiciously relevant to the requested work.
- Distinctive: line 145
Run the smallest relevant verification required by repository instructions or clearly implied by the changed files.
- Distinctive: line 147
Prefer focused tests, lint, or typechecks over repository-wide suites.
- Distinctive: line 148
Do not duplicate checks that repository instructions explicitly assign to commit hooks.
- Distinctive: line 149
If no separate verification is appropriate, state that none was run.
- Distinctive: line 150
If verification fails, stop before committing and report the useful failure output.
- Distinctive: line 151
Do not change code merely to silence an unrelated failure.
- Distinctive: line 159
every staged change belongs to the intended work.
- Distinctive: line 160
no confirmed exclusion is staged.
- Distinctive: line 161
no credential, secret, suspicious large file, or unrelated generated artifact is included.
- Distinctive: line 164
Run the staged sensitive-content gate.
- Distinctive: line 166
If the staged scope differs materially from the confirmed scope, stop and explain the difference.
- Distinctive: line 172
use an imperative subject.
- Distinctive: line 173
keep the subject at most 72 characters with no trailing period.
- Distinctive: line 175
use a short body only when it adds useful context.
- Distinctive: line 177
Commit normally so all configured Git hooks run.
- Distinctive: line 179
If verification, git commit, or a Git hook fails:
- Distinctive: line 185
leave staged and unstaged changes intact.
- Very specific: line 186
do not retry with --no-verify.
- Distinctive: line 187
do not proceed to push.
- Very specific: line 193
Run the final sensitive-content gate immediately after the fetch and before displaying outgoing metadata.
- Distinctive: line 197
Use the report to determine:
- Distinctive: line 200
every file added, modified, deleted, or renamed by the complete outgoing range.
- Distinctive: line 205
If the complete outgoing range now exceeds 50 files and that exact breadth was not already approved, apply the large-change gate again.
- Distinctive: line 209
Before every push, show a concise summary containing:
- Distinctive: line 213
every changed filename when there are 50 files or fewer.
- Distinctive: line 217
every path deliberately left uncommitted and what it appears to concern.
- Distinctive: line 220
If the destination is the detected remote default branch, display a prominent warning that the push goes directly to the default branch.
- Distinctive: line 222
Ask: Push these changes? Wait for an explicit affirmative response.
- Distinctive: line 224
If confirmation is declined, leave the commit local and report that nothing was pushed.
- Distinctive: line 228
After explicit confirmation, run the previously displayed push command against the configured upstream.
- Distinctive: line 230
If the push fails or is rejected:
- Distinctive: line 234
leave local commits intact.
- Distinctive: line 235
do not pull, merge, rebase, reset, amend, retry, or force-push.
- Distinctive: line 238
If the push succeeds, report:
- Distinctive: line 241
commit SHA and subject for each pushed commit.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commit and push
Review, verify, commit, and push the intended changes. Preserve unrelated work and require explicit approval before every push.
Resolve <skill-dir> as the directory containing this SKILL.md. Invoke every bundled script by its absolute <skill-dir>/scripts/... path while keeping the target repository as the working directory. Never resolve scripts/... against the target repository or PATH. The scripts are read-only and never fetch, stage, commit, or push. Keep scope decisions, verification selection, commit-message judgment, and approvals in this workflow.
Safety rules
- Read and follow all applicable repository instructions before acting.
- Never assume every worktree change belongs to the current task.
- Never discard, reset, restore, stash, overwrite, or otherwise alter unrelated changes.
- Treat the existing index as user-owned state. Never alter pre-existing staging without explicit confirmation.
- Never bypass Git hooks or verification with
--no-verify. - Never pull, merge, rebase, amend, reset, force-push, or retry a rejected push as part of this workflow.
- Treat any in-progress merge, rebase, cherry-pick, or revert as an absolute stop. Never resolve conflicts or run continue, skip, or abort commands for the user.
- Never infer or create an upstream branch.
- Never expose secret values when describing files or failures.
- Treat the original invocation as permission to prepare a commit, not permission to push.
- Require explicit confirmation immediately before every push.
Sensitive-content gate
Use <skill-dir>/scripts/check-sensitive-content.py to block routable IP address literals, likely credentials or private keys, oversized files, archives, sensitive filenames, and common generated artifacts. Scan at all four checkpoints:
- Worktree before displaying changed paths:
<skill-dir>/scripts/check-sensitive-content.py --worktree. - Existing outgoing commits:
<skill-dir>/scripts/check-sensitive-content.py --range '@{upstream}..HEAD'. - Staged content before committing:
<skill-dir>/scripts/check-sensitive-content.py --staged. - Refreshed final outgoing range:
<skill-dir>/scripts/check-sensitive-content.py --range '@{upstream}..HEAD'.
The scanner checks every complete resulting blob for path, size, archive, filename, and artifact risks. Textual blobs additionally receive IP-address and credential-pattern scanning. Binary classification never bypasses universal checks. Its default size limit is 20 MiB. It reports only a redacted path, category, and line number; never print the matched value. Any match is blocking, including matches in documentation, examples, and tests. Loopback, unspecified, private, link-local, and RFC documentation addresses are allowed, as are version strings such as v1.2.3.4 and recognised browser User-Agent versions such as Chrome/124.0.0.0; every other public address stays blocking. Stop and ask the user to remove the content or exclude the path. Never commit or push a flagged match. If the scanner cannot run or inspect a blob, stop rather than treating the scan as clean.
1. Inspect the repository
After reading repository instructions, run <skill-dir>/scripts/git-review.py gate as the first repository command. Do not scan the worktree, inspect status or hooks, fetch, review diffs, stage, commit, or push before this gate passes.
The gate reports repository root, branch, upstream, remote names, detached state, in-progress operations, and conflicts without collecting general worktree status. Apply every stop rule below to this report.
If operations reports a merge or rebase, or conflicts is non-empty, immediately:
- warn that the repository is in the middle of that operation;
- report the operation type and conflicted paths when safe;
- state that the user must resolve, continue, skip, or abort it separately;
- stop the workflow.
Do not inspect or edit conflicted files, suggest resolutions, fetch, stage, commit, run hooks, or invoke merge --continue, merge --abort, rebase --continue, rebase --skip, or rebase --abort. A request to commit and push never authorizes finishing or cancelling an existing operation.
Also stop immediately when:
- HEAD is detached;
- another in-progress Git operation exists, including cherry-pick or revert;
- the current branch has no configured upstream;
When no upstream is configured, report the current branch and available remote names without printing potentially credential-bearing URLs. Do not run git push -u or create a remote branch.
After the gate passes, run <skill-dir>/scripts/check-sensitive-content.py --worktree. Only after that passes, run <skill-dir>/scripts/git-review.py inspect. Its JSON provides redacted changed paths, rename-aware worktree counts, and top-level grouping. Stop if intended change ownership cannot be determined safely.
2. Check repository hook setup
Run <skill-dir>/scripts/check-hooks.py. It reports the effective hooks directory, repository hook-manager configuration, expected hooks, missing expected hooks, non-sample hook files, executable state, and a conservative status without executing hooks.
Use its evidence with repository instructions, setup documentation, package scripts, and manager configuration to determine how hooks are intended to be activated. Run an additional non-mutating manager status command only when needed. Do not execute hook payloads merely to test setup.
Treat only verified-active as confirmed active. If repository hook sources or configuration exist but the intended hooks appear inactive, missing, misconfigured, or cannot be verified as active:
- show the hook files or configuration found;
- show the concise evidence that setup is absent, broken, or uncertain;
- warn that committing without active project hooks may skip required checks;
- ask whether to continue.
Wait for explicit confirmation before continuing. This confirmation permits the workflow to continue without verified hooks; it does not authorize a push. Do not install, repair, copy, or reconfigure hooks unless the user separately requests it.
3. Fetch and inspect existing outgoing commits
Fetch the configured upstream remote before calculating outgoing commits. Fetch only: do not pull, merge, rebase, or prune.
If fetch fails, stop and report that the outgoing range cannot be verified reliably. Do not rely silently on stale remote-tracking refs.
Immediately run <skill-dir>/scripts/check-sensitive-content.py --range '@{upstream}..HEAD' after the fetch. It also scans outgoing commit metadata. Only after it passes, run <skill-dir>/scripts/git-review.py outgoing. Use that script's JSON for ahead/behind state, commits, rename-aware files, aggregate diff statistics, top-level grouping, default-branch detection, and the exact push command.
- If HEAD and the upstream have diverged, stop and report both counts.
- If HEAD is only behind the upstream, stop and report that synchronization is required.
- Do not pull, merge, or rebase to reconcile either state.
Before doing any other work, identify every commit and file already waiting to be pushed from that report.
If existing outgoing commits are present, show:
- the upstream destination;
- every outgoing commit SHA and subject;
- every changed file when the outgoing range contains 50 files or fewer;
- aggregate insertion and deletion counts;
- a warning that these commits will be included in any later push.
Ask whether those existing commits should be included. Wait for confirmation. This confirmation permits the workflow to continue; it does not authorize a push.
If the existing outgoing range contains more than 50 files, use the large-change gate below instead of printing every filename.
If the worktree is clean and outgoing commits exist, skip commit preparation and proceed to the final outgoing-range review. If the worktree is clean and there are no outgoing commits, stop and report that there is nothing to commit or push.
4. Apply the large-change gate
Apply this gate separately to each changed-path set reviewed by the workflow: the existing outgoing range, the worktree, and the final outgoing range. Use git-review.py's logical path count, status counts, and top-level groups; a rename is already counted as one path.
When the count exceeds 50, stop and show:
- which changed-path set triggered the gate;
- total path count;
- counts of added/untracked, modified, deleted, and renamed paths;
- counts grouped by top-level directory or another concise, coherent area;
- whether the breadth appears consistent with one change.
Ask whether to continue reviewing that large change set. For the worktree gate, wait for confirmation before staging or running potentially expensive verification. Approval of any large-change gate does not authorize a push.
5. Resolve the commit scope
Account for every changed and untracked path. Inspect enough of each diff or file to determine what it appears to concern.
Treat paths staged before this workflow as user-owned staging. If a pre-staged path would be excluded or its ownership is ambiguous, stop and ask whether to keep it included or explicitly unstage it. Never change pre-existing staging silently.
Separate paths into:
- intended changes to commit;
- changes that appear unrelated, local-only, generated unexpectedly, suspicious, or otherwise unsuitable to commit.
If any path would be left uncommitted, show:
- each excluded path;
- its status;
- a brief, non-sensitive description of what it appears to concern;
- why it appears separate from the intended commit.
Ask whether to leave those paths out, include them, or revise the selection. Wait for confirmation before staging.
Do not mention ordinary ignored files unless they are suspiciously relevant to the requested work.
If no intended uncommitted changes remain but confirmed outgoing commits exist, skip verification, staging, and commit creation unless repository instructions require otherwise. Proceed to the final outgoing-range review. If neither intended changes nor outgoing commits remain, stop and report that there is nothing to commit or push.
6. Verify the intended changes
Run the smallest relevant verification required by repository instructions or clearly implied by the changed files.
- Prefer focused tests, lint, or typechecks over repository-wide suites.
- Do not duplicate checks that repository instructions explicitly assign to commit hooks.
- If no separate verification is appropriate, state that none was run; configured Git hooks will still run.
- If verification fails, stop before committing and report the useful failure output.
- Do not change code merely to silence an unrelated failure.
7. Stage and review
Stage only the confirmed intended paths. Do not use blanket staging when unrelated changes exist.
Review the staged name/status summary and staged patch. Confirm that:
- every staged change belongs to the intended work;
- no confirmed exclusion is staged;
- no credential, secret, suspicious large file, or unrelated generated artifact is included;
- the staged change is coherent enough for one commit.
Run the staged sensitive-content gate. Do not commit when it reports a match or cannot complete.
If the staged scope differs materially from the confirmed scope, stop and explain the difference.
8. Generate and create the commit
Inspect recent commit subjects and follow the repository's established convention. Generate a concise message from the staged diff:
- use an imperative subject;
- keep the subject at most 72 characters with no trailing period;
- capture the primary user-visible or developer-visible change;
- use a short body only when it adds useful context.
Commit normally so all configured Git hooks run.
If verification, git commit, or a Git hook fails:
- stop immediately;
- report the hook or command that failed, when identifiable;
- show useful error or test output without leaking secrets;
- inspect and report whether a commit was created;
- leave staged and unstaged changes intact;
- do not retry with
--no-verify; - do not proceed to push.
9. Recalculate the complete outgoing push
Fetch the configured upstream remote again immediately before calculating the final outgoing range. If the fetch fails, stop and report that the range cannot be verified reliably.
Run the final sensitive-content gate immediately after the fetch and before displaying outgoing metadata. Then run <skill-dir>/scripts/git-review.py outgoing. If its report shows the upstream is ahead or diverged, stop before presenting a push confirmation. Do not reconcile automatically.
Calculate the complete outgoing range. It must include pre-existing outgoing commits as well as any newly created commit.
Use the report to determine:
- every outgoing commit;
- every file added, modified, deleted, or renamed by the complete outgoing range;
- aggregate insertion and deletion counts;
- the exact destination remote and branch;
- the exact non-force push command, expressed explicitly as
git push <remote> HEAD:<remote-branch>rather than relying onpush.defaultor other destination inference.
If the complete outgoing range now exceeds 50 files and that exact breadth was not already approved, apply the large-change gate again. Do not print an unbounded filename list; summarize it by status and coherent directory or area, then wait for confirmation to continue.
10. Present the push summary
Before every push, show a concise summary containing:
- destination remote and branch;
- every outgoing commit SHA and subject;
- every changed filename when there are 50 files or fewer;
- for each file, whether it is added, modified, deleted, or renamed;
- aggregate file, insertion, and deletion counts;
- verification performed;
- every path deliberately left uncommitted and what it appears to concern;
- the exact push command.
If the destination is the detected remote default branch, display a prominent warning that the push goes directly to the default branch.
Ask: Push these changes? Wait for an explicit affirmative response. Neither the original invocation nor any earlier scope confirmation authorizes the push.
If confirmation is declined, leave the commit local and report that nothing was pushed.
11. Push once
After explicit confirmation, run the previously displayed push command against the configured upstream. Never force-push.
If the push fails or is rejected:
- stop immediately;
- report the remote error and resulting repository state;
- leave local commits intact;
- do not pull, merge, rebase, reset, amend, retry, or force-push;
- report that the attempted changes were not published.
If the push succeeds, report:
- pushed branch and remote;
- commit SHA and subject for each pushed commit;
- verification performed;
- any changes deliberately left uncommitted.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

