Agent skill

Git Safety

by waynesutton in waynesutton/builder-skills

Stops an agent from destroying uncommitted work with git. An agent skill from waynesutton/builder-skills.

Apache-2.0Auto-check passedDevelopment

Install Git Safety

skills CLI
$ npx skills add waynesutton/builder-skills --skill git-safety -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install waynesutton/builder-skills git-safety --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/waynesutton/builder-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/git-safety .claude/skills/git-safety && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-safety
GitHub stars
404
Token cost
~914 tokens
SKILL.md length
522 words
Files
4 (incl. assets)
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Stops an agent from destroying uncommitted work with git. An agent skill from waynesutton/builder-skills.

  • Works in 3 steps: git status. Read it. → If anything is modified or untracked,… → Suggest git stash push -m "" if the user…
  • A task involves reverting
  • SKILL.md covers Before any git command, Commands that need explicit…, Revert and undo mean edit and Diff before discard, plus 3 more sections
  • Calls git

What it does

Git Safety is an agent skill from waynesutton/builder-skills. Stops an agent from destroying uncommitted work with git. Requires git status and git diff before any command that discards changes, treats "revert" and "undo" as manual edits, and never runs reset, checkout, clean, stash drop, or force push without explicit approval. Use when a task involves reverting, undoing, resetting, cleaning, rebasing, or force pushing, or before any git command in a repo with uncommitted changes.

Its SKILL.md is about 910 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including assets (for example `agents/openai.yaml`).

It sits in Development, covering Git workflow. It works with Git. The repository describes itself as: Builder skills for Convex apps. Convex patterns plus a PRD, task.md, changelog, and files.md workflow for Claude Code, Codex, Cursor, and OpenCode. The licence is Apache-2.0.

When your agent uses it

  • A task involves reverting
  • Before any git command in a repo with uncommitted changes

Example prompts

  • “revert”
  • “Use the git-safety skill to stop an agent from destroying uncommitted work with git. An agent skill from waynesutton/builder-skills”
  • “/git-safety”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. git status. Read it.
  2. If anything is modified or untracked, stop. Say what is there. Ask before proceeding with anything that could touch those files.
  3. Suggest git stash push -m "" if the user needs a clean tree and wants the work kept.

What it can do on your machine

Read from SKILL.md and the folder at commit 82d1ce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Safety loads about 914 tokens when it runs. Until then it costs about 109 tokens; SKILL.md has 522 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~914

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from waynesutton/builder-skills at commit 82d1ce2, republished under its Apache-2.0 licence (© waynesutton). 522 words, ~914 tokens.

Download SKILL.mdSave it as .claude/skills/git-safety/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
git-safety
description
Stops an agent from destroying uncommitted work with git. Requires git status and git diff before any command that discards changes, treats "revert" and "undo" as manual edits, and never runs reset, checkout, clean, stash drop, or force push without explicit approval. Use when a task involves reverting, undoing, resetting, cleaning, rebasing, or force pushing, or before any git command in a repo with uncommitted changes.

Git safety

These rules exist because one git checkout -- . erased two days of work. Follow them every time, not only when it feels risky.

Before any git command

  1. git status. Read it.
  2. If anything is modified or untracked, stop. Say what is there. Ask before proceeding with anything that could touch those files.
  3. Suggest git stash push -m "<why>" if the user needs a clean tree and wants the work kept.

Commands that need explicit approval

Never run these on your own. Show the exact command, say what it will destroy, and wait for a yes.

CommandWhat it destroys
git reset --hardevery uncommitted change
git checkout -- <file> or git restore <file>uncommitted changes in that file
git checkout -- . or git restore .uncommitted changes in every file
git clean -fdevery untracked file and folder
git stash drop or git stash clearstashed work
git push --force or --force-with-leaseremote history other people may have
git branch -Da branch and any commits only it holds
git rebase on a shared branchcommit ids other people have

"Explicit approval" means the user saw the command and said yes to it. A general "go ahead" from earlier in the conversation does not count.

Revert and undo mean edit

When the user says "revert that", "undo that", or "go back":

  1. Ask which change. Committed or uncommitted? All of it or one part?
  2. git diff <file> to see exactly what would be lost.
  3. Read the current file.
  4. Edit the file by hand to remove the specific lines that are wrong. Keep everything else.
  5. Show the result.

Do not reach for git checkout or git restore. They remove everything in the file, including the parts the user liked.

For committed changes, git revert <sha> is safe because it creates a new commit. Still show the sha and the commit message first.

Show full SKILL.md (206 more words)Show less

Diff before discard

Any time a change is about to be thrown away, the user sees git diff output for it first. No exceptions. If the diff is long, show git diff --stat and offer the full diff.

Commits, pushes, deploys

Do not commit, push, tag, publish, or deploy unless the user asks in the current message. When the work is done, print a suggested commit message and stop.

Suggested commit:
fix: dedupe heartbeat writes within 10s window

Safe defaults

These are fine to run without asking:

  • git status, git log, git diff, git show, git blame
  • git stash push -m "<message>" when the user asked for a clean tree
  • git add <specific files> when the user asked to commit
  • git checkout -b <new-branch> from a clean tree
  • git revert <sha> after showing the commit

Checklist

Before a git command:

  • git status ran and I read it
  • no uncommitted work is in the blast radius, or the user approved
  • I showed git diff for anything being discarded
  • the command is not in the approval table, or the user said yes to this exact command

When asked to revert or undo:

  • I know which change and whether it is committed
  • I am editing the file, not checking it out
  • everything the user did not mention stays

© waynesutton, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (assets) in skills/git-safety of waynesutton/builder-skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/large-logo.png
  • assets/small-logo.svg

Open the folder on GitHubat commit 82d1ce2

Compare with similar skills

Git Safety next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Safety compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Safety this skillwaynesutton/builder-skills404—~914Automated safety check: PassApache-2.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost55k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    55k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed

More from waynesutton/builder-skills

All 17 skills in this repo
  • Convex Agents

    waynesutton/builder-skills

    Builds AI agents on the Convex agent component: threads, messages, tools that call queries and mutations, streaming, RAG with vector search, and workflows for multi step jobs.

    404 GitHub stars~2.2k tokensUpdated 10 days ago
    Auto-check passed
  • Convex Best Practices

    waynesutton/builder-skills

    Production patterns for Convex apps and the rules the @convex-dev/eslint-plugin enforces: validators, indexes, idempotent mutations, avoiding OCC conflicts, thin function wrappers, error handling.

    404 GitHub stars~2.6k tokensUpdated 10 days ago
    Auto-check passed
  • Convex Component Authoring

    waynesutton/builder-skills

    Creates reusable Convex components with defineComponent, a clean client wrapper, their own schema, and an npm publish setup.

    404 GitHub stars~2.6k tokensUpdated 10 days ago
    Auto-check passed
  • Convex Cron Jobs

    waynesutton/builder-skills

    Schedules work in Convex: cron jobs in convex/crons.ts, one off scheduled functions with runAfter and runAt, batching large jobs, and cancelling or inspecting the queue.

    404 GitHub stars~2k tokensUpdated 10 days ago
    Auto-check passed
  • Convex HTTP Actions

    waynesutton/builder-skills

    Adds HTTP endpoints in convex/http.ts: webhook receivers with signature checks, REST style routes, CORS, auth headers, streaming responses, and file uploads over HTTP.

    404 GitHub stars~2.6k tokensUpdated 10 days ago
    Auto-check passed
  • Convex Migrations

    waynesutton/builder-skills

    Changes a live Convex schema without downtime: make a field optional, backfill in batches, flip the validator, then clean up.

    404 GitHub stars~2.1k tokensUpdated 10 days ago
    Auto-check passed

Works with

Categories

Questions about Git Safety

What does Git Safety do?

Stops an agent from destroying uncommitted work with git. An agent skill from waynesutton/builder-skills. Git Safety is an agent skill from waynesutton/builder-skills. Stops an agent from destroying uncommitted work with git.

When should I use Git Safety?

Git Safety fits situations like: A task involves reverting; before any git command in a repo with uncommitted changes.

How do I install Git Safety in Claude Code?

Run `npx skills add waynesutton/builder-skills --skill git-safety -a claude-code`. Or copy the skill folder (skills/git-safety in waynesutton/builder-skills) into .claude/skills/git-safety in your project. Claude Code loads it when a task matches its description.

How do I install Git Safety in Codex?

Run `npx skills add waynesutton/builder-skills --skill git-safety -a codex`. Or copy the skill folder (skills/git-safety in waynesutton/builder-skills) into .agents/skills/git-safety in your project. Codex loads it when a task matches its description.

Can I use Git Safety in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add waynesutton/builder-skills --skill git-safety -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-safety, .gemini/skills/git-safety, .github/skills/git-safety and .opencode/skills/git-safety in your project.

What does Git Safety need to run?

Going by SKILL.md and its folder, Git Safety needs the command-line tools its instructions call (git).

Does Git Safety access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Safety safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Git Safety use?

Git Safety is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Safety use?

About 914 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Safety?

Skills that share tags, products or a category with Git Safety: Finishing a Development Branch (obra/superpowers, 296k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Safety?

waynesutton (a GitHub user) maintains it in waynesutton/builder-skills, which has 404 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on September 28, 2026.

Source: waynesutton/builder-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.