ship

ship is a skill for Claude Code, Codex from bezhai/chiwei-platform. It costs 15 tokens per session (982 once invoked), scanned A, original, MIT.

A release command that creates or uses a pull request, merges the current branch into main, and deploys the result to production. A pull request is a reviewable request to add branch changes to the main code line.

In plain words
What is it for?
Use it to release a completed branch, deploy an app after merging, or merge changes that only affect shared project files and need no deployment.
Why use it?
It gathers the usual release steps into one workflow and checks for unrelated branch changes before merging. It also stops when there are conflicts instead of choosing which code to keep.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/bezhai/chiwei-platform/ship
Any agent
npx skills add bezhai/chiwei-platform --skill ship
Clone the repo
git clone --depth 1 https://github.com/bezhai/chiwei-platform

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ship

README.md
[![agentmods](https://agentmods.dev/badge/skills/bezhai/chiwei-platform/ship.svg)](https://agentmods.dev/skills/bezhai/chiwei-platform/ship)
Your own site
<a href="https://agentmods.dev/skills/bezhai/chiwei-platform/ship"><img src="https://agentmods.dev/badge/skills/bezhai/chiwei-platform/ship.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 982 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00982
Opus 5 $0.00008 $0.00491
Sonnet 5 $0.00003 $0.00196
Haiku 4.5 $0.00002 $0.00098

Measured 4d ago against content hash e2e0eb89c935, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ship scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/ship/SKILL.md · 101 lines

What it actually says

/ship

一键完成:PR → 合码 → 部署生产。用户敲 /ship 即表示授权合并和部署。

合码规则(等用户确认、列出所有改动、冲突展示)的单一事实来源是 .claude/rules/merge-and-ship.md,本文件只描述执行流程。

参数

!`echo "$ARGUMENTS"`

可选传入 APP。不传则自动检测。

执行流程

1. 自动检测

  • APP: 从参数获取,或从 git diff --name-only main...HEAD 检测。涉及多个 app 且未指定时才问。如果只改了根目录文件(Makefile、CLAUDE.md 等),标记为"仅合码,无需部署"。
  • 分支: git branch --show-current,禁止在 main 上执行。

2. 检查是否有不属于当前工作的改动

对比分支上的全部改动文件(git diff --name-only main...HEAD)和当前对话中实际修改过的文件。如果发现有不是当前对话改动的文件(如之前遗留的 commit),必须提醒用户:

分支上还有以下不属于本次改动的文件:xxx,是否一起合入?

等用户确认后再继续。如果所有改动都是当前对话的工作范围内,直接继续。

3. 自动处理脏状态

不要问,直接做:

# 有未提交改动 → 自动 commit
git add -A && git commit -m "wip: auto commit before ship"

# 未推送 → 自动 push
git push -u origin <branch>

4. 创建 PR 并合码

# 创建 PR(已存在则跳过)
ghc pr create --fill 2>/dev/null || true

# 合码(不带 --delete-branch,避免 worktree 下切 main 失败)
ghc pr merge --squash

# 删除远端分支(合码成功后)
git push origin --delete <branch>

禁止使用 --delete-branch:在 worktree 中该参数会尝试本地切换到 main,导致 致命错误:'main' 已经检出到 ...。PR 实际已合并但命令报错,模型会误以为失败而重试。

合并冲突处理:遇到冲突时,展示冲突文件和冲突内容,等用户指示如何解决。解决后重新 push 并重试。不要自行选择保留哪个版本。

5. 部署

如果标记为"无需部署",跳到步骤 6。

必须在主仓库的 main 分支执行部署。通过 git worktree list 找到主仓库路径(bare 或 main worktree)。

cd <主仓库路径>
git checkout main && git pull

根据 APP 类型:

  • paas-engine: make self-deploy GIT_REF=main
  • 其他: make deploy APP=<APP> GIT_REF=main

超时 10 分钟。

一镜像多服务自动同步make deploy / make release 会按 Makefile 的 SIBLINGS 映射自动同步 release sibling 服务(channel-server → chat-response-worker,lark-service → lark-outbound),无需手动操作。agent-service 已无 sibling(vectorize-worker 随 v4 记忆整机删除)。

6. 清理当前分支的测试泳道

只清理当前分支对应的泳道(与 deploy-test 相同的推导:ppe- + 分支名小写、/-、截前 16 字符;或显式传入的 LANE),不要动其他泳道。

make undeploy APP=<APP> LANE=<当前分支对应的泳道名>

执行 /ops unbind bot dev 解绑 dev bot。

如果该泳道不存在则跳过,不报错。

7. 验证并输出

执行 /ops pods <APP> 确认 pod Running。

一行总结:✅ <APP> 已部署到生产环境,镜像: <version>

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 101 lines · 15 tokens per session scan A e2e0eb89c935

Subscribe to this mod's changes

ship is a skill published in the GitHub repository bezhai/chiwei-platform (20 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 982 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens