Skip to content
Back to skills

Safe Git Changes

ASecurity

Use before staging, committing, or updating a Git repository when other local changes may be present.

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
ai-agentsgit

Security analysis

A100/100

Scanned September 29, 2026

npx -y skills add leavemagic-cyber/epitype --skill safe-git-changes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Safe Git Changes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Safe Git Changes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leavemagic-cyber-safe-git-changes/badge)](https://www.skillsdirectory.com/skills/leavemagic-cyber-safe-git-changes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: safe-git-changes
description: Use before staging, committing, or updating a Git repository when other local changes may be present.
---

# Safe Git changes

1. Run `git status --short` in the intended repository and identify the paths that belong to this task.
2. Inspect the diff for those paths before staging. Preserve changes whose owner or purpose is unknown.
3. Stage the explicit paths you changed, for example `git add path/to/file.py path/to/test.py`. Check the staged diff, then commit only those paths.
4. Recheck status after committing and report the commit ID and any remaining local changes.
5. Ask before destructive Git operations or deleting another person's work. Do not use a whole-tree stage such as `git add -A` as a shortcut in a dirty checkout.

Example: If `git status --short` lists your `src/parser.py` and an unrelated `notes.txt`, stage `src/parser.py` by name and leave `notes.txt` visible in status.

The instructions here do not install hooks or run automatically. Apply them when the user has asked for Git work and the tool surface can run Git commands.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…