npx claudepluginhub getty104/claude-code-marketplace --plugin base-toolsWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
コード変更を適切なgitコミット戦略でgit commitし、pushします。基本的には既存のgitコミットへのsquash戦略を採用し、必要に応じてブランチ全体のgitコミット履歴を再構成します。実装完了時やユーザーがgit commitを依頼した時に使用します。
This skill uses the workspace's default tool permissions.
examples.mdreference.mdCommit and Push Code Changes
コード変更を適切なgitコミット戦略でgit commitし、pushするためのスキルです。 このスキルが呼び出された際には、Instructionsに従って、コード変更のgit commitとpushを行ってください。
Instructions
実行ステップ
以下のステップでコード変更のgit commitとpushを行ってください。
ステップ1: ブランチとgitコミット履歴の確認
以下のコマンドで現在の状態を確認:
git status
git log --oneline --graph origin/main..HEAD
確認事項:
- 現在のブランチ名
- デフォルトブランチから何gitコミット進んでいるか
- 各gitコミットの内容と粒度
ステップ2: gitコミット戦略の判断
以下の基準でgitコミット戦略を選択:
戦略A: Squash(基本戦略)
以下の条件を満たす場合、既存のgitコミットにsquashします:
- ブランチに既にgitコミットが存在する
- 変更内容が既存のgitコミットと同じテーマ・機能に関連している
- gitコミットを分ける合理的な理由がない
実行方法:
git add -A
git commit --amend
gitコミットメッセージを適切に更新してください。
戦略B: 新規gitコミット
以下の場合は新規gitコミットを作成:
- ブランチに初めてのgitコミット
- 既存のgitコミットとは異なる独立した変更
- gitコミットを分けることで履歴がより理解しやすくなる
実行方法:
git add -A
git commit
戦略C: Interactive Rebase(gitコミット再構成)
以下の場合はブランチ全体のgitコミットを再構成:
- 複数の小さなgitコミットを論理的なまとまりに整理したい
- gitコミットの順序を変更したい
- 不要なgitコミットを削除したい
- gitコミット履歴を意味のある単位に再編成したい
実行方法:
git rebase -i origin/main
エディタで以下の操作を実行:
pick: gitコミットをそのまま維持squashまたはs: 前のgitコミットと統合rewordまたはr: gitコミットメッセージを変更- 行の順序を変更してgitコミット順を変更
ステップ3: gitコミットメッセージのガイドライン
gitコミットメッセージは以下の形式で記述:
<type>: <subject>
<body>
<footer>
Type:
feat: 新機能fix: バグ修正refactor: リファクタリングtest: テスト追加・修正docs: ドキュメント変更chore: ビルドプロセスやツールの変更
Subject:
- 50文字以内
- 命令形で記述(例: "add"ではなく"Add")
- 末尾にピリオドを付けない
Body(オプション):
- 変更の理由と背景を説明
- 何を変更したかではなく、なぜ変更したかを記述
- 72文字で折り返す
Footer(オプション):
- Issue番号への参照(例:
Closes #123) - Breaking changesの記述
ステップ4: git commit後の確認
git commit後、以下を確認:
git log -1 --stat
git status
- gitコミットが正しく作成されたか
- 意図したファイルがすべて含まれているか
- gitコミットメッセージが適切か
ステップ5: 変更のpush
変更をリモートブランチにpush:
git push origin HEAD --force-with-lease
重要な注意事項
- コメントは残さない: コード内の説明コメントは削除してください
- 原子的なgitコミット: 各gitコミットは独立して意味を持つようにしてください
- 一貫性: プロジェクトの既存のgitコミットスタイルに従ってください
戦略選択のフローチャート
ブランチにgitコミットがある?
├─ No → 新規gitコミット作成
└─ Yes → 変更は既存のgitコミットと同じテーマ?
├─ Yes → Squash(git commit --amend)
└─ No → gitコミットを分ける合理性がある?
├─ Yes → 新規gitコミット作成
└─ 履歴を整理したい → Interactive Rebase
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.