git-safe

git-safe is a skill for Claude Code from WaterplanAI/agentic-config. It costs 71 tokens per session (1,441 once invoked), scanned A, a copy of ac-git-git-safe, MIT.

A safety-focused tool for rewriting Git history, including changing, combining, or renaming commits and updating tags. A tag is a named marker for a particular commit.

In plain words
What is it for?
Use it to amend or squash commits, reword messages, update tags, delete branches, or force-push rewritten history.
Why use it?
It reduces the risk of destructive history changes by requiring a dry-run plan, a backup branch, and confirmation before execution.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ac-git plugin — 7 skills shipped together

Good fit Use it to amend or squash commits, reword messages, update tags, delete branches, or force-push rewritten history.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/waterplanai/agentic-config/git-safe
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add WaterplanAI/agentic-config --skill git-safe
Clone the repo
git clone --depth 1 https://github.com/WaterplanAI/agentic-config

Made for: Claude Code.

Or install ac-git, the plugin that ships this one along with the rest of its 7 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-safe

README.md
[![agentmods](https://agentmods.dev/badge/skills/waterplanai/agentic-config/git-safe/github.svg)](https://agentmods.dev/skills/waterplanai/agentic-config/git-safe)
Your own site
<a href="https://agentmods.dev/skills/waterplanai/agentic-config/git-safe"><img src="https://agentmods.dev/badge/skills/waterplanai/agentic-config/git-safe/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for git-safe

Your own site · 80×15
<a href="https://agentmods.dev/skills/waterplanai/agentic-config/git-safe"><img src="https://agentmods.dev/badge/skills/waterplanai/agentic-config/git-safe.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,441 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01441
Opus 5.5 $0.00028 $0.00576
Sonnet 5.5 $0.00014 $0.00288
Haiku 4.5 $0.00007 $0.00144

Measured 19d ago against content hash b5a52a0a2327, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-safe scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to ac-git-git-safe — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/ac-git/skills/ac-git/git-safe/SKILL.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Safe

Safely rewrite git history with mandatory dry-run planning and user confirmation.

Critical Rules

  1. ALWAYS DRY RUN FIRST - Propose plan, never execute without approval
  2. ALWAYS WAIT FOR CONFIRMATION - User must explicitly approve before destructive operations
  3. ALWAYS CREATE BACKUP - Backup branch before any rebase/amend
  4. ALWAYS SAVE TAG MESSAGES - Preserve tag annotations before deletion

Supported Operations

Operation Use Case
Amend Content Change files in historical commits
Squash Commits Combine multiple commits into one
Reword Message Change commit message text
Update Tags Move tags to new commits after rebase
Delete Branches Remove local and remote branches
Force Push Push rewritten history to remote

Workflow

Phase 1: ANALYZE

Gather current state before proposing changes.

# Current branch and HEAD
git rev-parse --abbrev-ref HEAD
git rev-parse --short HEAD

# Commit history
git log --oneline --decorate main

# All tags
git tag -l

# All branches
git branch -a -v

Phase 2: PLAN (DRY RUN)

OUTPUT FORMAT:

## DRY RUN - PROPOSED PLAN

### Current State
- Branch: {branch}
- HEAD: {sha}
- Commits: {count}
- Tags: {list}

### Operations
1. {operation description}
2. {operation description}
...

### Commands to Execute
{numbered list of exact commands}

### Risk Assessment
| Risk | Impact | Mitigation |
|------|--------|------------|

### Affected
- Commits: {list}
- Tags: {list}
- Remote: {yes/no force push required}

**Awaiting approval to proceed.**

Phase 3: CONFIRM

STOP AND WAIT for user to respond with approval (e.g., "OK", "proceed", "yes").

Phase 4: BACKUP

# Create backup branch
git branch backup/pre-rewrite-$(date +%Y%m%d-%H%M%S) HEAD

# Save tag messages to temp files
git tag -l --format='%(contents)' {tag} > /tmp/{tag}-message.txt

Phase 5: EXECUTE

Pattern A: Amend Content in Historical Commit

Read the full file on GitHub · 240 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago First seen · 240 lines · 71 tokens per session scan A b5a52a0a2327

Subscribe to this mod's changes

git-safe is a skill published in the GitHub repository WaterplanAI/agentic-config (31 stars, last pushed 20d ago), licensed MIT. It adds 71 tokens to every session and 1,441 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 92% identical to ac-git-git-safe, differing in 2 lines, and is treated as a copy.

Related

git-safe compared with skills from other repositories

git-safe next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-safeWaterplanAI/agentic-configSkill3120d agoMITA71Claude Code
git-flow-prsoulcodex/agenticSkill1011d agoMITA103Claude Code, Codex
llm-gaterohitg00/pro-workflowSkill3.0k2mo agononeA38Claude Code
smart-commitrohitg00/pro-workflowSkill3.0k2mo agononeA45Claude Code
autofix-prQwenLM/qwen-codeSkill31ktodayApache-2.0A142Claude Code
git-advanced-workflowswshobson/agentsSkill43kyesterdayMITA54Claude Code
work-unit-commitsGentleman-Programming/gentle-aiSkill9.7kyesterdayMITA31Claude Code, Codex