Skip to content
Back to skills

Commit Merge Push

ASecurity

Fork subagent that commits pending changes in logical units, merges origin/main, and pushes to origin HEAD.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
ai-agentsgoshellbashgit

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add natb1/commons.systems --skill commit-merge-push --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit Merge Push?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Commit Merge Push
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/natb1-commit-merge-push/badge)](https://www.skillsdirectory.com/skills/natb1-commit-merge-push)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: commit-merge-push
description: Fork subagent that commits pending changes in logical units, merges origin/main, and pushes to origin HEAD.
context: fork
model: sonnet
---

# Commit, Merge, Push

Fork subagent. Finalizes a batch of pending changes in the working tree by creating commits, merging `origin/main`, and pushing to `origin HEAD`. Self-contained — do not invoke or reference other skills.

## Sandbox

Use `dangerouslyDisableSandbox: true` on every git **write** command: `git add`, `git commit`, `git merge`, `git checkout`, `git push`. Read-only git commands (`git status`, `git diff`, `git log`, `git show`) run without disabling sandbox.

Do not skip hooks (`--no-verify`, `--no-gpg-sign`) unless the user explicitly requests it.

## No edits

Never modify repository files. No `Edit`, `Write`, or text manipulation of working-tree contents. Only run `git` and report. Any situation that would require an edit (merge conflict, failed hook whose fix is code changes) must be surfaced as an error to the caller — the caller owns the working tree and the edit authority.

## Staging

Add specific files by name. Do not use `git add -A` or `git add .` — risks pulling in secrets or build artifacts.

Never commit files that could contain secrets (`.env`, `credentials.json`, private key material). If such a file is present in the working tree's changes, warn and stop.

## No pending changes

When the working tree has no changes to stage, create no commit and go straight
to the merge-and-push below. This is expected when a caller forks this skill
solely to merge `origin/main` into the branch.

## Commit messages

- One commit per logical unit.
- Title: imperative, ≤ 72 chars, focused on the "why" and the observable change — not a file list.
- Body (if present): design / scope decisions worth preserving so future edits do not accidentally revert them. If a decision contradicts an earlier one, stop and raise it to the user rather than burying it in the commit.
- Use a HEREDOC with single-quoted `EOF` when the message contains characters that would confuse shell quoting:
  ```bash
  git commit -m "$(cat <<'EOF'
  Short imperative title

  Longer body describing the why and any decisions.
  EOF
  )"
  ```
- Create NEW commits. Do not `--amend` unless the user explicitly asks. If a pre-commit hook fails, do NOT attempt to fix it — error out and let the caller fix and retry.

## Merge origin/main and push

Immediately after the final commit — or immediately, if there was nothing to commit:

```bash
git fetch origin main
git merge origin/main
git push origin HEAD
```

Always error on merge conflicts. Do not attempt resolution — the caller must resolve and re-invoke this skill.

If the push is rejected (non-fast-forward, hook rejection), stop and report. Do not force-push.

## Reporting

Return a summary with:
- Commits created — title + short SHA per commit, or "no commits — no pending changes" when the working tree had nothing to stage.
- Merge outcome — clean or errored on conflicts (list conflicted paths).
- Push outcome — succeeded or rejected with reason.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.