git-workflow

A set of rules for safely handling Git branches and project history, including rebases, conflicts, recovery, and force-push decisions.

In plain words
What is it for?
Use it when rebasing, resolving merge conflicts, investigating past changes with bisect or reflog, cleaning up branches, repairing pull-request history, or deciding whether to force-push.
Why use it?
It helps prevent lost work and accidental changes to shared history. It also requires checking the repository and preserving a recovery point before risky operations.

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

Made for: Claude Code, Codex.

Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,432 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.00024 $0.01432
Opus 5 $0.00012 $0.00716
Sonnet 5 $0.00005 $0.00286
Haiku 4.5 $0.00002 $0.00143

Measured 2d ago against content hash 780121c847d7, 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.

agents/.agents/skills/git-workflow/SKILL.md · 120 lines

How it starts

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

Git Workflow

Iron Law

NEVER REWRITE SHARED HISTORY OR SKIP RECOVERY.

Git history is a review, bisect, revert, and release surface. Keep it recoverable, scoped, and honest. The host owns git mechanics and access permission; this skill owns the gates: recoverability and approval of published text.

When to Use

  • Rebases, merge conflicts, bisects, reflog recovery, branch cleanup, PR history repair, or force-push decisions.

When NOT to Use

  • Staging reviewed files, splitting commit groups, writing commit messages, or committing approved work. Use commit.
  • Reviewing implementation correctness; use code-review.
  • Refactor planning; use refactoring.
  • CI failure triage; use debugging to reproduce and root-cause the failing check.

Core Ideas

  1. Inspect before mutation. Know the tree, branch, and upstream state before any history operation.
  2. Prefer --force-with-lease --force-if-includes over bare force when a solo-branch rewrite is genuinely needed.
  3. Preserve a recovery point (tag, named branch, or noted reflog entry) before any risky operation.
  4. Resolve conflicts by preserving intent from both sides, then run the relevant checks.
  5. Test hook policy, not hook wrappers. Tiny hooks that only exec a repo script don't need dedicated tests; test the script when it selects commands, blocks branches, routes staged files, or handles failures.
  6. Branch without ceremony. Starting new work on the default branch, create a topic branch first. On an existing topic branch, keep going unless the new work is clearly unrelated; then branch off main and say which branch received the work. Do not ask which branch to use.
  7. The host's permission system owns GitHub access. Hosts already gate network calls and gh under the user's account; do not add a second chat-level ask on top of an approval the host has granted. Reserve your own questions for GitHub writes that publish user-owned text (PRs, issues, comments) and for destructive operations. Check which surface exists before planning the step (gh CLI, GitHub MCP, or built-in host tools); gh is absent from some sandboxes and hosted sessions.
  8. Humans approve PR and issue text before it is published. Titles and descriptions are author-facing content the user owns. Draft the title and body locally, show them, and get explicit approval of that exact text before anything creates or updates the PR or issue. Do not let a tool open an editor or send unreviewed body text.

Read the full file on GitHub · 120 lines

Files

What ships with it

1 file 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. 2d ago First seen · 120 lines · 24 tokens per session scan A 780121c847d7

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository kreek/consult (1 stars, last pushed 7d ago), licensed MIT. It adds 24 tokens to every session and 1,432 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

batch

Execute batch operations on multiple files in parallel. Automatically discovers files, splits into chunks, and processes with parallel worker agents. Use /batch followed by operation and file pattern.

QwenLM/qwen-code · 37 tokens

notion

Notion API for creating and managing pages, databases, and blocks. Use when the user wants to create a Notion page, query a Notion database, update Notion properties, search Notion, add content to Notion, manage Notion blocks, or interact with Notion data sources and workspaces via the API.

elizaOS/eliza · 69 tokens

review

5-pass structured code review — correctness, security, performance, readability, consistency.

SethGammon/Citadel · 17 tokens

scaffold

Project-aware file generation. Reads existing codebase conventions (naming, structure, imports, exports, test patterns) then generates new files that match exactly. Wires generated files into the project's registration points.

SethGammon/Citadel · 44 tokens

marshal

Meta-orchestrator that takes any direction — broad, specific, or vague — and autonomously chains skills and context into actionable work. Gathers context from codebase, docs, and memory. Only asks the user when it genuinely cannot proceed. Single-session orchestrator.

SethGammon/Citadel · 56 tokens

organize

Repository structure only: directory layout, file placement, naming conventions, and where-does-this-belong decisions. Detects the project's convention, audits files against it, and executes move plans with import-path updates. Never changes code inside files beyond the import updates a move forces; in-file…

SethGammon/Citadel · 66 tokens