github-safety

Prohibit destructive Git commands and require confirmation for risky operations.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/jorgeochipinti97/dublin-skills --skill github-safety
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-safety
Source: https://github.com/jorgeochipinti97/dublin-skills/tree/main/skills/github/github-safety
Command: npx skills add https://github.com/jorgeochipinti97/dublin-skills --skill github-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe and predictable Git/GitHub operations by prohibiting destructive commands and enforcing best practices across branches, commits, and PRs.

Core Features & Use Cases

  • Prohibits destructive commands like git push --force, git rebase on published history, and git reset --hard.
  • Encourages safe workflows: revert instead of reset, use merge strategies that preserve history, and review before destructive actions.
  • Use Case: A team avoids accidental history rewrites during collaborative branches by enabling this policy in CI or local tooling.

Quick Start

Enable the github-safety policy in your repository to automatically guard against destructive Git operations.

Frequently Asked Questions about github-safety

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

FAQPage Schema
How do I prevent destructive Git operations like force push and hard reset in shared branches?▼

To prevent destructive Git operations, you can enforce policies that prohibit commands like git push --force and git reset --hard. This safeguards shared histories by requiring explicit confirmation before executing destructive actions during commit, push, branch, merge, and rebase workflows.

What is the safest way to rewrite published Git history without losing team commits?▼

The safest way to rewrite published Git history is to avoid rebasing published branches and use revert instead of reset. This preserves shared commit histories and prevents accidental data loss during collaborative GitHub workflows.

Does this Git safety policy work with pull request workflows on GitHub?▼

Yes, this Git safety policy applies to pull request workflows on GitHub. It guards shared histories by imposing explicit prohibitions on destructive commands and providing post-operation status reporting for safe Git activities.

Can I enable guardrails to require confirmation before running git rebase on collaborative branches?▼

Yes, you can enable guardrails to require confirmation before running git rebase on collaborative branches. This ensures safe and predictable Git operations by reviewing and intercepting destructive actions before they alter shared histories.

Why should I use git revert instead of git reset --hard to undo changes?▼

You should use git revert instead of git reset --hard because reset destructively rewrites shared history, while revert safely creates a new commit that undoes previous changes. This preserves commit integrity across collaborative branches and pull requests.