codex/profiles/hm-m1-mac/skills/worktree/SKILL.md
git worktree で隔離された作業環境を作成する。Claude command /worktree 相当を Codex CLI で実行する。
npx skillsauth add seika139/dotfiles worktreeInstall 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.
この skill は Claude command /worktree から変換した Codex 用 command skill です。
Codex CLI では /worktree ではなく、$worktree または /skills からこの skill を呼び出してください。
引数は $worktree の後ろに自然文として続けます。
$worktree <arguments>
元 prompt 内の $ARGUMENTS や slash command 表記は、$worktree の後ろに書かれた引数として解釈してください。
Claude 専用の allowed-tools メタデータや ! command interpolation は Codex では自動適用されないため、必要な情報は通常の shell command で確認してください。
git worktree を使って作業ディレクトリを分離し、未コミットの変更の競合を防止します。
Codex には EnterWorktree / ExitWorktree 相当の専用ツールがないため、通常の git worktree コマンドで作成・削除し、以降の操作では作成した worktree のパスを明示的に作業対象として扱います。
/worktree [worktree 名] [--exit] [--exit-remove]
worktree 名: 指定した名前で git worktree を作成する。例: /worktree fix-auth-bug--exit: 現在記録している worktree を保持したまま、以降の作業対象を元のリポジトリに戻す--exit-remove: 現在記録している worktree を削除して、以降の作業対象を元のリポジトリに戻すgit rev-parse --show-toplevel で元リポジトリのルートを取得するgit branch --show-current でベースブランチを取得するgit status --porcelain で未コミット変更を確認する。未コミット変更がある場合はユーザーに警告し、続行確認を取るworktree 名 が指定されていればそれを使う。指定がなければ、以下のように生成する。
BASE_BRANCH=$(git branch --show-current)
WORKTREE_NAME="${BASE_BRANCH:-worktree}-$(date +%Y%m%d-%H%M%S)"
worktree は元リポジトリの親ディレクトリに置く。
REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$REPO_ROOT")
WORKTREE_PARENT="$(dirname "$REPO_ROOT")/${REPO_NAME}-worktrees"
WORKTREE_PATH="${WORKTREE_PARENT}/${WORKTREE_NAME}"
BRANCH_NAME="${WORKTREE_NAME}"
mkdir -p "$WORKTREE_PARENT"
git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH" HEAD
ブランチが既に存在する場合は、ユーザーに確認してから既存ブランチを使う。
git worktree add "$WORKTREE_PATH" "$BRANCH_NAME"
以下をユーザーに報告し、このセッションでは WORKTREE_PATH を以降の作業対象として扱う。
Worktree を作成しました。
- 作業ディレクトリ: {worktree のパス}
- ブランチ: {作成されたブランチ名}
- ベース: {元のブランチ名}
作業が終わったら:
- /worktree --exit -> worktree を保持して元のリポジトリに戻る
- /worktree --exit-remove -> worktree を削除して元のリポジトリに戻る
git status --porcelain を確認し、未コミット変更がある場合はユーザーに警告するWorktree を保持したまま元のリポジトリに戻りました。
- 保持された worktree: {パス}
- 保持されたブランチ: {ブランチ名}
git status --porcelain を確認するgit worktree remove {worktree のパス} を実行するrm -rf {worktree のパス} を実行する削除成功時:
Worktree を削除して元のリポジトリに戻りました。
/worktree を実行してから作業を開始する/worktree fix-login, /worktree add-apigit merge {ブランチ名} を実行するtools
git worktree で隔離された作業環境を作成する。Claude command /worktree 相当を Codex CLI で実行する。
tools
AI ペルソナで Playwright MCP 経由の UX レビューを実施する。Claude command /ux-review 相当を Codex CLI で実行する。
tools
汎用的なフォントを避け、デザイン性の高いタイポグラフィを選択してフロントエンドの質を向上させるスキル。UI制作やLP作成時に使用します。
tools
Issue を作成(または既存 Issue を指定)し、実装して PR を作成する。Claude command /solve-issue 相当を Codex CLI で実行する。