git-workflow

A set of rules and commands for managing Git branches, commits, and pull requests. Git is a tool for tracking code changes, while a pull request is a proposed change submitted for review.

In plain words
What is it for?
Use it to create and clean up branches, pause work in a temporary commit, undo the latest commit, synchronise stacked pull requests, and monitor a pull request through merge.
Why use it?
It gives a consistent way to work safely with multiple worktrees and avoids branch or stash operations that can cause conflicts in this setup.

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

Made for: Claude Code, Codex.

Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,001 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.00031 $0.02001
Opus 5 $0.00015 $0.01001
Sonnet 5 $0.00006 $0.00400
Haiku 4.5 $0.00003 $0.00200

Measured 2d ago against content hash baa766c74840, 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 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-workflow/SKILL.md · 230 lines

How it starts

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

Git Workflow and Conventions

Worktree-aware Git workflow using mise run git:* tasks.

Quick Reference

# Basic operations
mise run git:status            # Show current state + next action
mise run git:home              # Switch to home branch + sync with origin/main
mise run git:new <branch>      # Create new branch from origin/main
mise run git:cleanup [branch]  # Delete merged branch + return to home

# PR lifecycle (CI wait -> browser open -> merge watch -> cleanup)
mise run git:open-pr <pr#>     # All-in-one: CI -> open -> watch -> cleanup

# Pause / discard / undo
mise run git:pause [message]   # WIP commit + return to home (for switching tasks)
mise run git:abandon           # Discard all changes + return to home
mise run git:undo              # Soft reset HEAD~1 (undo last commit)

# Stacked PRs
mise run git:sync              # Sync current branch after base PR merge

Note: These tasks use the gw Rust CLI (crates.io). Install with cargo install git-workflow.

Pitfalls

  • Do not run git checkout main — use mise run git:home instead (worktree conflict)
  • Do not use git stash — use mise run git:pause instead (creates WIP commit for safer worktree switching)
  • Do not manually rebase stacked PRs — use mise run git:sync instead (updates GitHub PR base + rebases)

Standard Workflow: Code -> PR

Every code change should become a PR. Follow this flow:

1. Branch   -> mise run git:new -- feature/your-feature
2. Code     -> make changes
3. Commit   -> git add -A && git commit -m "feat: ..."
4. Push     -> git push -u origin feature/your-feature
5. PR       -> gh pr create -a "@me" -t "feat: ..."
6. Open     -> mise run git:open-pr <pr#>  (CI wait -> browser -> merge watch -> cleanup)
               ⚠ Run ONCE after final push. If CI fails, stop watcher -> fix -> push -> relaunch.
7. Cleanup  -> (auto: merge detected -> git:cleanup runs)

git:open-pr — PR Lifecycle Management (Claude Code Background Task)

Read the full file on GitHub · 230 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 · 230 lines · 31 tokens per session scan A baa766c74840

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository lanegrid/agtrace (59 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 31 tokens to every session and 2,001 once invoked, about $0.0002 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

ship

Fully automated ship workflow. Merges the base branch, runs tests, audits coverage, reviews the diff, generates a CHANGELOG entry, bumps the version, commits, pushes, and creates the PR. Use when asked to "ship", "create a PR", or "open a pull request".

HECer/yoke · 61 tokens

plan-ceo-review

Mega plan review from a product/CEO perspective. Challenges premise, challenges scope, maps alternatives, reviews architecture through 11 sections, and offers an outside voice. Use when asked to "CEO review", "mega plan review", "product review this plan", or when shipping a significant new product feature.

HECer/yoke · 66 tokens

plan-eng-review

Engineering plan review. Reviews a plan document for architecture, code quality, test coverage, and performance before implementation begins. Produces a coverage diagram, failure modes map, and parallelization strategy. Use when asked to "review this plan", "eng review", or "architecture review".

HECer/yoke · 61 tokens

retro

Weekly engineering retrospective. Analyzes commit history, work patterns, and code quality metrics for the time window. Team-aware: identifies the user, then analyzes every contributor with per-person praise and growth opportunities. Use when asked for a "retro", "engineering retrospective", or "weekly summary".

HECer/yoke · 63 tokens

review

Pre-merge code review — the single canonical review of a change before it lands. Covers BOTH diff safety/structure (SQL safety, LLM trust-boundary violations, conditional side effects) AND engineering quality (architecture fit, edge cases, test coverage, performance). Use when asked to "review this PR", "code review"…

HECer/yoke · 103 tokens

health

Code Quality Dashboard. Runs the project's type-checker, linter, test runner, and dead-code detector, scores each category 0-10, and presents a dashboard with trends. Use when asked for a "health check", "code quality report", or "quality dashboard".

HECer/yoke · 59 tokens