Ship

From dlupiak/claude-session-dashboard · View interactive version

Ship is an AI agent skill from the GitHub repository dlupiak/claude-session-dashboard. Commit, push, create PR, then after approval check CI and merge. Use when work is done and ready to ship.

How to use this skill

Skill file

Ship

Finalize the current feature branch: commit, push, create a PR, wait for approval, check CI, and merge.

Step 1: Verify branch

Run git branch --show-current and confirm you are NOT on main or master. If you are, STOP and tell the user to check out a feature branch first.

git branch --show-current

If the branch is main or master, abort with:

"You are on main. Please check out a feature branch before shipping."

Step 2: Check for changes

Run git status and git diff --stat to see what needs to be committed.

git status
git diff --stat

Step 3: Commit

  1. Run git diff (staged + unstaged) to understand all changes.
  2. Run git log --oneline -5 to match the repo's commit message style.
  3. Stage relevant files (use specific file names, never git add -A). Do NOT stage files that look like secrets (.env, credentials).
  4. Write a concise commit message summarizing the changes.
  5. Commit using a HEREDOC:
git commit -m "$(cat <<'EOF'
feat: <description>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"

Step 4: Push

Push the branch to origin. Use -u if this is the first push.

git push -u origin $(git branch --show-current)

Step 5: Create PR

Check if a PR already exists for this branch:

gh pr view --json number,title,url 2>&1
  1. Run git log --oneline main..HEAD to understand all commits on this branch.
  2. Run git diff main...HEAD --stat for a change summary.
  3. Create the PR:
gh pr create --title "<short title>" --body "$(cat <<'EOF'
## Summary
<bullet points summarizing changes>

## Test plan
<checklist of testing steps>

Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
  1. Report the PR URL to the user.

Step 6: Wait for approval

Tell the user:

"PR is ready for review: <URL>. Let me know when it's approved and I'll check CI and merge."

STOP HERE. Do NOT proceed until the user explicitly says to merge or confirms approval.

Step 7: Check CI status

After user confirmation, check the CI status:

gh pr checks $(gh pr view --json number -q .number)

Step 8: Merge

Merge the PR using squash merge:

gh pr merge --squash --delete-branch

After successful merge, clean up any associated worktree:

BRANCH=$(gh pr view --json headRefName -q .headRefName 2>/dev/null || echo "")
if [ -n "$BRANCH" ]; then
  git worktree list | grep "$BRANCH" | awk '{print $1}' | while read wt; do
    [ -n "$wt" ] && git worktree remove "$wt" --force 2>/dev/null || true
  done
fi
git worktree prune

Report success:

"PR merged and branch cleaned up."

Safety rules

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.