Skills
Ship a completed branch to a pull request with ak:ship
Merge the target branch, run release gates, update release artifacts, commit every intended change, push, create or update an evidence-rich PR, and optionally run reviewed merge with CI convergence.
Use ak:ship when implementation on a feature branch is complete and you want
one workflow to prepare it for review. The Skill synchronizes the target branch,
runs test and review gates, updates applicable release artifacts, commits and
pushes the branch, then creates or updates an evidence-rich GitHub pull request.
With --merge, it hands that PR to ak:review-pr for review, fixes, replies,
merge, and CI convergence. Without --merge, it does not merge the PR. It never
deploys the application.
Choose ak:ship for PR preparation
Use ak:ship when
- The branch is complete enough to enter official or beta review.
- You want tests, pre-landing review, versioning, changelog, documentation, Git, issue linkage, and PR creation coordinated in one pipeline.
- The repository uses GitHub and the branch can be pushed normally.
- You are ready for every current worktree change to be considered for the ship commit.
Choose another workflow when
- You still need implementation. Use
ak:cook. - You only need local verification or review. Use
ak:testorak:code-review. - The pull request already exists and only needs review, repair, reply, or merge.
Use
ak:review-pr. - You want to publish a built application. Use
ak:deployafter the release gates and repository policy allow it.
Prepare the branch and GitHub access
Before you start:
- Complete Onboarding, and confirm Engineer Kit is installed for the current runtime and scope.
- Run from a feature branch, never the intended target branch.
- Inspect
git status, including untracked files. Move unrelated work out of the worktree because the pipeline intentionally includes all changes. - Ensure the target remote branch and the project's test command are available.
- Install and authenticate
ghwith issue and pull-request permissions, and confirm normal Git push access to the feature branch. - Decide whether version, changelog, journal, docs, issue creation, plan state, commit, push, and PR writes are all intended.
| Runtime | Invocation | Availability boundary |
|---|---|---|
| Claude Code | /ak:ship ... | Native execution can coordinate Git, GitHub CLI, file writes, tests, review, and background journal or docs tasks. |
| Cursor | /ak:ship ... | Slash invocation is user-verified; equivalent delegation, background tasks, prompts, and long-running GitHub behavior depend on Cursor. |
| Codex | $ak:ship ... | Native discovery is supported; broader parity for delegated Agents, background work, GitHub credentials, and approval prompts is not implied. |
Select the release path and gates
| Input or option | Effect | Important boundary |
|---|---|---|
| No mode | Infers official for feature/*, hotfix/*, or bugfix/*; beta for dev/*, beta/*, or experiment/* | Asks when branch naming is unclear |
official, stable, or main | Normalizes to official and targets the detected default branch | Aliases select the mode, not a literal branch name |
beta, dev, or next | Normalizes to beta and targets the first detected dev, beta, or develop branch | Automatically skips the docs-update stage |
--both | Runs the beta stage first, then a gated stable stage | Supersedes a positional mode; the stable stage never bypasses branch protection |
--advice | Runs the ship-to-PR path under advisory-only kongming supervision | Counsel does not replace tests, review, or security gates |
--merge | After PR creation, runs ak:review-pr <PR> --fix --reply --merge | Requires an approved review, merge, and green post-merge CI before completion |
--skip-tests | Omits the test gate | Use only when equivalent evidence already exists and record that evidence in the PR |
--skip-review | Omits pre-landing review | Leaves review risk explicit; it does not imply approval |
--skip-journal | Omits the background technical journal and the entire social step | No social draft, dry-run rendering, or publication occurs; code and PR evidence gates are unchanged |
--skip-docs | Omits the docs-update task | Confirm the change has no required documentation impact |
--social | After the PR reaches its required green gate, composes a build-in-public journal draft for configured social channels | Opt-in only; without --yes-post, it renders posts without making an API call |
--yes-post | Allows --social to publish instead of rendering only | Has no publishing effect without --social |
--yes-post-private | Adds the second explicit opt-in required to publish about a private repository | Requires both --social and --yes-post; CI must still be green |
--dry-run | Reads pre-flight state, prints the proposed pipeline, then stops | Does not delegate to kongming or ak:review-pr, mutate state, publish social content, or simulate the stable stage of --both |
Automatic technical-journal behavior resolves in this order: --skip-journal,
project journal.auto, user journal.auto, then the default true. A
preference-resolution error or any unexpected output keeps journaling enabled.
journal.auto=false skips the automatic journal but does not suppress an
explicit --social; --skip-journal still suppresses the entire social step.
/ak:ship official/ak:ship official$ak:ship officialRun --dry-run first when target detection or included files are uncertain.
Multiple or unknown mode tokens and unrecognized flags stop for clarification
instead of being guessed. A strong request states the intended target branch,
existing test evidence, version policy, related issue, files that must not ship,
and whether creating a new issue is acceptable.
Follow the observable pipeline
- Pre-flight resolves the release. The Skill normalizes mode aliases and
checks the current branch, target, status, diff, and commits. Running on the
target branch aborts. With
--advice,kongminggives a go/no-go and risk checkpoint before mutation. - Issue linkage is established. Existing issues are found from branch and commit evidence; when none is found, the workflow can create a structured GitHub issue for traceability.
- The target is merged locally. It fetches and merges
origin/<target>so later checks exercise the combined state. Complex conflicts stop the run. - Tests and review run. The detected test runner executes unless skipped,
followed by a two-pass critical and informational review unless skipped.
Test failures block shipping. Critical findings require a fix, explicit risk
acceptance, or false-positive decision. With
--advice, a secondkongmingcheckpoint evaluates this evidence before any release or GitHub writes. - Release artifacts are updated. A detected version source receives a patch bump by default; significant changes require a minor-or-patch decision. Existing changelogs receive a generated entry.
- Journal, docs, and plan state are handled. Journal and official docs tasks run in the background unless skipped. A resolved plan is checked and marked completed only when evidence supports it; its index stays active until merge.
- Everything intended is committed and pushed.
git add -Astages all current changes, scans the staged diff for secrets, creates a conventional commit, and performs a regular push without force. - The PR is created or updated. The body records end-to-end work, delegation, decisions, plan deviations, evidence, checklist, human actions, linked issues, and ship mode in the configured writing language. The title remains an English conventional commit.
- Plan linkage is recorded. When a plan was finalized, its index records the PR number so the later merge workflow can close it safely.
- Optional review and merge converges. With
--merge,ak:review-prowns PR review, fixes, replies, merge readiness, merge, and post-merge CI. The ship stops unless it reports approval, a completed merge, and green CI. - Dual-target shipping advances carefully. With
--both, the beta stage runs first. The stable stage starts only after a beta PR exists and, with--merge, its merge CI is green. A promotion-based repository can instead report the stable stage as pending the beta merge.
Understand the write boundary
Uncommitted changes are included automatically
ak:ship intentionally stages with git add -A. Clean or isolate the
worktree before running it. An unrelated untracked file can otherwise be
committed and pushed with the release.
The pipeline can create or modify all of the following:
- Local merge state, conflict resolutions, source fixes, version files, changelog, journal, docs, and plan files.
- One or more local commits, including review fixes and the final ship commit.
- The remote feature branch through a normal push.
- A GitHub issue when no related issue is found.
- One or, with
--both, two pull requests, or the title and body of existing pull requests. - With
--merge, review replies, fixes, merges, and post-merge CI convergence throughak:review-pr.
Safety gates remain:
- Staged secret detection stops the commit. Never add a credential merely to keep the pipeline moving.
- Push is never forced. A rejected push can use one deliberate rebase retry;
destructive history rewriting is outside the workflow. Neither
--mergenor--bothbypasses branch protection or required checks. - Missing
ghstops after the push, so a pushed branch is not evidence that a PR exists. - Background journal or docs work can finish after later steps have started; verify its files are present before accepting the final commit evidence.
- Without
--merge,ak:shipdoes not merge the PR. Even with--merge, it does not close the plan index, publish a release, or deploy an application. Those require later workflows and separate authority.
Verify the handoff
A complete result should include:
- Canonical mode, source branch, target branch, commit count, and diff summary;
with
--both, separate beta and stable stage status. - Linked or created issue numbers.
- Target-merge result, test command and counts, and review findings or explicit skip evidence.
- Version change, changelog, journal, docs, and plan results when applicable.
- Final commit SHA, pushed remote branch, and each validated PR URL.
- Advice checkpoint status when
--advicewas requested, plus review verdict, merge status, and CI status when--mergewas requested. - An evidence-rich PR body with honest
None,Not run, orUnavailablemarkers instead of invented activity. - Any human action, accepted critical risk, missing screenshot, pending CI, or unresolved question.
Release tests directly cover writing-language resolution and the EN/VI PR-body section contract. They do not exercise the full fetch, merge, test, background task, commit, push, issue, and PR pipeline against a live repository.
Troubleshoot without bypassing gates
| Symptom | Safe next step |
|---|---|
| Mode or target is wrong | Stop and rerun with official or beta; do not push while target intent is ambiguous. |
| No test runner is detected | Provide the project command or explicitly skip with prior evidence; do not claim tests passed. |
| Target merge conflicts | Resolve the shown conflicts with repository context, rerun the relevant checks, then continue. |
| A critical review finding appears | Fix it and rerun tests, explicitly accept the concrete risk, or document why it is a false positive. |
| A secret is detected in the staged diff | Remove it, rotate if exposed, update ignore rules, and rescan before committing. |
| Push is rejected | Inspect remote history, use a non-destructive rebase when appropriate, and retry once without force. |
gh is missing or unauthenticated | The branch may already be pushed; install or authenticate gh, then create or update the PR with the required body contract. |
| The runtime does not recognize the Skill | Confirm target and scope, restart the runtime session, then follow Runtime cannot find a Skill or Agent. |
After the PR exists, use ak:review-pr for review and merge
readiness. Use ak:deploy only after the repository's release gates
permit publication.
Deploy a prepared project with ak:deploy
Detect or select a supported hosting platform, deploy with explicit provider authority, verify the URL, and record rollback guidance.
Preserve session context with ak:handoff
Create a concise, redacted handoff that records goals, decisions, evidence, blockers, and open state for a fresh agent session.