Git Workflow

Git Workflow is a skill for Claude Code from nxtg-ai/forge-plugin. It costs 92 tokens per session (1,847 once invoked), scanned A, original, MIT.

A guide to trunk-based Git workflow, where the main branch stays ready to deploy and changes are made in short-lived feature branches before review. Git is the version-control system used to track and combine code changes.

In plain words
What is it for?
Use it when creating branches, writing commit messages, preparing pull requests, updating work from main, resolving conflicts, or choosing how changes should be merged.
Why use it?
It provides consistent rules for branching, commits, pull requests, rebasing, and conflict resolution. This helps teams keep changes focused and reduce divergence between branches.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Use it when creating branches, writing commit messages, preparing pull requests, updating work from main, resolving conflicts, or choosing how changes should be merged.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nxtg-ai/forge-plugin/git-workflow
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.

Any agent
npx skills add nxtg-ai/forge-plugin --skill git-workflow
Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

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/nxtg-ai/forge-plugin/git-workflow/github.svg)](https://agentmods.dev/skills/nxtg-ai/forge-plugin/git-workflow)
Your own site
<a href="https://agentmods.dev/skills/nxtg-ai/forge-plugin/git-workflow"><img src="https://agentmods.dev/badge/skills/nxtg-ai/forge-plugin/git-workflow/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.

agentmods 80×15 button for Git Workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/nxtg-ai/forge-plugin/git-workflow"><img src="https://agentmods.dev/badge/skills/nxtg-ai/forge-plugin/git-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,847 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00092 $0.01847
Opus 5.5 $0.00037 $0.00739
Sonnet 5.5 $0.00018 $0.00369
Haiku 4.5 $0.00009 $0.00185

Measured 12d ago against content hash 9b52d55653c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 12d 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.

plugins/nxtg-forge/skills/git-workflow/SKILL.md · 137 lines

How it starts

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

Git Workflow and Branching Strategy

NXTG-Forge uses trunk-based development: main stays always-deployable, work happens on short-lived feature branches, and changes land via squash-merged PRs. This SKILL.md is the lean operating guide; deep tables (commit/PR conventions, recovery recipes) live in the linked reference files.

Branch strategy

  • main — always deployable, protected, requires PR + passing CI. Single source of truth.
  • Feature branches — short-lived (1–3 days), single-purpose, named type/description: feat/user-authentication, fix/login-validation-bug, refactor/state-migration, docs/api-guide, chore/dep-bump.
  • No long-lived branches — no develop, no release/*, no hotfix/*. Fix directly from main on a fix/* branch. (Reversing this needs an ADR.)

The core loop

# 1. Branch off fresh main
git checkout main && git pull origin main
git checkout -b feat/user-authentication

# 2. Work → stage EXPLICIT paths (never `git add -A` / `git add .`) → commit
git add src/auth/ tests/auth.test.mjs
git commit -m "feat: add JWT auth middleware"

# 3. Stay current — rebase, don't merge main in
git fetch origin && git rebase origin/main

# 4. Push (first push sets upstream)
git push -u origin feat/user-authentication      # later pushes: git push
git push --force-with-lease                        # ONLY after a rebase, never plain --force

# 5. Open PR
gh pr create --title "feat: add user authentication" --body "$(cat <<'EOF'
## Summary
- JWT-based authentication middleware + login/logout endpoints
## Test Plan
- [x] Unit tests for token validation
- [x] Integration test for the auth flow
EOF
)"

# 6. After approval + green CI
gh pr merge --squash --delete-branch

Stage explicit paths, not git add -A — it sweeps in unrelated dirty files and secrets. Rebase (not merge-from-main) keeps history linear. Push new work with -u; after a rebase that rewrote your branch, reconcile the remote with --force-with-lease (safe: it refuses if someone else pushed). See reference/commit-and-pr.md for the full commit-type list, PR template, size guidance, and merge-strategy trade-offs.

Read the full file on GitHub · 137 lines

Files

What ships with it

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

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. 12d ago Changed 9b52d55653c1
  2. 1mo ago First seen · 137 lines · 92 tokens per session scan A a7bdf00740da

Subscribe to this mod's changes

Git Workflow is a skill published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 92 tokens to every session and 1,847 once invoked, about $0.0004 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-09-03.