Llc-ops_public Ship
Full delivery pipeline — preflight, commit, push, PR, merge in one command
install
source · Clone the upstream repo
git clone https://github.com/eddiebelaval/llc-ops_public
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/eddiebelaval/llc-ops_public "$T" && mkdir -p ~/.claude/skills && cp -r "$T/squire/skills/ship" ~/.claude/skills/eddiebelaval-llc-ops-public-ship && rm -rf "$T"
manifest:
squire/skills/ship/SKILL.mdsource content
Ship — Full Delivery Pipeline
Stage, commit, push, PR, merge, and verify — end-to-end shipping in one command. Respects all CLAUDE.md rules (preflight, no squash, regular merges, branch protection).
Core Workflows
Workflow 1: Full Ship (Default)
- Detect context (project, branch, base)
- Run preflight checks (typecheck, build, lint, tests)
- Stage and commit changes
- Push to remote
- Create PR
- Merge (regular merge, no squash)
- Verify merge succeeded
Usage
/ship # Ship current branch changes with auto-generated commit message /ship "feat: add auth flow" # Ship with explicit commit message /ship --no-merge # Create PR but don't merge (for review) /ship --base dev # Target a specific base branch (default: main) /ship --dry-run # Show what would happen without doing anything
Instructions
Step 0: Detect Context
- Identify: project name, current branch, base branch (default:
).main - State: "Shipping [PROJECT] | Branch: [BRANCH] -> [BASE]"
- If on
— STOP. "Cannot ship from main. Create a feature branch first."main - If working tree is clean and no commits ahead of base — STOP. "Nothing to ship."
Step 1: Preflight Checks (MANDATORY)
Run ALL checks before proceeding. If any fail, fix them before continuing.
# 1. Type check (TypeScript projects) npx tsc --noEmit 2>&1 # 2. Build npm run build 2>&1 # 3. Lint (if available) npm run lint 2>&1 # 4. Tests (if available) npm test -- --passWithNoTests 2>&1
For Python projects, substitute:
python -m py_compile <changed_files> pytest -x -q 2>&1
If any check fails:
- Fix the issue
- Re-run the failing check
- Maximum 2 fix attempts per check — if still failing after 2 fixes, STOP and report
If
--dry-run: Show preflight results and exit.
Step 2: Stage and Commit
- Check
for unstaged/untracked changes.git status - Stage relevant files (prefer specific files over
):git add -A- NEVER stage
, credentials, or secret files.env - NEVER stage
,node_modules/
,.next/
,dist/__pycache__/
- NEVER stage
- If no commit message was provided in args:
- Analyze the diff to generate a descriptive commit message
- Follow the project's commit convention:
- ID8 Pipeline projects:
[Stage N: Name] type: description - Other projects: conventional commits (
,feat:
,fix:
, etc.)refactor:
- ID8 Pipeline projects:
- End with
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- If a commit message WAS provided, use it exactly (still append Co-Authored-By).
Use HEREDOC for the commit message:
git commit -m "$(cat <<'EOF' commit message here Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> EOF )"
Step 3: Push
- Check if branch has an upstream:
git rev-parse --abbrev-ref @{upstream} 2>/dev/null - If no upstream:
git push -u origin [BRANCH] - If upstream exists:
git push - Verify push succeeded.
Step 4: Create PR
- Check if a PR already exists for this branch:
gh pr list --head [BRANCH] --state open - If PR exists: skip creation, show existing PR URL.
- If no PR:
- Generate title from commit(s) — keep under 70 characters
- Generate body with:
## Summary <1-3 bullet points from the diff> ## Verification - Build: PASS - TypeCheck: PASS - Tests: PASS/SKIPPED - Lint: PASS/SKIPPED Generated with [Claude Code](https://claude.com/claude-code) - Create:
gh pr create --title "..." --body "..." --base [BASE]
Step 5: Merge (unless --no-merge)
- Wait for CI checks if any are running:
gh pr checks [PR_NUMBER] --watch- Timeout after 5 minutes — if still pending, report and skip merge
- NEVER squash merge. Always use:
gh pr merge [PR_NUMBER] --merge - If merge fails (conflicts, failed checks):
- Report the failure
- Do NOT force merge
- Exit with the PR URL so the user can review
Step 6: Cleanup and Report
- After successful merge:
git checkout [BASE] && git pull- Delete the feature branch:
git branch -d [BRANCH] - Delete remote branch:
(only if we created it this session)git push origin --delete [BRANCH]
- Output final report:
Ship Complete ============= Branch: [BRANCH] -> [BASE] Commit: [SHORT_SHA] [message] PR: [URL] Merged: YES/NO Build: PASS Tests: PASS/SKIPPED Cleanup: local branch deleted, remote branch deleted
If
--no-merge:
PR Created (not merged) ======================= Branch: [BRANCH] -> [BASE] Commit: [SHORT_SHA] [message] PR: [URL] Status: Ready for review Merge manually: gh pr merge [NUMBER] --merge
Rules
| Rule | Why |
|---|---|
| NEVER ship from main | Branch protection — always use feature branches |
| NEVER squash merge | Preserves granular commit history (CLAUDE.md rule) |
| Preflight is mandatory | Build/test/lint must pass before push |
| Never stage secrets | .env, credentials, API keys stay local |
| Never force merge | If it conflicts, the user decides |
| Always use --merge flag | Regular merges, not squash or rebase |
| Report PR URL | the user needs the link for tracking |