ship
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShip Changes
发布更改
Pre-loaded context
预加载上下文
- Status: !
git status - Diff: !
git diff HEAD - Log: !
git log --oneline -10
- 状态: !
git status - 差异: !
git diff HEAD - 日志: !
git log --oneline -10
Package manager detection
包管理器检测
Check lockfile before running commands:
- →
bun.lockbun - →
pnpm-lock.yamlpnpm - →
yarn.lockyarn - default →
npm
执行命令前先检查锁文件:
- →
bun.lockbun - →
pnpm-lock.yamlpnpm - →
yarn.lockyarn - 默认情况 →
npm
Workflow
工作流程
- Review all changes from status and diff
- Analyze recent commit style from log
- Check for quality check commands:
- If exists, check for
package.jsonandlintscriptstest - Run available checks in parallel: ,
{pm} run lint{pm} test - If no package.json, skip quality checks
- If
- If checks fail: report errors, STOP — do not commit or push
- Generate commit message based on changed files matching repo style
- Stage all files:
git add -A - Commit with HEREDOC format
- Push: (current branch)
git push - Run after to verify
git status
- 查看状态和差异中的所有更改
- 从日志中分析近期的提交风格
- 检查质量检查命令:
- 如果存在,检查其中的
package.json和lint脚本test - 并行运行可用的检查:,
{pm} run lint{pm} test - 如果没有package.json,跳过质量检查
- 如果存在
- 如果检查失败:报告错误,终止操作——不要提交或推送
- 根据更改的文件生成符合仓库风格的提交信息
- 暂存所有文件:
git add -A - 使用HEREDOC格式提交
- 推送:(当前分支)
git push - 之后运行进行验证
git status
Rules
规则
- Stage ALL changes with
git add -A - Generate message from changed files, match repo style
- Only run package manager commands if package.json exists with those scripts
- NEVER push if lint or tests fail
- NEVER force push (or
-f)--force - NEVER skip hooks
- NEVER commit secrets
- Push to current branch only
- 使用暂存所有更改
git add -A - 根据更改的文件生成提交信息,匹配仓库风格
- 仅当package.json中存在对应脚本时,才运行包管理器命令
- 如果lint或测试失败,绝对不要推送
- 绝对不要强制推送(或
-f)--force - 绝对不要跳过钩子
- 绝对不要提交机密信息
- 仅推送到当前分支