git-operations

A collection of standard commands and patterns for working with Git, a system that tracks code changes. It covers branches, commits, history, and related repository tasks.

In plain words
What is it for?
Creating, listing, syncing, merging, rebasing, stashing, and deleting branches, as well as staging and committing changes.
Why use it?
It provides a consistent reference for common Git operations and helps avoid mistakes when changing or synchronising code.

Skill for Claude CodeCodex

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/arnabdeypolimi/claude_code_setup/git-operations
Any agent
npx skills add arnabdeypolimi/claude_code_setup --skill git-operations
Clone the repo
git clone --depth 1 https://github.com/arnabdeypolimi/claude_code_setup

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,055 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.00052 $0.01055
Opus 5 $0.00026 $0.00528
Sonnet 5 $0.00010 $0.00211
Haiku 4.5 $0.00005 $0.00105

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

Security

Grade A, and why

git-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 2d 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.

.claude/skills/git-operations/SKILL.md · 224 lines

How it starts

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

Git Operations

Reusable patterns for common git operations in this repository.

Branch Operations

Create Feature Branch

git checkout main
git pull origin main
git checkout -b feature/<name>

Create Task Branch (Cascade)

git checkout <parent-branch>
git checkout -b task-N-<description>

Delete Branch

git branch -d <branch-name>          # Safe delete
git branch -D <branch-name>          # Force delete
git push origin --delete <branch-name>  # Delete remote

List Branches

git branch                           # Local branches
git branch -r                        # Remote branches
git branch -a                        # All branches

Commit Operations

Standard Commit

git add <files>
git commit -m "<type>(<scope>): <description>"

Commit Types

  • feat - New feature
  • fix - Bug fix
  • docs - Documentation
  • style - Formatting
  • refactor - Code restructuring
  • test - Tests
  • chore - Maintenance

Amend Last Commit

git commit --amend -m "new message"  # Change message only
git add <files> && git commit --amend --no-edit  # Add files to last commit

View Commit History

git log --oneline -10                # Recent commits
git log --oneline --graph -20        # With graph
git log --oneline -- <file>          # For specific file

Staging Operations

Stage Files

git add file1.py file2.py            # Specific files
git add "*.py"                       # By pattern
git add .                            # All changes

Unstage Files

git restore --staged <file>

View Changes

git diff                             # Unstaged changes
git diff --staged                    # Staged changes

Sync Operations

Fetch Updates

git fetch origin

Pull Changes

git pull origin <branch>

Push Changes

git push origin <branch>             # Normal push
git push -u origin <branch>          # Set upstream
git push --force-with-lease origin <branch>  # Force push (use carefully!)

Read the full file on GitHub · 224 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. 2d ago First seen · 224 lines · 52 tokens per session scan A b6dbd18a321d

Subscribe to this mod's changes

git-operations is a skill published in the GitHub repository arnabdeypolimi/claude_code_setup (4 stars, last pushed 3mo ago), licensed MIT. It adds 52 tokens to every session and 1,055 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-08-31.

Related

Other skills, from other repositories

om-auto-continue-pr-loop

Advanced om-auto-continue-pr for PRs started by om-auto-create-pr-loop — claims the PR, resumes from the first non-done PLAN.md Tasks row in an isolated worktree, keeps the per-step commit and checkpoint discipline (integration tests + screenshots for UI), runs the full gate at completion, keeps spec-only design PRs…

open-mercato/skills · 110 tokens

om-open-pr

Shared PR opener for the auto pipeline — commits the worktree, pushes, reuses an existing PR or opens a ready (non-draft) PR against the configured base branch with the unified body template, applies the full SDLC label set with rationale comments, and for issue-driven runs hands the issue back and releases the lock.…

open-mercato/skills · 83 tokens

om-auto-create-pr-loop

Advanced om-auto-create-pr for long, multi-step spec implementations needing resumability and strict step tracking — run folder (PLAN/HANDOFF/NOTIFY), one lean commit per Step, checkpoint verification every 5 Steps with integration tests and UI screenshots, full gate at completion, ready labeled PR. Resumable via…

open-mercato/skills · 86 tokens

om-check-and-commit

Verify that the current branch is ready to publish by running every configured validation command in order, fix straightforward failures (including locale-file drift when the repo checks it), and once everything passes commit and push the current branch. Use when the user asks to check the branch, make CI-style…

open-mercato/skills · 70 tokens

git-workflow

Automate the complete Git development workflow — create feature branches with conventional naming, atomic commits with conventional commit messages, interactive rebase, squash merges, PR body generation from commit history, branch cleanup, and git worktree patterns. Use when user asks to create a branch, commit…

EliasOulkadi/shokunin · 107 tokens

conventional-commits

Use when uncommitted changes need to be split into atomic, conventional commits ordered for review. Triggers on "commit this", "make commits", "clean up commits", "commit the changes". In Hedgehog, each Loop step is already meant to be its own commit — this skill matters most when a Correction Protocol fast-forward…

skyf0xx/hedgehog · 88 tokens