Git ship

From hartphoenix/weft · View interactive version

Git ship is an AI agent skill from the GitHub repository hartphoenix/weft. Ships working changes: stage, commit, create PR via gh. Accepts --merge to squash-merge after PR creation, and --dry-run to preview without executing.

How to use this skill

Skill file

/git-ship

Stage → commit → push → PR in one invocation.

Flags

| Flag | Effect |

|------|--------|

| --merge | Squash-merge the PR and delete the branch after creation |

| --dry-run | Show the plan without executing |

Workflow

1. Preflight (parallel)

Run simultaneously:

Gate: if current branch already has an open PR, stop. Report:

"Branch already has an open PR. Create a fresh branch for new changes."

Gate: if on main/master, stop. "Cannot ship directly to main.

Create a feature branch first."

2. Group and filter changes

"Skipping unrelated changes: [file list]"

Never stage .env, credentials, or secrets files.

3. Choose branch

On feature branch + changes fit       → stay
On feature branch + changes don't fit → find or create matching branch

Finding a match: scan local and remote branch names. Confirm with

user before switching.

Creating: generate a descriptive slug (e.g., fix-auth-redirect).

Confirm name with user. git checkout -b <slug>.

4. Commit

style from step 1

5. Push + PR

Use AskUserQuestion: "Ready to push and open PR for <branch>."

Options: Push / Abort. On abort, stop.

After confirmation:

— inferred title from branch name and commits, brief body summarizing

changes. Report the returned URL.

(gh pr create is a fallback only — the sandbox's keychain deny rule

breaks Go's TLS verification for gh's API calls; see

.claude/references/ghx-shim.md for the root cause.)

6. Merge (--merge flag only)

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.