git-safety

Scan staged Git changes for secrets and large files before committing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mountaintop1/myclaude --skill git-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-safety
Source: https://github.com/mountaintop1/myclaude/tree/main/.claude/skills/git-safety
Command: npx skills add https://github.com/mountaintop1/myclaude --skill git-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Accidentally committing sensitive data, large files, or pushing to the wrong branch can lead to severe security vulnerabilities, repository bloat, and broken deployments. This skill acts as your vigilant guardian, automatically performing comprehensive safety checks before critical Git operations to prevent these common and costly mistakes.

Core Features & Use Cases

  • Secrets Detection: Scans staged changes for API keys, passwords, tokens, and other sensitive credentials, stopping commits before exposure.
  • Large File Prevention: Warns or blocks commits of excessively large files, suggesting Git LFS to maintain a lean repository.
  • Protected Branch Safeguards: Alerts and requires explicit confirmation before pushing to critical branches like main or production, preventing accidental history rewrites.
  • Use Case: Before you commit, this skill automatically scans your changes. If it detects a .env file or a hardcoded API key, it will immediately stop the commit and warn you, providing actionable advice to prevent a security incident.

Quick Start

Check my current git changes for any secrets or large files.