git-workflow

git-workflow is a skill for Claude Code, Codex from juan294/cc-rpi. It costs 22 tokens per session (841 once invoked), scanned A, original, MIT.

A collection of Git recipes for branches, worktrees, pushing changes, checking remote history, and resolving conflicts.

In plain words
What is it for?
Use it when committing and pushing code, creating a first pull request, working in multiple worktrees, handling empty repositories, pushing tags, or resolving branch conflicts.
Why use it?
It prevents common version-control errors, such as pushing without an upstream branch or pulling with uncommitted changes.

Skill for Claude CodeCodex

Part of the cc-rpi plugin — 13 skills, 18 commands, 2 hooks 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/juan294/cc-rpi/git-workflow
Any agent
npx skills add juan294/cc-rpi --skill git-workflow
Clone the repo
git clone --depth 1 https://github.com/juan294/cc-rpi

Made for: Claude Code, Codex.

Or install cc-rpi, the plugin that ships this one along with the rest of its 13 skills, 18 commands, 2 hooks.

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-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/juan294/cc-rpi/git-workflow.svg)](https://agentmods.dev/skills/juan294/cc-rpi/git-workflow)
Your own site
<a href="https://agentmods.dev/skills/juan294/cc-rpi/git-workflow"><img src="https://agentmods.dev/badge/skills/juan294/cc-rpi/git-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 841 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.00022 $0.00841
Opus 5 $0.00011 $0.00420
Sonnet 5 $0.00004 $0.00168
Haiku 4.5 $0.00002 $0.00084

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

Security

Grade A, and why

git-workflow 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.

templates/skills/git-workflow/SKILL.md · 146 lines

How it starts

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

Git Workflow

Push Sequence

Wrong -- unstaged changes break the pull:

git pull --rebase && git push

Right -- commit before pulling (clean tree required):

git add <files> && git commit -m "msg" && git pull --rebase && git push

Pull before push even on a branch you just committed to -- the remote may have advanced from other sessions or parallel agents since you last fetched.

Empty Repositories

Wrong -- git log and git diff HEAD fail on a repo with no commits yet:

git log -1
git diff HEAD

Right -- check for a HEAD first:

git rev-parse HEAD 2>&1 || echo "no commits yet -- skip log/diff HEAD"

First Push / PR Creation

Wrong -- no upstream, push and gh pr create both fail:

git push && gh pr create --title "feat: thing"

Right -- set upstream on first push:

git push -u origin <branch> && gh pr create --title "feat: thing"

Push with Tag

Wrong -- pushes ALL local tags, fails if any old tag exists on remote:

git push --tags

Right -- push specific tags by name or use --follow-tags:

git push origin main && git push origin v1.0.0

Branch Verification

Wrong -- assume branch from conversation context:

git commit -m "feat: add feature"

Right -- verify branch before every commit:

git branch --show-current && git commit -m "feat: add feature"

Worktree Management

Wrong -- relative paths and lowercase -d:

cd ../worktree && pnpm test           # cwd resets between calls
git worktree remove <path> && git branch -d <branch>  # -d fails

Right -- absolute paths, force remove, uppercase -D:

cd /absolute/path/to/worktree && pnpm test
git worktree remove --force <path>; git branch -D <branch>

Always remove worktrees BEFORE merging PRs with --delete-branch.

Cleanup After Merge

Wrong -- assume the merge cleaned up; leave stale local branches behind (a cleanup "done" that left two local branches needing a second pass):

Read the full file on GitHub · 146 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. 3d ago First seen · 146 lines · 22 tokens per session scan A c4409cad534a

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository juan294/cc-rpi (5 stars, last pushed 14d ago), licensed MIT. It adds 22 tokens to every session and 841 once invoked, about $0.0001 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

weather-fetcher

Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API.

shanraisshan/claude-code-best-practice · 21 tokens

claude-md-review

Audit a CLAUDE.md file for the patterns that actually degrade Claude Code's output — vagueness, unnamed files, stale facts, and bloat. Use when asked to review, audit, improve, shrink, or fix a CLAUDE.md, and when a project's results feel inconsistent or Claude keeps rediscovering the same context.

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 69 tokens

common-product-requirements

Standardize PRD discovery and drafting for product scope, user outcomes, requirement IDs, and acceptance criteria. Use when creating PRD, product requirements, feature specification, or acceptance criteria plan.

HoangNguyen0403/agent-skills-standard · 44 tokens

common-security-standards

Enforce universal security protocols for safe, resilient software. Use when implementing authentication, encryption, authorization, input validation, secret management, or any security-sensitive feature across any language or framework.

HoangNguyen0403/agent-skills-standard · 43 tokens

common-software-requirements

Standardize SRS and FRS specifications for technical behavior, interfaces, data contracts, quality constraints, and verification mapping. Use when writing SRS, functional specification, system behavior requirements, API/data contracts, or non-functional thresholds.

HoangNguyen0403/agent-skills-standard · 53 tokens

system-design-case-catalog

Answer classic system design problems as constraint-to-solution sketches and coach interview practice: URL shortener, rate limiter, news feed, chat, notification, autocomplete, crawler, unique id. Use for interview practice or naming the closest known shape for a new problem.

HoangNguyen0403/agent-skills-standard · 58 tokens