Individual skill
git-safety-net
Audits, preserves and recovers local Git state before cleanup: unpushed or wrong-branch commits, dirty worktrees, duplicate clones, stashes, dangling commits, squash-merge uncertainty. Use when the user fears lost work, wants to recover a commit, asks if a branch is actually merged, asks whether a branch, worktree or clone is safe to delete, or wants one clean main (误删分支 / 还有没有丢的东西). Not for GitHub PR operations.
git-safety-net/SKILL.md
Source commit 7c4d326ddd94d504e00e241ba49498e95160afbe
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 4, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,519
- Repository last updated
- Nov 7, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- operations Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesSKILL.mdcore · 71,461 bytesagents/openai.yamlasset · 259 bytesevals/evals.jsonasset · 15,170 bytesreferences/merge_verification.mddoc · 75,167 bytesreferences/prevention_practices.mddoc · 50,699 bytesreferences/recovery_playbook.mddoc · 20,857 bytesscripts/git_align_checkout.shruns · 12,910 bytesscripts/git_classify_refs.shruns · 19,016 bytesscripts/git_export_before_drop.shruns · 7,249 bytesscripts/git_find_all_checkouts.shruns · 14,889 bytesscripts/git_hosted_vs_cached.shruns · 6,756 bytesscripts/git_loss_audit.shruns · 15,948 bytesscripts/git_prepare_clone_retirement.shruns · 21,863 bytesscripts/git_preserve_danglers.shruns · 5,393 bytesscripts/git_verify_branch_merged.shruns · 16,501 bytestests/test_git_align_checkout.pyruns · 11,681 bytestests/test_git_classify_refs.pyruns · 31,826 bytestests/test_git_export_before_drop.pyruns · 4,391 bytestests/test_git_find_all_checkouts.pyruns · 10,944 bytestests/test_git_hosted_vs_cached.pyruns · 7,120 bytestests/test_git_loss_audit.pyruns · 18,641 bytestests/test_git_prepare_clone_retirement.pyruns · 24,700 bytestests/test_git_preserve_danglers.pyruns · 7,123 bytestests/test_git_verify_branch_merged.pyruns · 16,169 bytestests/test_git_verify_branch_merged_options.pyruns · 15,158 bytes
Read excerpt
# Git Safety Net
Prevent losing work in a tangle of branches/stashes/rebases, and recover it forensically
when something already went sideways. The commands here are all **non-destructive or additive**
until a step is explicitly labeled destructive — recovery must never make the loss worse.
## Outcome contract — keep the safety net subordinate to the user's job
Before Mode B/E or any command that writes a ref or backup, state the following in the conversation
(do not create another file):
- **Outcome:** the user-visible end state, in the user's words.
- **Current phase:** what is authorized now. "Later" work is not authorized in this phase.
- **Authorized targets:** named objects this phase may inspect, plus the subset it may change.