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.
npx skills add latestaiagents/agent-skills --skill git-safetygit clone --depth 1 https://github.com/latestaiagents/agent-skillsWrote 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.
[](https://agentmods.dev/skills/latestaiagents/agent-skills/git-safety)<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/git-safety"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/git-safety.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.02827 |
| Opus 5 | $0.00034 | $0.01413 |
| Sonnet 5 | $0.00013 | $0.00565 |
| Haiku 4.5 | $0.00007 | $0.00283 |
Grade A, and why
git-safety 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 395 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Safety
CRITICAL: Some Git operations can permanently lose work. This skill prevents commit loss.
Danger Levels
| Level | Operations | Requires |
|---|---|---|
| ⛔ CRITICAL | push --force to shared branch, reset --hard with unpushed work |
Full verification + explicit confirmation |
| 🔴 HIGH | rebase on shared branches, clean -fd, checkout . |
Stash check + confirmation |
| 🟠 MEDIUM | reset --soft/mixed, stash drop, branch -D |
Verify branch state + confirm |
| 🟢 LOW | commit, push, pull, fetch, branch |
Standard execution |
Pre-Operation Protocol
Before Force Push
⛔ **CRITICAL: FORCE PUSH REQUESTED**
**Command:** git push --force origin main
**⚠️ THIS REWRITES SHARED HISTORY**
**Current state:**
- Local branch: main
- Local HEAD: abc1234 "Add new feature"
- Remote HEAD: def5678 "Fix bug in login"
**Commits that will be OVERWRITTEN on remote:**
1. def5678 - "Fix bug in login" (by [email protected], 2 hours ago)
2. ghi9012 - "Update documentation" (by [email protected], 3 hours ago)
**These commits will be LOST if not saved elsewhere:**
- 2 commits by other team members
- Anyone who pulled these will have conflicts
**Safety checks:**
- [ ] Is this your personal branch? NO - this is main ⚠️
- [ ] Have you notified the team? Unknown
- [ ] Are the overwritten commits backed up? Unknown
**Safer alternatives:**
1. `git push --force-with-lease` (fails if remote changed)
2. Create a new branch for your changes
3. Merge instead of rebase
4. Coordinate with team first
**I strongly recommend against force pushing to main.**
If you must proceed, type: "yes, force push to main and overwrite 2 commits"
Before Reset --hard
⛔ **CRITICAL: HARD RESET REQUESTED**
**Command:** git reset --hard HEAD~3
**⚠️ THIS DISCARDS CHANGES PERMANENTLY**
**What will be LOST:**
**Commits to be removed (3):**
1. abc1234 - "Work in progress on feature X"
2. def5678 - "Add unit tests"
3. ghi9012 - "Fix styling issues"
**Uncommitted changes that will be LOST:**
- Modified: src/App.tsx (45 lines changed)
- Modified: src/utils/helper.ts (12 lines changed)
- Untracked: src/components/NewFeature.tsx (new file, 156 lines)
**Recovery options after reset:**
- Commits: Can recover via `git reflog` (within 90 days)
- Staged changes: Can recover via `git fsck --lost-found`
- Untracked files: PERMANENTLY LOST ⚠️
**Before reset, I will:**
1. Stash uncommitted changes: `git stash push -m "backup before reset"`
2. Create backup branch: `git branch backup-before-reset`
3. Note reflog position: HEAD is currently at abc1234
Proceed with backup and reset? Type "yes, reset after backup" to confirm.
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.
- 3d ago First seen · 395 lines · 67 tokens per session scan A bf3d19911c10
git-safety is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 67 tokens to every session and 2,827 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
agentic-jujutsu
Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination.
github-automation
GitHub workflow automation, PR management, issue tracking, and code review coordination. Integrates with GitHub Actions and repository management. Use when: PR creation, code review, issue management, release automation, workflow setup. Skip when: local-only changes, non-GitHub repositories.
git-integration
Git commit patterns, formats, and conventions for GSD methodology. Provides atomic commits per task, structured commit messages, planning file commits, branch management, and milestone tag operations.
audit-trail
Full traceability from PRD to code commit through the CCPM spec-driven pipeline.
moai-ref-git-workflow
Git workflow patterns, branch strategies, conventional commits, and PR templates reference for git operations. Agent-extending skill that amplifies manager-git expertise with production-grade git workflow patterns. NOT for: code implementation, testing, architecture design, documentation content.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.