home/dot_agents/skills/git-filter-path/SKILL.md
指定パスをgitコミット履歴から完全に除去する(ローカルファイルは保持)。
npx skillsauth add kryota-dev/dotfiles git-filter-pathInstall 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.
git filter-repo を使用して、指定パスを全コミット履歴から除去します。
ローカルファイルは退避・復元により保持されます。push はユーザーに委任します。
引数 $ARGUMENTS で対象パスを受け取ります。引数が空の場合はエラーを表示して終了します。
git rev-parse --is-inside-work-tree
git リポジトリ内でない場合はエラーを表示して終了します。
which git-filter-repo
見つからない場合は brew install git-filter-repo を案内して終了します。
git log --oneline --all -- <path>
履歴にパスが含まれない場合はエラーを表示して終了します。 該当コミット数を記録します。
ls -la <path>
ワーキングツリーにファイルが存在するか確認します。 存在しない場合は退避・復元が不要であることを記録します。
git remote -v
リモート URL を記録します(git filter-repo 実行後にリモートが削除されるため)。
git branch --show-current
AskUserQuestion ツールを使用して、以下の情報を提示し実行可否を確認します。
提示する情報:
警告事項:
git push --force が必要git filter-repo 実行時にリモートが一時的に削除される選択肢:
ユーザーがキャンセルした場合は処理を終了します。
ワーキングツリーにファイルが存在する場合のみ実行します。
タイムスタンプを生成します:
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
退避先ディレクトリを作成してファイルをコピーします:
BACKUP_DIR="/tmp/git-filter-path-${TIMESTAMP}"
mkdir -p "$BACKUP_DIR"
cp -r <path> "$BACKUP_DIR/"
退避が完了したことを報告します。
git filter-repo --path <path> --invert-paths --force
退避を行った場合のみ実行します。
必要に応じて親ディレクトリを作成し、退避先からワーキングツリーへ復元します:
mkdir -p <path の親ディレクトリ>
cp -r "$BACKUP_DIR/<basename>" <path>
復元後、退避元と復元先のファイル数が一致することを確認します。
ステップ 1-6 で記録したリモート URL を再追加します:
git remote add origin <記録した URL>
以下を報告します:
ユーザーへの push 指示:
git push --force origin <ブランチ名>
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.