git-safety

Enforce safety checks and user confirmation before destructive git operations.

2|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/yzlin/supaviber --skill git-safety-yzlin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-safety
Source: https://github.com/yzlin/supaviber/tree/main/skills/git-safety
Command: npx skills add https://github.com/yzlin/supaviber --skill git-safety-yzlin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps prevent data loss and destructive changes during collaborative Git workflows by enforcing safety checks, prompting for confirmation, and codifying best practices before commits or file operations.

Core Features & Use Cases

  • Pre-commit safety: Enforces a checklist before committing, including explicit file verification and diff review.
  • Environment protection: Prevents edits or deletions of environment-related files without user approval.
  • Destructive operation control: Requires explicit permission for commands that could alter history or delete data, and promotes safe alternatives.
  • Team collaboration coordination: Encourages communication and coordination before major changes in shared branches.

Quick Start

Review the current git status and staged changes, then prompt for confirmation before executing any destructive command.

Frequently Asked Questions about git-safety

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

FAQPage Schema
How do I prevent accidental data loss during collaborative git workflows?

To prevent data loss during collaborative git workflows, enforce explicit safety checks and prompt for confirmation before executing destructive commands. This preserves environment files and requires user consent for history-altering actions.

How do I require explicit confirmation before running destructive git commands?

To require explicit confirmation before destructive git commands, implement pre-commit safety checklists that verify staged changes and prompt for user approval. This blocks risky operations and promotes safe alternatives to prevent data deletion.

What is the best way to protect environment files from accidental git deletions?

The best way to protect environment files from accidental git deletions is to enforce environment protection rules that prevent edits or deletions without explicit user approval during version-control sessions.

Does this git safety approach work for multi-user branch coordination?

Yes, this git safety approach works for multi-user branch coordination by encouraging team communication before major changes in shared branches, ensuring coordinated and safe collaborative coding operations.

When should I enforce pre-commit safety checks in version control?

You should enforce pre-commit safety checks during collaborative coding sessions involving file deletions or major changes. This ensures explicit file verification and diff review before finalizing risky version-control operations.