本文へスキップ
Skillpedia
一般的なプログラミング33k · #8878

commit-work

できること

このスキルは、エージェントがレビューしやすいGitのコミットを作る手助けをします。各コミットに意図した変更だけを入れ、その変更を説明する明確なメッセージを付けたい開発者向けです。

使う場面

  • ✓作業をコミットしたく、変更を確認して適切にステージしてほしいとき。
  • ✓変更が無関係な複数のタスクを含み、別々のコミットに分けたいとき。
  • ✓Conventional Commitsの形式でコミットメッセージがほしいとき。

スキルのリンク

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/commit-work/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/productivity/commit-work/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“変更をコミットしてください。ただし、リファクタリングと新機能は別々のコミットにして、それぞれ明確なメッセージを付けてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは作業ツリーを確認し、各コミットの始まりと終わりを決め、属するものだけをステージします。ステージされた差分に秘密情報やデバッグ用のコードがないかを確認してから、メッセージを書きます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Commit work

Goal

Make commits that are easy to review and safe to ship:

  • only intended changes are included
  • commits are logically scoped (split when needed)
  • commit messages describe what changed and why

Inputs to ask for (if missing)

  • Single commit or multiple commits? (If unsure: default to multiple small commits when there are unrelated changes.)
  • Commit style: Conventional Commits are required.
  • Any rules: max subject length, required scopes.

Workflow (checklist)

  1. Inspect the working tree before staging
    • git status
    • git diff (unstaged)
    • If many changes: git diff --stat
  2. Decide commit boundaries (split if needed)
    • Split by: feature vs refactor, backend vs frontend, formatting vs logic, tests vs prod code, dependency bumps vs behavior changes.
    • If changes are mixed in one file, plan to use patch staging.
  3. Stage only what belongs in the next commit
    • Prefer patch staging for mixed changes: git add -p
    • To unstage a hunk/file: git restore --staged -p or git restore --staged <path>
  4. Review what will actually be committed
    • git diff --cached
    • Sanity checks:
      • no secrets or tokens
      • no accidental debug logging
      • no unrelated formatting churn
  5. Describe the staged change in 1-2 sentences (before writing the message)
    • "What changed?" + "Why?"
    • If you cannot describe it cleanly, the commit is probably too big or mixed; go back to step 2.
  6. Write the commit message
    • Use Conventional Commits (required):
      • type(scope): short summary
      • blank line
      • body (what/why, not implementation diary)
      • footer (BREAKING CHANGE) if needed
    • Prefer an editor for multi-line messages: git commit -v
    • Use references/commit-message-template.md if helpful.
  7. Run the smallest relevant verification
    • Run the repo's fastest meaningful check (unit tests, lint, or build) before moving on.
  8. Repeat for the next commit until the working tree is clean

Deliverable

Provide:

  • the final commit message(s)
  • a short summary per commit (what/why)
  • the commands used to stage/review (at minimum: git diff --cached, plus any tests run)
よくある質問

1つのファイルに2つのコミットに属する変更がある場合はどうしますか?

パッチのステージングを使います。ファイル内の変更の一部だけをステージできます。

コミット前に何を確認しますか?

秘密情報やトークン、誤って入ったデバッグのログ、無関係な書式の変更を確認します。

どのコミット形式を使いますか?

スキルが求めるConventional Commitsです。

詳細

作者による元の説明

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

repo: davila7/claude-code-templates

人気

GitHubのスター
33k
ランキング
#8878
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル