cf-ship · git:20260614.7effc63 · 2026-06-14 · sha256 32a8de148ba352ea

cf-ship git:20260614.7effc63A

Immutable. This exact content is served forever at /api/v1/blob/32a8de148ba352ea.

---
name: cf-ship
description: >
  Verify, commit, push, and create PR. Use when the user wants to ship their work — e.g.
  "ship it", "push and create PR", "let's ship", "deploy this", "send it", "push my changes",
  "create a PR", "open a pull request", "ready to merge", "let's get this merged".
  Also triggers when the user is done with a feature branch and wants the full
  verify → commit → push → PR workflow. Supports --dry-run to preview without pushing.
disable-model-invocation: true
created: 2026-02-17
updated: 2026-06-06
---

# $cf-ship

> **CLI Requirement:** NONE — Works without `coding-friend-cli`. See [CLI requirements](../../../docs/cli-requirements.md) for the full matrix.

Ship the current work. Hint: **$ARGUMENTS**

## Workflow

### Step 0: Custom Guide & Flags

Run: `bash "${PLUGIN_ROOT}/lib/load-custom-guide.sh" cf-ship`

If output is not empty, integrate returned sections: `## Before` → before first step, `## Rules` → apply throughout, `## After` → after final step.

**Dry-run check**: If `$ARGUMENTS` contains `--dry-run`, enter simulation mode — run all steps below but **do not execute** any destructive action (no commit, no push, no PR creation). Prefix each step's output with `[dry-run]` and show what **would** happen. At the end, print:

```
🏃 DRY RUN COMPLETE — nothing was pushed or created.
```

### Step 1: Verify

Load the `cf-verification` skill and run the full checklist:

- [ ] Tests pass
- [ ] Build succeeds
- [ ] Linter clean
- [ ] No console errors

If ANY check fails, stop and fix before proceeding.

### Step 2: Commit

If there are uncommitted changes:

1. Run the `$cf-commit` workflow (load the `cf-commit` skill)
2. Use `$ARGUMENTS` as commit hint if provided

### Step 3: Push

```bash
git push -u origin <current-branch>
```

If push fails (e.g., remote ahead), pull first:

```bash
git pull --rebase origin <current-branch>
git push
```

### Step 4: Create PR (if on a feature branch)

**Guard:** If current branch is `main` or `master`, warn the user and skip this step — do NOT push directly to the main branch.

Try `gh` first, fall back to a manual link if `gh` is not installed:

**PR title:** Use conventional commit style, under 70 chars. Derive from the commit(s) on the branch.

```bash
gh pr create --title "<type>(<scope>): <summary>" --body "<body>"
```

If `gh` is not available, tell the user to create the PR manually and provide the URL:

> `gh` CLI not found. Please create a PR manually:
> https://github.com/<owner>/<repo>/compare/<branch>?expand=1

PR body template:

```
## Summary
<1-3 bullet points describing the changes>

## Test plan
- [ ] Tests pass
- [ ] Manual verification done
```

### Step 5: Report

Show the user:

- Commit SHA
- Push result
- PR URL (if created)

## Rules

- NEVER force push unless explicitly asked
- NEVER push to main/master directly
- ALWAYS verify before pushing
- Ask user before pushing if there are concerns
- NEVER include AI/agent attribution in commits or PRs (no "Co-Authored-By", "Generated by", "Claude", "Copilot", "AI-assisted", etc.)