Skills for Real Engineers. Straight from my .agents directory.
git-safety-net
Agent skill fromdaymade/claude-code-skills
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.
How to install git-safety-net
npx skills add daymade/claude-code-skills# or add only this skill to Claude Code: copy the folder
git-safety-net/
# into
~/.claude/skills/git-safety-net/ (all projects)
.claude/skills/git-safety-net/ (one project)
1# Git Safety Net23Prevent losing work in a tangle of branches/stashes/rebases, and recover it forensically4when something already went sideways. The commands here are all **non-destructive or additive**5until a step is explicitly labeled destructive — recovery must never make the loss worse.67## Outcome contract — keep the safety net subordinate to the user's job89Before Mode B/E or any command that writes a ref or backup, state the following in the conversation10(do not create another file):1112- **Outcome:** the user-visible end state, in the user's words.13- **Current phase:** what is authorized now. "Later" work is not authorized in this phase.14- **Authorized targets:** named objects this phase may inspect, plus the subset it may change.15- **Stop condition:** observable facts that end the task.1617Then enforce these boundaries:1819- **Evidence scope is not action scope.** A read-only audit may discover another clone, ref,20 repository, or dangling object. That discovery may widen the report; it does not authorize21 preserving, uploading, merging, deleting, or otherwise changing the newly found object.22- **Authorization is object-specific, not repository-wide by implication.** "Take over",23 "continue", or "finish the cleanup" applies only to the checkout/ref/PR the user identified.24 A collaborator-owned worktree, branch, or PR discovered later stays report-only until the user25 names it as a change target. If the user says to leave it alone, record that exclusion and do26…
Excerpt shown under the repository's MIT license.
More skills in claude-code-skills
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
