Skip to content
cccskills
FreePublished on GitHub

git-commit

コミットを頼まれたとき、plan のタスクを 1 つ終えたとき、まとまったコードの変更を 1 つ終えたときに、 次の作業に移る前に使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3 stars(GitHub 3 + cccskills 0)

Run score Not tested

See how to install

Files included (2)

  • SKILL.md2.0 KB
  • references/types.md910 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

git-commit

目的

作業ツリーの変更から Conventional Commits 1.0.0 に沿ったメッセージを書き、コミットする。 コマンドはリポジトリのルートで実行する。

手順

  1. stage する
    • git diff --staged --name-only で stage 済みのファイルを確かめる
    • 何も stage されていなければ、git diff --name-only で追跡中のファイルの変更を、 git ls-files --others --exclude-standard で未追跡のファイルを挙げる。会話の文脈 (直前に終えたタスク)、 パス、diff の中身からタスクに関係するファイルを選び、git add <file>... でそれだけを stage する
    • それでも何も stage されなければ、見つかった unstaged のファイルを挙げて止まる
  2. メッセージを書く
    • git --no-pager diff --staged で diff を読む
    • types.md から type を 1 つ選ぶ
    • description は英語の命令形で書く。末尾にピリオドもカンマも付けず、ファイルパスだけにしない。 type を含めて 100 字以内にする
    • 本文は任意で、- の箇条書きにする
  3. コミットする
    • 下のテンプレートに沿ったメッセージを、クォート付きの heredoc で git commit -F - に渡す。 本文に行頭が EOF だけの行があるときは、区切り文字を本文に現れない別の語に変える
    • 失敗したら、エラーをそのまま見せて止まる

メッセージのテンプレート

<...> を中身に置き換える。本文が無ければ、<body> とその前の空行を消す。

<type>: <description>

<body>
git commit -F - <<'EOF'
<テンプレートに沿って書いたメッセージ>
EOF

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

シェルコマンドの実行、ファイル読み込み、URL の取得、検索、データの解析や変換を行うときに、 経路を通常のツールと context-mode の ctx_ ツールのどちらにするか判断するために使う。 context-mode が接続されている場合に適用する。ctx stats や ctx doctor といった "ctx" コマンドにも使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

描く内容に合った図の種類を選んで図を書く。Mermaid の図、AWS の構成図、 マインドマップ (markmap。Mermaid ではない) を書く、直す、読み直すときに使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

文書を書く、置き場所を決める、配置をレビューするときに使う。Markdown の書式、 ADR の作法、文書の層ごとの役割と正本の原則を扱う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

gh-ops

Free

GitHub の Issue の作成、Issue へのコメント、draft PR の作成、PR へのレビューコメントの追加に使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

PR のレビューコメントを解決する、または対応するときに使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

JavaScript の描画が要るページの取り方を決める。WebFetch や ctx_fetch_and_index が空のシェルや 内容の無い骨組みだけを返したとき、またはサイトが headless の user agent を 403 で弾いたときに使う。

The English summary is being prepared. Showing the original description.

iimuz/dotfiles3Updated Oct 27, 2026

See all skills by iimuz

Report a problem with this skill