ac-git-git-safe

ac-git-git-safe is a skill for Claude Code, Codex from WaterplanAI/agentic-config. It costs 75 tokens per session (1,445 once invoked), scanned A, original, MIT.

A safety guide for rewriting Git history, meaning changing commits that already exist. It covers operations such as amending, squashing, rewording, moving tags, deleting branches, and force-pushing rewritten history.

In plain words
What is it for?
Use it to inspect branches, commits, and tags, plan history changes, preserve tag messages, create backups, and carry out approved rewrites.
Why use it?
It reduces the risk of losing work or confusing collaborators during destructive Git changes. It requires a dry-run plan, confirmation, and a backup branch before execution.

Skill for Claude CodeCodex

Part of the agentic-config plugin — 49 skills, 2 agents, 1 plugin shipped together

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.

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

Made for: Claude Code, Codex.

Or install agentic-config, the plugin that ships this one along with the rest of its 49 skills, 2 agents, 1 plugin.

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 ac-git-git-safe

README.md
[![agentmods](https://agentmods.dev/badge/skills/waterplanai/agentic-config/ac-git-git-safe.svg)](https://agentmods.dev/skills/waterplanai/agentic-config/ac-git-git-safe)
Your own site
<a href="https://agentmods.dev/skills/waterplanai/agentic-config/ac-git-git-safe"><img src="https://agentmods.dev/badge/skills/waterplanai/agentic-config/ac-git-git-safe.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,445 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00075 $0.01445
Opus 5 $0.00037 $0.00723
Sonnet 5 $0.00015 $0.00289
Haiku 4.5 $0.00007 $0.00145

Measured 4d ago against content hash 373d2400bea6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ac-git-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 4d 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.

packages/pi-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. 4d ago First seen · 240 lines · 75 tokens per session scan A 373d2400bea6

Subscribe to this mod's changes

ac-git-git-safe is a skill published in the GitHub repository WaterplanAI/agentic-config (30 stars, last pushed 1mo ago), licensed MIT. It adds 75 tokens to every session and 1,445 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

audit-library-health

Use when checking the overall health of a skills library. Run doctor, validate, check for stale skills, and verify generated docs are in sync.

MoizIbnYousaf/Ai-Agent-Skills · 33 tokens

install-from-remote-library

Use when installing skills from a shared ai-agent-skills library repo. Inspect with --list first, prefer --collection, and preview with --dry-run before installing.

MoizIbnYousaf/Ai-Agent-Skills · 44 tokens

share-a-library

Use when a managed library is ready to publish to GitHub and hand to teammates as an install command. Run the GitHub publishing steps, then return the exact shareable install command.

MoizIbnYousaf/Ai-Agent-Skills · 41 tokens

update-installed-skills

Use when syncing or updating previously installed skills to their latest version. Always dry-run updates before applying, and check for breaking changes.

MoizIbnYousaf/Ai-Agent-Skills · 31 tokens

editorial-illustrations

Generate meaning-carrying editorial data-illustrations in the monotykamary / Linear aesthetic (near-black grayscale, Inter display + mono labels, hairline framed figures) with a single coral accent. This is a GENERATIVE GUIDE, not a template gallery: it teaches the "claim -> geometry" method so any session can invent…

huytieu/COG-second-brain · 178 tokens

daily-journal

A passive daily work journal that Claude keeps FOR you so you never have to write it yourself. Append short entries after meaningful work (what was done, what you focused on, artifacts touched) to 01-daily/journal/YYYY-MM-DD.md. Run a guided reflection at night or in the morning. Use when you run /daily-journal, say…

huytieu/COG-second-brain · 107 tokens