Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/justanesta/claude-code-resourcesnpx agentmods add skills/justanesta/claude-code-resources/git-advanced-operationsWrote 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/justanesta/claude-code-resources/git-advanced-operations)<a href="https://agentmods.dev/skills/justanesta/claude-code-resources/git-advanced-operations"><img src="https://agentmods.dev/badge/skills/justanesta/claude-code-resources/git-advanced-operations/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.
<a href="https://agentmods.dev/skills/justanesta/claude-code-resources/git-advanced-operations"><img src="https://agentmods.dev/badge/skills/justanesta/claude-code-resources/git-advanced-operations.svg" alt="Reviewed on agentmods" width="80" 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.00070 | $0.01837 |
| Opus 5.5 | $0.00028 | $0.00735 |
| Sonnet 5.5 | $0.00014 | $0.00367 |
| Haiku 4.5 | $0.00007 | $0.00184 |
Grade A, and why
git-advanced-operations 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 2mo 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 — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Advanced Operations
Power-user Git workflows for rewriting history, recovery, automation, and large repo management.
Core Principles
- Understand the object model - Commits are immutable snapshots; branches are movable pointers; HEAD tracks your current position
- Reflog is your safety net - Every HEAD movement is recorded for 90 days; almost nothing in Git is truly lost
- Non-destructive by default - Prefer operations that create new commits over those that destroy history
- Never rewrite shared history - Only rebase or amend commits that have not been pushed to a shared branch
- Automate repetitive checks - Use hooks to enforce standards before code leaves your machine
Interactive Rebase
Rewrite, reorder, squash, and clean up commit history before sharing
# Rebase last 5 commits interactively
git rebase -i HEAD~5
# In the editor, change pick to the desired action:
# pick abc1234 Add user model
# squash abc1235 Fix typo in user model
# reword abc1236 Add auth middleware
# edit abc1237 Add login endpoint
# drop abc1238 WIP debugging
# Autosquash: auto-arrange fixup/squash commits
git commit --fixup=abc1234
git rebase -i --autosquash HEAD~5
# Rebase onto a different base branch
git rebase --onto main feature-base feature-branch
See interactive-rebase.md for:
- Squash vs fixup vs reword workflows
- Edit mode for splitting commits
- Autosquash with
--fixupand--squashcommits - Rebase onto for transplanting branches
- Handling rebase conflicts
Reflog and Recovery
Recover lost commits and undo destructive operations
# View recent HEAD movements
git reflog --date=relative
# Recover a commit after accidental reset
git reflog
# abc1234 HEAD@{2}: commit: important work
git checkout -b recovery-branch abc1234
# Undo a rebase by resetting to pre-rebase state
git reflog
# abc1234 HEAD@{5}: rebase (start): checkout main
git reset --hard HEAD@{5}
# Recover a deleted branch
git reflog | grep "checkout: moving from deleted-branch"
git checkout -b restored-branch abc1234
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago First seen · 241 lines · 70 tokens per session scan A aa3918658319
git-advanced-operations is a skill published in the GitHub repository justanesta/claude-code-resources (2 stars, last pushed 6mo ago), licensed MIT. It adds 70 tokens to every session and 1,837 once invoked, about $0.0003 per session on Opus 5.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-31.
Other skills, from other repositories
create-pr
Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for Prisma 8. Use when the user wants to create a pull request, open a PR, or submit changes for review.
git-commit
Generate well-formatted git commit messages following conventional commit standards.
repo-sync
Manage automatic Git syncing on macOS with repo-sync. Use only when the user explicitly invokes /repo-sync.
engineer-bot-ops
A workflow for carrying an engineering task from scope through implementation and reviewable delivery. It works with a repository's branch, existing changes, rules, checks, and permissions while separating completed, unverified, and next-step work.
mcore-split-pr
Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.
git-commit-writer
Trigger when the user asks to write a commit message, generate a commit from staged changes, review a diff before committing, or says "/commit". Reads git diff --staged and produces an opinionated, convention-matching commit message.