home/dot_agents/skills/commit/SKILL.md
変更をコミットする際に使用。現在の差分を分析し、適切なブランチ作成と論理的な粒度でのコミット分割を行う。コミット計画を提示しユーザー承認後に実行する。
npx skillsauth add kryota-dev/dotfiles commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
現在の差分を分析し、適切なブランチを作成して論理的な粒度でコミットを作成します。
引数: $ARGUMENTS(ブランチ名の提案。未指定の場合は変更内容から自動生成)
実行手順:
現在の差分を確認:
現在のブランチ名を確認 !git branch --show-current
未追跡ファイルと変更を確認 !git status
変更内容の詳細確認 !git diff
ステージング済みの変更確認 !git diff --cached
変更内容を分析:
コミット計画の提案とユーザー確認: 変更内容の分析結果に基づいて、以下のようなコミット計画を提示:
📝 コミット計画の提案:
1. feat(auth): ユーザー認証機能の追加
- apps/api/src/features/auth/login-usecase.ts
- apps/api/src/features/auth/route.ts
2. test(auth): 認証機能のテストケース追加
- apps/api/src/features/auth/login-usecase.spec.ts
3. docs(api): API仕様書の更新
- docs/api/authentication.md
4. chore(deps): 認証ライブラリの追加
- package.json
- pnpm-lock.yaml
`AskUserQuestion`ツールを使用して、この計画でコミットを作成してよいかユーザーに確認を取ること。
AskUserQuestionパラメータ:
- question: "上記のコミット計画で作成してよろしいですか?"
- header: "Commit"
- options:
- { label: "はい", description: "この計画でコミットを作成する" }
- { label: "修正が必要", description: "計画の調整が必要な箇所を伝える" }
- multiSelect: false
ブランチ作成(main ブランチでない場合のみ):
# 現在のブランチがmainの場合、新しいブランチを作成
if [ "$(git branch --show-current)" = "main" ]; then
# ブランチ名の提案(引数があればそれを使用、なければ変更内容から生成)
branch_name="${ARGUMENTS:-feat/auto-generated-branch-name}"
# ブランチ作成とチェックアウト
git checkout -b "$branch_name"
fi
論理的なコミット単位で変更をステージング&コミット:
ステップ3でユーザーの承認を得た後、各コミットごとに:
# 例: 機能追加のコミット
git add [関連ファイル]
git commit -m "$(cat <<'EOF'
feat(scope): 簡潔な説明
- 詳細な変更内容1
- 詳細な変更内容2
- 詳細な変更内容3
EOF
)"
コミット作成の原則:
コミット分割の例:
実行前の確認:
AskUserQuestionツールを使用してユーザーの承認を得てから実行(ステップ3と同様のパラメータを使用)重要事項:
development
`cc-code-review` エージェントを起動して独立したコンテキストでコードレビューを実行する。 現在のセッションのバイアスのないフレッシュな視点で、プロジェクトの CLAUDE.md を踏まえたレビューを行う。 トリガー: "cc-code-review", "ccでレビュー", "別の視点でレビュー", "セカンドオピニオン" 使用場面: (1) PRのコードレビュー (2) ブランチ差分のレビュー (3) 特定ファイルのレビュー (4) 現在の変更のレビュー
tools
Comprehensive guide for the `wtp` (Worktree Plus) CLI by satococoa — an enhanced Git worktree manager. Use this whenever the user wants to create, list, remove, or navigate Git worktrees with wtp, mentions `wtp add`/`wtp cd`/`wtp list`/`wtp remove`/`wtp exec`, asks about automatic worktree paths from branch names, post-create hooks (copy/symlink/command) in `.wtp.yml`, branch tracking for worktrees, or shell integration (`wtp shell-init`, `wtp hook`, tab completion, auto-cd). Trigger this even when the user just describes the workflow — e.g. 'spin up a worktree for this feature branch', 'jump to my auth worktree', 'clean up the worktree and its branch' — without naming wtp explicitly, as long as wtp is the available tool.
tools
Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).
data-ai
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.