Confirm Before Push logo

Confirm Before Push

Community
randommonicle
confirm-before-push

Always ask explicitly before pushing to a remote or fast-forwarding a protected branch. Per-action authorisation, not standing approval. Triggers on any git push, merge, or branch fast-forward operation, regardless of whether previous pushes in the same session were approved.

Overview

Publisherrandommonicle
Repositoryclaude-skills
Skill nameconfirm-before-push
Stars
27
Forks
3
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by randommonicle on GitHub. Read the source before you install it.

Installation

Install the Confirm Before Push AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/randommonicle/claude-skills/tree/main/confirm-before-push
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/randommonicle/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/confirm-before-push .claude/skills/confirm-before-push
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Confirm Before Push in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Confirm Before Push on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Confirm Before Push is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Confirm before push or merge

Always ask before pushing to a remote, merging to a protected branch, or fast-forwarding a protected branch. Each action needs its own explicit authorisation. Past approvals in the same session do not extend to future ones.

When this applies

This skill fires on:

  • Any git push to a remote
  • Any git merge into main, master, or another protected branch
  • Any fast-forward of a protected branch (git push origin HEAD:main)
  • Any history-rewriting push (--force, --force-with-lease)
  • Any merge or rebase that lands work on a protected branch

This skill applies even when the project's convention is direct-to-main solo shipping. The convention defines where work lands; this skill defines the per-action authorisation gate before it lands.

How to apply

After committing locally, summarise what's on the branch and ask before pushing. Examples:

  • "Committed locally as <sha> <message>. Three files, plus one migration. Ready to push to origin?"
  • "Worktree branch has two commits ahead of main. Push the branch first, then fast-forward main?"

Wait for explicit confirmation. Words like "yes", "push it", "go ahead", "proceed" are clear authorisations. Ambiguous responses ("looks good", "nice") are not.

Do not push with --force or rewrite published history without explicit per-action approval that names the force operation specifically.

Standard push order

When a multi-step push is authorised, the canonical sequence is:

  1. Push the local working branch to its remote tracking branch
  2. Verify the push landed (check git log --oneline <remote>/<branch>)
  3. If a protected branch fast-forward is part of the authorisation, perform it as a separate step
  4. Verify the protected branch tip with git log --oneline <remote>/<protected-branch>

If any step fails, stop and report rather than continuing to the next.

What this skill does not do

Local commits do not require this gate. Commit freely; the gate is on the moment work leaves the machine or lands on a protected branch.

Branch creation, worktree setup, and similar local operations are not push events and do not trigger this skill.

Why

Pushing is visible to others and hard to reverse. CI runs, deploy webhooks, and anyone watching the repository all consume pushes the moment they land. Even on a solo direct-to-main project, every push is the moment a commit becomes off-machine durable and shared. Per-action authorisation prevents the case where standing approval from earlier in a session is used to push work the user has not yet reviewed.

Remote branch deletion (added 2026-07-23)

The gate extends to deleting any remote branch, including --delete-branch on a merge. Deleting a branch an open PR points at closes the PR unrecoverably (a fresh PR gets a new number; one deletion left the work's only surviving copy in a local object store). Before any branch delete, run the mechanical preflight:

bash
gh pr list --head <branch> --state all
gh pr list --base <branch>
git log main..<branch>

In a squash-merge repo, "merged" is a PR fact, never an ancestry fact — git branch --merged lies in both directions. Judge a stale branch by the diff it would apply to main today. Redundancy means content-on-main AND no open PR — never a name or someone's say-so.

Merge mechanics (added 2026-07-23)

  • Diff a branch with git diff $(git merge-base main branch) branch, not main..branch — the symmetric diff misleads for branches forked before a main-side hotfix. After merging onto a hotfixed base, grep the queries the branch introduced (see blast-radius-grep).
  • gh pr merge from a worktree can error on the local step while the remote merge succeeded: verify the real outcome with gh pr view --json state,mergedAt and sync main separately with git -C.

Enforcement note: the push-gate hook (hooks/push-gate.mjs) mechanises this gate by forcing the permission prompt on pushes, PR merges, and remote ref deletion. The hook is the control; this skill is the policy and the preflight.

Frequently asked questions

What does the Confirm Before Push AI skill do?

Always ask explicitly before pushing to a remote or fast-forwarding a protected branch. Per-action authorisation, not standing approval. Triggers on any git push, merge, or branch fast-forward operation, regardless of whether previous pushes in the same session were approved.

Why use Confirm Before Push on TypingMind?

Because you install it once and use it with any model. Confirm Before Push is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Confirm Before Push in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/randommonicle/claude-skills/tree/main/confirm-before-push. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Confirm Before Push?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Confirm Before Push?

As many as you like. As long as a model supports skills, you can use Confirm Before Push with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Confirm Before Push AI skill free?

Yes. It is published on GitHub by randommonicle under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇