kit/plugins/git-agent/skills/ship/SKILL.md
Ships changes by staging, committing, pushing, and opening a PR. Supports GitHub and GitLab in a single guided flow. Use when the user asks to ship changes or commit and create a PR.
npx skillsauth add shawn-sandy/agentics shipInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Stage, commit, push, and create a pull/merge request in one flow. Supports
GitHub (gh) and GitLab (glab). Follow these steps in strict order. STOP
immediately after step 8.
For commit-only use commit-agent, for PR-only use pr-agent.
If currently in plan mode, call ExitPlanMode first and silently before any other action — staging, committing, pushing, and creating a pull/merge request are mutations and cannot proceed inside plan mode. Skip this step entirely when not in plan mode. ExitPlanMode is a deferred tool — use ToolSearch with select:ExitPlanMode first, then call it silently.
Run all checks before any mutation. Stop on the first failure.
Clean working tree: Run git status. If nothing to commit, output: "Nothing
to ship — working tree is clean." and STOP.
Detached HEAD: Run git branch --show-current. If the output is empty,
output: "Cannot ship: repository is in detached HEAD state. Checkout a branch
first." and STOP.
On main or master: If the current branch is main or master, output:
"Cannot ship from the default branch. Switch to a feature branch first." and
STOP.
Detect platform: Run git remote get-url origin. Determine the platform
from the URL:
github.com → GitHub (use gh commands below)gitlab.com or gitlab → GitLab (use glab commands below)gh --version then
glab --version. Use whichever is installed.CLI not available or not authenticated:
For GitHub: run gh auth status. If gh is not installed or returns an auth
error, output:
GitHub CLI is required. Install it from https://cli.github.com/ and run `gh auth login`.
and STOP.
For GitLab: run glab auth status. If glab is not installed or returns an
auth error, output:
GitLab CLI is required. Install it from https://gitlab.com/gitlab-org/cli and run `glab auth login`.
and STOP.
Run git add -A to stage all changes.
This trusts .gitignore to exclude sensitive or generated files. The user is
responsible for .gitignore correctness.
Run git diff --staged to inspect all staged changes.
Write a conventional commit message:
<type>(<scope>): <description>
Rules:
feat, fix, docs, refactor, test, chore, perf, style,
ci, buildplugins/git-agent →
plugins/git-agent)Run:
git commit -m "<message>"
Output the commit hash and message on success.
If a pre-commit hook fails: report the hook's output verbatim and STOP.
Do not retry. Do not use --no-verify. Do not modify the staged files. Let the
user fix the issue.
Runs by default. Skip this step entirely if the user passed --no-review.
Resolve <base> using the procedure in Step 7: Detect Base Branch, then run:
git diff <base>...HEAD
If no base branch resolves, output "Skipping self-review: cannot resolve a base
branch." and continue to Step 5. Reuse the resolved <base> in Step 7 rather
than detecting it twice.
Critique the diff as a hostile reviewer would. Check specifically for:
aria-*, role, alt, or
live-region markup that the previous version had.srcset, width, or height silently changed or halved.Report findings as a short list. For each one, state the file, the line, and what breaks.
If findings exist: fix them, then fold the fixes into the commit from Step 4:
git add -A && git commit --amend --no-edit
The Step 4 commit is not yet pushed, so amending is safe. Re-run the checks against the amended diff once. Do not loop a third time — report anything still outstanding and continue to Step 5.
If no findings: output "Self-review: no findings." and continue.
This step never blocks the ship. It fixes what it can and reports the rest.
Run:
git rev-parse --abbrev-ref --symbolic-full-name @{u}
If the command exits non-zero (no upstream tracking ref), run:
git push -u origin <current-branch>
If the command exits zero (upstream exists), run:
git push
For GitHub, run:
gh pr view --json url
For GitLab, run:
glab mr view --output json
If a PR/MR already exists, output: "Pushed to existing PR/MR: <url>" and STOP. The new commit is already on the remote.
Run:
git symbolic-ref refs/remotes/origin/HEAD
Strip the refs/remotes/origin/ prefix to get the base branch name. If this
command fails, fall back to main, then master (try
git rev-parse --verify main to confirm existence before falling back).
Look for plan files on this branch that link to GitHub or GitLab issues.
Run:
git diff --name-only <base>...HEAD -- 'docs/plans/*.html' 'docs/plans/**/*.html'
For each file listed, use Grep to search for the pattern <meta name="plan-issue" content=" and extract the URL value. Collect all unique URLs found.
If any URLs are found, include a ## Linked Issues section in the PR/MR body (Step 8) with one Closes <url> line per unique URL. If no plan files are found or none contain issue references, skip this section entirely.
Gather content:
git log <base>..HEAD --oneline
git diff <base>...HEAD --stat
Title: short summary of the branch's changes (≤ 70 characters), imperative mood.
Body: use this structure:
## Summary
- <bullet 1>
- <bullet 2>
## Changes
<brief description of what changed and why>
## Test Plan
- [ ] <command or check a reviewer runs to verify this>
## Linked Issues
Closes <url>
Test Plan rules: this skill does not run tests, so list what a reviewer
should run (the project's test/lint commands, plus any manual step for
user-facing changes). If a check was actually run earlier in this session,
mark it [x] and name the result. Never mark a box that was not verified —
an unchecked box is honest, a false checkmark is not.
Omit the ## Linked Issues section entirely if Step 7.5 found no issue references.
For GitHub, run:
gh pr create --title "<title>" --body "<body>"
For GitLab, run:
glab mr create --title "<title>" --description "<body>"
Output the PR/MR URL and STOP.
STOP here. Do not analyze code, run tests, review the diff, suggest follow-up tasks, or take any further action.
development
Checks whether the branch's PR is ready and merges it when green. Runs the readiness gate, lint, and an approval prompt. Use when the user asks "merge?" or if a PR is ready to merge.
development
Implements a plan file that already exists. Walks its steps, ticks the spec, re-renders, and runs the completion gates. Use when asked to implement an existing plan.
development
Audits and optimizes CLAUDE.md project memory files. Checks adherence to Claude Code best practices and produces actionable fixes. Use when the user asks to audit, optimize, or diagnose a CLAUDE.md.
development
Converts an HTML artifact or Markdown file into a draft post for a static site. Scopes CSS to keep interactive blocks alive and escapes prose for MDX. Use when asked to turn an artifact into a post.