gitrules

Enforce safety checks and confirmations before destructive git operations.

9|3|Updated Nov 28, 2025
One-click install
npx skills add https://github.com/get-convex/components-submissions-directory --skill gitrules-get-convex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitrules
Source: https://github.com/get-convex/components-submissions-directory/tree/main/.claude/skills/gitrules
Command: npx skills add https://github.com/get-convex/components-submissions-directory --skill gitrules-get-convex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a safety-forward protocol to prevent destructive git operations and accidental data loss by enforcing a structured review before risky commands.

Core Features & Use Cases

  • Mandatory safety checks: before destructive commands, inspect the repository state and planned changes using commands like git status and git diff.
  • Guided decision points: clear rules such as never run git checkout -- <file> without review, and always manually undo changes when needed.
  • Recovery and guardrails: prompts to stash changes or postpone commits until user confirmation.

Quick Start

Apply the Git safety protocol before any destructive operation to review changes, stash work if needed, and confirm before proceeding.

Frequently Asked Questions about gitrules

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

FAQPage Schema
How do I prevent data loss from destructive git commands like checkout and reset?

Prevent data loss from destructive git commands by enforcing a safety-first workflow that mandates repository state inspections using git status and git diff before execution. This protocol requires explicit user confirmation and provides guardrails to manually undo or stash changes.

What is the best way to review changes before running a risky git reset or revert?

The best way to review changes before risky git reset or revert operations is to implement a structured safety protocol that blocks execution until you inspect the planned changes. This guided approach prompts you to stash work or confirm actions before proceeding.

Does this git safety workflow require any external dependencies or specific components?

This git safety workflow requires no external dependencies or specific components to function. It operates as a standalone protocol that applies across any repository to enforce mandatory checks and guardrails during feature development, debugging, or collaboration.

Can I use git stash to protect uncommitted work during destructive version-control operations?

You can use git stash to protect uncommitted work during destructive version-control operations by following a safety protocol that prompts you to stash changes. This guardrail ensures your work is safely set aside until you explicitly confirm the destructive action.

Why should I avoid running git checkout on a file without reviewing the diff first?

You should avoid running git checkout on a file without reviewing the diff first because it overwrites local changes and causes data loss. The safety protocol enforces mandatory diff reviews and explicit confirmation before allowing such destructive actions to proceed.