← Back to list

ship
by lynnswap
⭐ 0🍴 0📅 Jan 22, 2026
SKILL.md
name: ship description: Create a new branch from the current branch, push the branch, commit all local changes (including untracked files), push commits, and open a PR back to the original branch. Use when the user asks to move the current work to a new branch and open a PR to the branch they started from.
Ship
Overview
Move in-progress work to a new branch, push it, commit all changes, push commits, and open a PR back to the branch that was checked out when the request started.
Workflow
-
Capture the base branch.
- Run
git rev-parse --abbrev-ref HEADand store it asbase_branch. - If HEAD is detached, ask the user for the base branch and set
base_branchto that. - If a merge or rebase is in progress, stop and ask the user to resolve it first.
- Run
-
Decide the new branch name.
- If the user specifies a name, use it.
- Otherwise, generate it with these rules:
- Choose a prefix from the request keywords:
bugfix/for bug/fix/crash/errorrefactor/for refactordocs/for docstest/for test- Otherwise use
feature/
- Build a short topic slug from the request or a quick summary of the work.
- Lowercase, ASCII, hyphenated, max ~50 chars.
- If no topic is available, use
auto-YYYYMMDD-HHMM. - Combine to
<prefix><topic>.
- Choose a prefix from the request keywords:
- Ensure the name is unique:
- If
git show-ref --verify --quiet refs/heads/<name>succeeds, append-2,-3, ... - Also check remote with
git ls-remote --heads origin <name>.
- If
-
Create the branch.
- Run
git switch -c <new_branch>(orgit checkout -b <new_branch>if needed).
- Run
-
Push the new branch (before committing).
- Use
originby default. Iforiginis missing, pick the first remote fromgit remoteand note it. - Run
git push -u <remote> <new_branch>.
- Use
-
Stage all changes (including untracked files).
- Ensure editor buffers are saved; if unsure, ask the user to save before continuing.
- Run
git add -A. - If
git status --porcelainis empty after staging, stop and report "no changes".
-
Commit everything.
- If the user provides a commit message, use it.
- Otherwise, map the prefix to a conventional type:
feature/->feat: <topic>bugfix/->fix: <topic>docs/->docs: <topic>refactor/->refactor: <topic>test/->test: <topic>- Otherwise
chore: <topic>
- Convert the topic slug to words (replace
-with spaces). - If the topic is
auto-..., usesnapshotinstead. - Run
git commit -m "<message>".
-
Push commits to the remote.
- Run
git push <remote> <new_branch>.
- Run
-
Create the PR.
- Title: use the commit subject line.
- Body: use this template, with a brief summary if possible:
- Summary:
- Move current work to <new_branch>(fallback if no better summary)
- Testing:
- Not run (not requested)unless the user asked for tests
- Summary:
- Run
gh pr create -B <base_branch> -H <new_branch> -t "<title>" -b "<body>".
-
Return to the base branch and report results.
- Run
git switch <base_branch>. - Report the new branch name and the PR URL.
- Run
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon