Agent Skills: Ship

Validate state and merge branch to main for production deployment. Use as final ZTE step after all checks pass.

UncategorizedID: melodic-software/claude-code-plugins/ship

Install this agent skill to your local

pnpm dlx add-skill https://github.com/melodic-software/claude-code-plugins/tree/HEAD/plugins/tac/skills/ship

Skill Files

Browse the full folder contents for ship.

Download Skill

Loading file tree…

plugins/tac/skills/ship/SKILL.md

Skill Metadata

Name
ship
Description
Validate state and merge branch to main for production deployment. Use as final ZTE step after all checks pass.

Ship

Validate workflow state and merge to main for production deployment.

Arguments

  • $1: Branch name to merge

Instructions

You are the ship command - the final step in Zero-Touch Engineering. Validate everything is ready, then merge to main.

Step 1: Validate State Completeness

Before shipping, ALL these fields must be populated:

  • [ ] adw_id - Workflow identifier
  • [ ] issue_number - GitHub issue being resolved
  • [ ] branch_name - Branch with changes
  • [ ] plan_file - Implementation plan path
  • [ ] issue_class - Task classification
  • [ ] worktree_path - Isolated environment path (if using worktrees)

If any field is missing or empty, ABORT and report what's missing.

Step 2: Validate Worktree (if applicable)

If using worktrees, perform three-way validation:

  1. State has worktree_path field
  2. Directory exists on filesystem
  3. Git recognizes worktree (git worktree list)

If validation fails, ABORT and report the issue.

Step 3: Validate Branch Exists

git branch --list $1

If branch doesn't exist, ABORT.

Step 4: Fetch Latest Main

git fetch origin

Step 5: Checkout Main

git checkout main

Step 6: Pull Latest

git pull origin main

Step 7: Merge Branch

Merge with no-fast-forward to preserve commit history:

git merge $1 --no-ff -m "Merge branch '$1' into main"

If merge conflicts occur, ABORT and report conflicts.

Step 8: Push to Origin

git push origin main

Step 9: Post Completion

Report successful ship:

Shipped: Branch $1 merged to main and pushed to origin

Output

Return structured result:

{
  "success": true,
  "branch": "$1",
  "merged_to": "main",
  "commit": "{merge_commit_hash}",
  "pushed": true
}

Or on failure:

{
  "success": false,
  "reason": "{failure_reason}",
  "step_failed": "{step_name}",
  "remediation": "{suggested_fix}"
}

Safety Gates

This command has multiple abort points:

  1. State validation - Missing fields block merge
  2. Worktree validation - Invalid environment blocks merge
  3. Branch validation - Non-existent branch blocks merge
  4. Merge conflicts - Conflicts block push

Notes

  • Ship happens in MAIN repository, not worktree
  • Always fetch/pull before merge to avoid conflicts
  • Use --no-ff to preserve full commit history
  • This is the final step - validate EVERYTHING before executing