agentleFS
shimo4228shimo4228/claude-harness/skills/git-workflow/SKILL.md

git-workflow

Skill3 starsChanged 2 months agoMITView on GitHub

この環境で git コマンドを Bash 実行するときの permission 摩擦回避作法。git add / commit / push / status 等を実行する前に参照する。git 同士の && 連結は通るが、cd を git と混ぜると双方許可済みでもプロンプトする(git -C を使う)。commit メッセージに $( ) を含めない。push は sandbox 無効化が必要。

  • Commits and pushes

118 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use squad-commands, typescript-patterns and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    squad-commands

    Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.

    Also in 3 projects that use this

  • cohen-lielSkill

    typescript-patterns

    TypeScript best practices and patterns. Use when writing TypeScript code, defining types, working with generics, or converting JavaScript to TypeScript.

    Also in 4 projects that use this

  • martinholovskySkill

    llm-integration

    Expert skill for integrating local Large Language Models using llama.cpp and Ollama. Covers secure model loading, inference optimization, prompt handling, and protection against LLM-specific vulnerabilities including prompt injection, model theft, and denial of service attacks.

    Also in 4 projects that use this

  • MicrosoftSkill

    cost-optimization

    Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: \"optimize Azure costs\", \"reduce cloud spending\", \"rightsize resources\", \"find idle resources\", \"orphaned disk\", \"deleted VM still charged\", \"public IP still charging\", \"reservation utilization\", \"Savings Plan coverage\", \"commitment recommendation\", \"why is pay-as-you-go still charged\". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.

    Also in 5 projects that use this

  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 3 projects that use this

  • Vimalk0703Skill

    dependency-management

    Vet packages before adoption, audit for vulnerabilities, pin versions, and prevent dependency bloat.

    Also in 3 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 101 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    commit 前の secret scan は PreToolUse hook が自動実行する(rules/common/security.md)。 手動で scan を連結する必要はない。連結 commit でも hook は全 git ターゲットを走査する …

    line 29

“Common” is measured: kept by at least 6 in 10 of the 101 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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」)
  4. git push は sandbox の network / credential 制約で失敗するため dangerouslyDisableSandbox: true を付けて実行する (認証は gh auth setup-git 済みで、credential.https://github.com.helper に gh auth git-credential が入っている)
  5. commit 前の secret scan は PreToolUse hook が自動実行する(rules/common/security.md)。 手動で scan を連結する必要はない。連結 commit でも hook は全 git ターゲットを走査する (ADR-0038)が、迷ったら commit だけ単発にするのが安全側

規則 2 と 3 は hook が機械的に強制する。hooks/validate-bash.sh(settings.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 の解禁があれば該当規則を再監査する。 2.1.208 以降は $( ) を含む catastrophic removal が --dangerously-skip-permissions でも 昇格する(一般の $( ) はこの特例の対象外)— 昇格対象の拡大があれば規則 3 を再監査する。 規則がすべて product / allowlist 側に吸収されたら skill ごと退役する。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.