agentleFS
ktaroabobonktaroabobon/agent-skills/skills/commit/SKILL.md

commit

Skill0 starsChanged 3 months agoMITView on GitHub

未コミットの変更を、リポジトリのチェックコマンドを通してから意味のある塊ごとに日本語メッセージで commit する。「commit して」「コミットして」「変更をコミット」時に使用。push・PR 作成・タグ付けは行わない(それぞれ commit2push / commit2pr)。AI ツールの署名はメッセージに入れない。

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use validate-plan, act-on-feedback 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.
  • shawn-dumasSkill

    validate-plan

    Validate an orchestration plan after pre-flight certification. Runs adversarial review, deep review (verify prompt data against codebase), and PoC gate for risky approaches. Auto-invoked by orchestrate-* skills at Step 8.

    Also in 5 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • decocmsSkill

    add-mcp-tools

    Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration

    Also in 3 projects that use this

  • MicrosoftSkill

    generate-run-commands

    Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

    Also in 3 projects that use this

  • mitsuhikoSkill

    oebb-scotty

    Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.

    Also in 3 projects that use this

  • mitsuhikoSkill

    pi-share

    Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.

    Also in 3 projects that use this

The file

Files
SKILL.md

commit

未コミットの変更を commit する。commit 以外はしない — push もタグ付けも PR 作成もしない。境界を守るのは、/commit が「まだ外に出したくない」段階で使われるコマンドだから。

disable-model-invocation: true を付けている。commit は取り消しに手間がかかる副作用なので、ユーザーが /commit と打ったときだけ動かす。Codex 向けには agents/openai.yaml の allow_implicit_invocation: false が同じ役割をする。

Step 1: 変更を塊に分ける

git status --short と git diff / git diff --staged を読む。実装者の報告ではなく差分そのものを読む。

塊の基準は「1 つのコミットメッセージで過不足なく説明しきれる範囲」。無関係な変更が混ざったコミットは、後で revert も cherry-pick もできなくなる。

Step 2: チェックコマンドを通す

commit 前にリポジトリのチェックを通す。ここで落ちるものは push・PR で必ず戻ってくるので、先に潰したほうが速い。

上から順に探し、最初に見つかったものを使う:

手がかり実行するもの
Makefile に ci / lint / check ターゲットmake ci など実在するターゲット
Taskfile.yml / justfile に citask ci / just ci
package.json の scriptslint / typecheck / test のうち定義されているもの
go.modgo build ./... && go vet ./... && go test ./...
pyproject.toml設定されている linter / test(例: ruff check . && pytest)
Cargo.tomlcargo clippy && cargo test
どれも無いスキップし、「チェックコマンドを検出できなかった」と報告する

ターゲット名はリポジトリごとに違う。make -qp、package.json、Taskfile.yml を読んで実在を確認してから実行する。存在しないコマンドを叩いて「失敗しました」と報告するのが最も無駄。

失敗したら修正してから commit する。修正が今回の変更範囲を大きく超えるなら、直さずに報告して指示を仰ぐ。既存の壊れを巻き取ると、何を直したコミットなのか分からなくなる。

Step 3: 塊ごとに commit する

git add <paths> で塊の分だけ stage して git commit する。全部まとめて 1 コミットにしない。

メッセージの規約:

  • 日本語で書く
  • 端的に書く。1 行目は簡潔に、必要なら空行を挟んで本文を足す
  • prefix はリポジトリの慣習に合わせる。git log --oneline -20 を見て、Conventional Commits を使っていなければ付けない
  • AI ツールの署名を入れない(Co-Authored-By: trailer、🤖 Generated with ... フッター、noreply@anthropic.com)

強制されること(hook)

hooks/no-ai-attribution.sh が PreToolUse で git commit を検査し、AI ツールの署名が含まれていたら exit 2 でブロックする。指示ではなく機械的に止まる。

コマンド文字列と、-F / --file が指すファイルの中身の両方を見る。ツール名に言及すること自体は弾かない(署名の形だけを見る)ので、AI ツールについて書いたコミットメッセージは通る。

この hook は Claude Code でのみ効く。Codex では上記の規約を指示として守る。

完了時に返すもの

  • 作成したコミットの一覧(git log --oneline の該当分)
  • 実行したチェックコマンドと結果
  • チェックコマンドを検出できなかった場合はその旨

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.