agentsclimarketplace

Codex open worktree

Skill SepantaJoshani/agents-skills/skills/codex-open-worktree

Open-source agent skills for AI coding assistants

Install
npx -y skills add SepantaJoshani/agents-skills --skill codex-open-worktree

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Open any existing Git-registered worktree as a workspace in the macOS Codex desktop app, including installations branded as ChatGPT. Use when the user asks to open, switch to, move to, or continue in an existing worktree from Codex; invokes `$codex-open-worktree`; supplies a branch name, worktree directory, or worktree path; or wants Codex to discover a repository's worktrees and ask which one to open. Works with worktrees created by Git, Claude, Codex, Supacode, or other tools at any path. Opens a workspace without creating, removing, checking out, or modifying a worktree or branch.

SKILL.md

3.7 KB, as published. Nobody here has run it

Codex Open Worktree

Open a registered Git worktree in the macOS desktop app without changing Git state. Treat "switch" as "open the selected worktree in another Codex workspace" because the current task cannot be rebound to a different workspace.

Workflow

  1. Resolve the repository from the current directory unless the user supplied a repository or worktree path. If neither path is inside a Git repository, ask for one; do not search the filesystem broadly.

  2. If the user supplied a branch, worktree name, or path, run:

    python3 ./scripts/open_worktree.py --repo <repo> <selector>
    

    Resolve ./scripts/open_worktree.py relative to this SKILL.md.

    Open immediately when the selector has one exact or unique match. An explicit invocation with a unique selector authorizes this external app action; do not ask for redundant confirmation.

  3. If the user supplied no selector, run:

    python3 ./scripts/open_worktree.py --repo <repo> --list
    

    Present the registered worktrees and ask which one to open. Put a clearly implied candidate first and label it (Recommended); if intent does not distinguish a candidate, ask neutrally instead of inventing a preference. Never choose silently, even when only one alternative exists.

  4. If selection is ambiguous or missing, show the script's candidates and ask the user for one branch or path. Rerun with the exact selection after they answer.

  5. After a successful script result, report the opened branch and absolute worktree path. State that the app was asked to open that workspace and the current task remains attached to its original workspace. Stop; do not begin work in either workspace.

Safety Boundaries

  • Open only an existing directory returned by git worktree list --porcelain for the selected repository.
  • Never run Git commands that mutate worktrees, branches, the index, or files. In particular, never run git switch, git checkout, git worktree add, git worktree remove, or git worktree prune.
  • Never invoke codex app, an installer, a package manager, or a download. Use the bundled script, which calls macOS open with the installed app's stable bundle identifier only.
  • Do not claim the current conversation switched. The app opens or focuses a workspace for the selected folder; this task's workspace and branch indicator do not change.
  • Treat an explicit skill invocation with a unique selector as authorization to open that workspace. With no selector, list and ask before opening anything.
  • Treat locked worktrees like any other registered worktree. A Git worktree lock affects pruning, not whether its directory can be opened.

Script Interface

Use --dry-run to verify resolution without opening the app:

python3 ./scripts/open_worktree.py --repo <repo> --dry-run <selector>

The selector accepts an exact branch name, absolute or repository-relative path, directory name, flattened branch name such as feat-example, or a unique case-insensitive substring. The script exits without opening anything when the selector is absent, ambiguous, unmatched, or resolves to a missing directory.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.