git-safety

Verify destructive git operations before reset, rebase, or force-push execution.

6|1|Updated Apr 26, 2025
One-click install
npx skills add https://github.com/edobry/minsky --skill git-safety-edobry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-safety
Source: https://github.com/edobry/minsky/tree/main/.claude/skills/git-safety
Command: npx skills add https://github.com/edobry/minsky --skill git-safety-edobry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safety protocols to prevent destructive git operations from causing data loss or remote history rewrites.

Core Features & Use Cases

  • Pre-command verification for reset, rebase, push --force, and other history-altering actions.
  • Force-push gating and explicit approval workflows.
  • Error recovery guidance and surgical operation protocol to minimize risk.

Quick Start

Describe the destructive operation you plan to perform and have the assistant verify the steps before execution.

Frequently Asked Questions about git-safety

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent data loss when running a git force push or rebase?

To prevent data loss during git force push or rebase, use safety gates that enforce mandatory pre-checks before history rewrites. This verifies destructive operations and provides error recovery guidance to avoid overwriting remote history.

What are the best ways to safeguard a local git repository before a destructive reset?

The best way to safeguard a local git repository before a destructive reset is to apply surgical operation protocols. These protocols require explicit approval workflows and pre-command verification before executing history-altering actions.

Can I add approval workflows for force-push operations in shared repositories?

Yes, you can add approval workflows for force-push operations in shared repositories. Force-push gating requires explicit approval before execution, ensuring collaborative workflows are protected from accidental remote history rewrites.

What should I do if a git recovery operation fails after a bad rebase?

If a git recovery operation fails after a bad rebase, follow error recovery guidance to safely undo the damage. Surgical operation protocols minimize risk by guiding you through verified steps to restore your repository state.