git-workflow

git-workflow is a skill for Claude Code, Codex from shimo4228/claude-harness. It costs 108 tokens per session (1,036 once invoked), scanned B, original, MIT.

A set of operating rules for running Git commands in Bash in this environment. It explains command forms that avoid unnecessary permission prompts and notes the extra restrictions around pushing changes.

In plain words
What is it for?
Use it before running Git commands, especially when combining commands, choosing a repository directory, writing commit messages, or pushing.
Why use it?
It reduces friction and unexpected approval requests when checking status, staging files, committing, or pushing a repository.

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

Made for: Claude Code, Codex.

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/shimo4228/claude-harness/git-workflow.svg)](https://agentmods.dev/skills/shimo4228/claude-harness/git-workflow)
Your own site
<a href="https://agentmods.dev/skills/shimo4228/claude-harness/git-workflow"><img src="https://agentmods.dev/badge/skills/shimo4228/claude-harness/git-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,036 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00108 $0.01036
Opus 5 $0.00054 $0.00518
Sonnet 5 $0.00022 $0.00207
Haiku 4.5 $0.00011 $0.00104

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

Security

Grade B, and why

git-workflow scanned grade B with 1 finding 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

許可設定は `Bash(git:*)`(`~/.claude/settings.json` の permissions.allow)。照合エンジンは
skills/git-workflow/SKILL.md · 48 lines

What it actually says

git-workflow — この環境での git コマンド実行作法

許可設定は Bash(git:*)~/.claude/settings.json の permissions.allow)。照合エンジンは 複合コマンドを分解して各セグメントを独立照合する(区切り: && || ; | & 改行)。 全セグメントが git なら自動許可されるが、以下の罠は allowlist で回避できない。

規則

  1. git 同士の連結(git add … && git commit … 等)は可 — 各セグメントが Bash(git:*) に載るため auto-approve される(2026-08-13 実測 + 公式 permissions doc)。 非 git コマンドを 1 つでも挟むとそのセグメントで照合が外れる
  2. cd を git と混ぜない — git -C <dir> を使う。cd + git の組み合わせは、双方が 個別に許可済みでもハードコードの特例としてプロンプトする(移動先ディレクトリの git hooks 実行リスクのため。公式 permissions doc 明記)。Bash(cd:*) を足しても回避不能
  3. コミットメッセージは -m "…" の単純形(複数 -m 可)または -F <file>。 バッククォート・$( )・heredoc は injection 検出で必ず承認要求になる (公式 security doc: 「Suspicious bash commands require manual approval even if previously allowlisted」。なお $( ) を含む catastrophic removal は 2.1.208 以降 --dangerously-skip-permissions でも昇格する — 一般の $( ) はこの特例の対象外)
  4. git push は sandbox の network / credential 制約で失敗するため dangerouslyDisableSandbox: true を付けて実行する (認証は gh auth setup-git 済み — memory: github-auth-git-gh-disconnect-2026-06)
  5. commit 前の secret scan は PreToolUse hook が自動実行する(rules/common/security.md)。 手動で scan を連結する必要はない。連結 commit でも hook は全 git ターゲットを走査する (ADR-0038)が、迷ったら commit だけ単発にするのが安全側

規則 2 と 3 は hook が機械的に強制するhooks/validate-bash.shsettings.json の PreToolUse に配線)が cd ... && git 形と git commit + $( 形を block し、書き直しを 指示する(テスト: tests/validate-bash-cd-git.bats / tests/validate-bash-heredoc-commit.bats)。 覚えていなくても踏み外せないが、block されてから直すと 1 往復損する。

適用外

  • git 以外のコマンド同士の連結は本 skill の対象外(同じ分解照合の原理は働くので、 全セグメントが許可済み prefix に載っていれば通る)

失効条件

本 skill は Claude Code の permission 実装(v2.1.x、as-of 2026-08-13)に依存する。 cd + git 特例の緩和・injection 検出の変更・sandbox 内 push の解禁があれば該当規則を再監査する。 規則がすべて product / allowlist 側に吸収されたら skill ごと退役する。

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. 4d ago First seen · 48 lines · 108 tokens per session scan B 3d00ad43c8eb

Subscribe to this mod's changes

git-workflow is a skill published in the GitHub repository shimo4228/claude-harness (2 stars, last pushed 5d ago), licensed MIT. It adds 108 tokens to every session and 1,036 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

commit

Atomic git commit with conventional message. Use when the user says "commit", "save my changes", "commit this", or wants to create a git commit. Stages specific files, writes a conventional commit message with body explaining non-obvious decisions. Never uses git add -A.

congchuanling-dot/Cohort · 59 tokens

git-workflow

Git best practices, branching strategies, commit conventions, and PR workflows. Use when reviewing git history, writing commits, setting up branching strategy, or improving git practices. Triggers on "git best practices", "commit message", "branching strategy", or "PR workflow".

AsyrafHussin/agent-skills · 59 tokens

git-commit-convention

写 git 提交信息、整理提交历史时使用——Conventional Commits 的格式、类型选择和拆分原则。.

7-e1even/learn-agent · 32 tokens

zod

Zod v4 best practices, patterns, and API guidance for schema validation, parsing, error handling, and type inference in TypeScript applications. Covers safeParse, object composition, refinements, transforms, codecs, branded types, v3→v4 migration, and testing schemas with Jest or Vitest. Baseline: zod ^4.3.0. Triggers…

anivar/zod-skill · 138 tokens

akigitcommit

Analyze the working tree and commit changes in clean logical groups. Triages a long half-finished tree first (finished vs mid-edit vs abandoned vs accidental) before grouping. Auto-detects CHANGELOG to switch between domain-grouped mode (3–5 commits by object/feature) and type-grouped mode (feat/fix/refactor). Stages…

lacvietanh/akidevrule · 100 tokens

conventional-commit

Draft a Conventional Commit message when the user requests a commit or message. Formats only; does not authorize Git operations.

bnet47/codexicon · 28 tokens