Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .agents/skills/update-main/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: update-main
description: Safely updates the primary, non-linked checkout of this repository to the latest origin/main. Use when the user explicitly invokes $update-main or asks to fast-forward their ordinary main checkout; never use for a Codex-managed or other linked worktree.
---

# Update Main

Update only an ordinary checkout's `main` branch through the repository-owned
`./worktree --update-main` command.

1. Resolve and enter the checkout root with `git rev-parse --show-toplevel`.
2. Read the absolute Git directory and common Git directory:

```bash
git rev-parse --absolute-git-dir
git rev-parse --path-format=absolute --git-common-dir
```

Refuse to continue when they differ. That identifies a linked worktree;
direct the user to its **Update to latest main** environment action instead.
3. Require `git branch --show-current` to equal `main`. Refuse detached HEADs
and other branches rather than moving them.
4. Require `git status --porcelain` to be empty. Report the changed paths and
stop when the checkout has local changes.
5. Record `git rev-parse --short=8 HEAD`, then run `./worktree --update-main`
from the checkout root. Do not replace it with `git pull`, a merge, or a
rebase: the script owns fetching, ancestry checks, and the fast-forward-only
update.
6. Report whether the checkout was already current or the old and new short
commit IDs. Preserve and surface any refusal from the script.

Never commit, push, stash, discard changes, or switch branches as part of this
skill.
7 changes: 7 additions & 0 deletions .agents/skills/update-main/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
interface:
display_name: "Update to Latest Main"
short_description: "Safely fast-forward the primary checkout main"
default_prompt: "Use $update-main to update this primary checkout to the latest origin/main."

policy:
allow_implicit_invocation: false
Loading