Skip to main content
ClaudeWave
Skill336 estrellas del repoactualizado 6d ago

ship

Ship is a Claude Code skill that commits staged changes, optionally pushes them to a remote branch, and can create or update a pull request. Use it when a user requests to "ship," "ship it," "ship changes," or similar variants to streamline their workflow from staged changes through to a completed PR or pushed commit.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/tobihagemann/turbo /tmp/ship && cp -r /tmp/ship/claude/skills/ship ~/.claude/skills/ship
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Ship

Commit, push, and optionally create or update a PR for the current staged changes.

## Task Tracking

At the start, use `TaskCreate` to create a task for each phase:

1. Determine intent
2. Branch (if needed)
3. Stage unstaged changes
4. Run `/commit-rules` skill
5. Commit
6. Push (if requested)
7. Create or update PR (if requested)

## Step 1: Determine Intent

Detect the repository state:

- Default branch: `gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'`
- Current branch name, and whether it tracks an upstream
- Whether a PR already exists for the current branch (`gh pr view`)

Sample the prevailing workflow from recent default-branch history (`git log --first-parent origin/<default-branch> -n 30 --pretty=%s`): judge whether changes mostly land through pull requests (merge-PR commits or `(#N)`-suffixed squash commits) or are committed directly to the default branch.

Output a one-line summary of the detected state as text. Then use `AskUserQuestion` to choose how to proceed, offering these options:

- **Commit, push, and create/update the PR** — say "create a PR" when no PR exists for the current branch and "update the PR" when one does; on the default branch, Step 2 creates a feature branch first
- **Commit and push** — commit, then push to the current branch's remote
- **Commit only** — commit the staged changes, do not push

Recommend the option that fits this repo by listing it first and labeling it `(Recommended)`: when the current branch already has a PR, recommend updating it; otherwise follow the prevailing workflow — recommend the PR path for a PR-based history, or commit and push for a direct-commit history.

If the user declines (chooses the free-form "Other" option or asks to abort), leave the changes staged and do not commit.

## Step 2: Branch (if Needed)

If the chosen option creates a PR and the current branch is the default branch:

1. Suggest a branch name based on the changes and use `AskUserQuestion` to confirm or adjust
2. Create and switch to the new branch: `git checkout -b <branch-name>`

## Step 3: Check for Unstaged Changes

Run `git status` to check for unstaged changes. If any exist, stage them. This catches files modified by auto-formatters that were not re-staged.

## Step 4: Run `/commit-rules` Skill

Run the `/commit-rules` skill to load commit message rules and technical constraints.

## Step 5: Commit

Commit the already-staged changes (do not stage additional files) with a message following the loaded rules.

If the commit fails due to a pre-commit hook (formatter, linter), fix the issues — or run the project's format/lint script to auto-fix — then **re-stage all modified files** before retrying. Pre-commit hooks may modify files in the working tree without updating the staging area.

## Step 6: Push (if Requested)

If the chosen option includes pushing, push to the current branch's remote:

```bash
git push
```

## Step 7: Create or Update PR (if Requested)

- **Create PR** — run the `/create-pr` skill
- **Update PR** — run the `/update-pr` skill

Then use the TaskList tool and proceed to any remaining task.

## Rules

- Run the `/commit-rules` skill before every commit; do not commit without loading it first.
- Never stage or commit files containing secrets (`.env`, credentials, API keys). Warn if detected.
- Don't reference `.turbo/` content (filenames, requirement IDs, shell references, headings) in branch names. `.turbo/` is gitignored, so these references would be opaque to anyone reading without local copies.
answer-reviewer-questionsSkill

For each reviewer question on a PR, recall implementation reasoning and compose a raw answer. Use when the user asks to \"answer reviewer questions\", \"draft answers to PR questions\", or \"explain reviewer questions\".

apply-findingsSkill

Apply findings by making the suggested code changes. Applies accepted verdicts, escalates ambiguous findings to the user, and offers to note genuine improvements for later. Use when the user asks to \"apply findings\", \"apply fixes\", \"apply suggestions\", \"apply accepted findings\", \"fix the findings\", or \"apply the review results\".

auditSkill

Project-wide health audit pipeline that fans out to all analysis skills in parallel, evaluates findings, and produces a unified report at .turbo/audit.md. Use when the user asks to \"audit the project\", \"run a full audit\", \"project health check\", \"audit my code\", \"codebase audit\", or \"comprehensive review\".

changelog-rulesSkill

Shared changelog conventions and formatting rules referenced by $create-changelog and $update-changelog. Not typically invoked directly.

code-styleSkill

Enforce mirror, reuse, and symmetry principles to keep new code consistent with surrounding code. Use when writing new code in an existing codebase, adding new features, refactoring, or making any code changes.

codex-execSkill

Run autonomous task execution using the codex CLI. Use when the user asks to \"codex exec\", \"run codex exec\", \"execute a task with codex\", or \"delegate to codex\".

codex-reviewSkill

Run AI-powered code review using the codex CLI. Use when the user asks to \"codex review\", \"run codex review\", or \"review a commit with codex\".

commit-rulesSkill

Shared commit message rules and technical constraints referenced by $stage-commit and $commit-staged. Not typically invoked directly.