Enforce staged-only behavior for git commits. Always use this skill whenever the user asks to commit, wants a commit created, asks to run git commit, wants a commit message based on repo changes, or uses short prompts like "commit", "commit plz"; combine it with kf-g-git-commit-japanese-commit-message when creating the message.
Ships in kf-global. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
この skill は、commit 依頼で commit 対象を staged 済み変更だけに限定するための規約。
コミットメッセージ作成時は kf-g-git-commit-japanese-commit-message と併用する。
git add しないcommit 依頼では、次の操作を厳格に禁止する。
git addgit add -Agit add .git add <path>git commit -agit commit --allgit commit <pathspec>git update-index など、index を直接変更する操作ユーザーが stage 操作も必要だと明示した場合でも、commit と同じ流れで勝手に stage しない。 まず stage 対象を確認し、stage 後に commit へ進んでよいかを別途確認する。
git status --short で staged、unstaged、untracked の有無を確認するgit diff --cached --name-status または git diff --cached --stat で staged 済み変更だけを確認するgit diff --cached の内容だけから作る/tmp/commit-msg.txt)へ書き出し、git commit -F <path> で渡す。heredoc(<<)、$()、backtick、-F - は使わない(hook が message file を静的に読める一方、前者は展開・外部実行を伴い安全性と lint 対象を確定しにくい)--all を付けずに git commit -F <path> するstaged 済み変更が 1 つもない場合は、commit しない。 空コミットで代替しない。 ユーザーへ、対象ファイルを stage してから再依頼するよう短く伝える。
例:
stage 済み変更なし。commit 対象なし。
必要なファイルを `git add <path>` で stage してから再依頼して。
unstaged 変更や untracked ファイルがあっても、commit 対象には含めない。 それらを勝手に stage せず、必要なら「未 stage の変更は commit から除外」とだけ報告する。
コミットメッセージの 概要 と Why も、staged 済み変更だけを根拠に書く。
unstaged 変更の内容を混ぜると、実際の commit と message がずれるため。
kf-g-git-commit-japanese-commit-message を使う場合も、この skill の制約を優先する。
git add しないgit commit 実行時は staged index だけを commit するWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/kf-global:kf-g-git-commit-staged-only-rulesfrom kf-global
npx claudepluginhub melumuccu/ai --plugin kf-global35 skills in this plugin
/kf-g-agent-git-managed-workflowUse this skill when changing any git-managed files in a repository. Always apply it before creating issues, dedicated worktrees, commits, or pull requests for such changes; covers issue-first planning, worktree path and branch naming, atomic commits, push, PR creation, presenting the PR URL to the user, and stopping on hook failures without --no-verify.
/kf-g-agent-planning-design-as-finalUse this skill whenever creating or revising planning documents, design docs, issue/PR planning HTML, or any equivalent design text. Rewrite the published text as one complete final design, as if it had been planned that way from the start, for a reader with no prior conversation./kf-g-agent-research-report-only-unless-approved