一键导入
ship-it
Prepare and ship a feature branch. Sync, test, open PR. Triggers on: 可以上了嗎, 準備上線, 開 PR, ship this, deploy, release, 上線, merge, push this, 準備好了嗎, ready to go
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Prepare and ship a feature branch. Sync, test, open PR. Triggers on: 可以上了嗎, 準備上線, 開 PR, ship this, deploy, release, 上線, merge, push this, 準備好了嗎, ready to go
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Karpathy's LLM Wiki: build/query interlinked markdown KB with Zettelkasten note discipline. Triggers: 知識庫, 建 wiki, wiki 筆記, 研究筆記, ingest sources, knowledge base.
Use when building, maintaining, or auditing a Zettelkasten (slip-box) note system, or when applying atomic-note discipline to an existing markdown knowledge base — atomicity checks, card-splitting decisions, linking rules, note-type workflow. Trigger on 卡片盒筆記法、卡片盒、Zettelkasten、原子筆記、永久筆記、文獻筆記、結構筆記、拆卡、筆記連結、smart notes、atomic notes、permanent notes、slip-box, or when another skill (e.g. llm-wiki) needs per-change note-discipline checks.
Use whenever the agent thinks at all — writing copy or reports, proposals, planning products or features, coding, debugging, or any other task — running ALL curated thinking frameworks in sequence (currently 邏輯推導 logical reasoning:MECE, 空雨傘, 魚骨圖; 創意發想 creative ideation:六頂思考帽, 腳本圖, 心智圖; 市場分析 market analysis:3C 分析, SWOT 分析, 4P與4C; 進度管理 progress management:惠特默模型, KPI 樹狀圖, PDCA; 權衡得失 weighing trade-offs:決策矩陣, PMI 表, 力場分析; 預測未來 predicting the future:S 型曲線, 鴻溝理論, 長尾模型; 辯論思考 debate thinking:需根解損, 判定立駁, 論點以主張-資料-推論三要素構建 Claim-Data-Warrant、以質詢拆解三問檢驗(事實為真?邏輯嚴密?有無其他可能?); 思維模型 mental models:第一性原理, 反向思考法, 二階思考, 能力圈, 奧坎剃刀) to lock direction and key points before acting, screening all reasoning with a ~160-item 謬誤檢核清單 fallacy checklist. Theme grouping is navigation only — work through every theme, not just the ones that look relevant. Trigger on ultrathink, 深度思考, 想清楚再做, 思考框架, 抓重點, 言之有物, 沒抓到重點, any framework or tool name above, or whenever a task involves thinking, planning, writing, building, or debugging.
Use by default for any user-facing writing, including answers to users, emails, documents, formal correspondence, reports, proposals, landing-page copy, social posts, essays, commentary, explanations, summaries, product copy, internal updates, and other prose intended to be read by people. Apply it whenever the output contains human-readable text, unless another skill explicitly owns the writing style or the output is purely code, structured data, or a command. Supports Chinese and English.
Software engineering guidelines for any software change. Always load this skill before requirement clarification, architecture/design, implementation, refactoring, code review, testing, or shipping. Covers simplicity, surgical changes, TDD, and verifiable success criteria. Triggers on: 任何軟體規劃, 需求釐清, 架構設計, 寫 code, 改 code, 做功能, 修 bug, refactor, 開發, coding, development, 實作, 實現, 寫程式, 改程式, 加功能, 修問題, code review, 測試, 重構
Universal database engineering rules. Migration discipline, audit logging, soft delete, performance, data integrity. Triggers on: 任何資料庫相關工作, 建表, 改 schema, 寫 migration, DB design, database development, 設計資料庫, 改 DB 結構, 加欄位, 加索引, 改 table, SQL, 寫 trigger, 設計 API 的 DB 層, 查詢很慢, N+1, 效能優化, 資料完整性, CASCADE, 外鍵, 新增 table, 刪除資料, backup, 環境分離, dev prod 分開
| name | ship-it |
| version | 1.0.0 |
| description | Prepare and ship a feature branch. Sync, test, open PR. Triggers on: 可以上了嗎, 準備上線, 開 PR, ship this, deploy, release, 上線, merge, push this, 準備好了嗎, ready to go |
| allowed-tools | ["Bash","Read","Write","Edit","Grep","AskUserQuestion"] |
When the user says something is ready, wants to deploy, or asks if it can ship, activate immediately.
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
_REPO=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")
_BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||')
[ -z "$_BASE" ] && git rev-parse --verify origin/main >/dev/null 2>&1 && _BASE="main"
[ -z "$_BASE" ] && git rev-parse --verify origin/master >/dev/null 2>&1 && _BASE="master"
_BASE="${_BASE:-main}"
echo "BRANCH: $_BRANCH"
echo "BASE: $_BASE"
echo "REPO: $_REPO"
_REMOTE=$(git remote get-url origin 2>/dev/null || echo "")
echo "$_REMOTE" | grep -q "github.com" && echo "PLATFORM=github"
echo "$_REMOTE" | grep -q "gitlab" && echo "PLATFORM=gitlab"
which gh >/dev/null 2>&1 && gh auth status >/dev/null 2>&1 && echo "GH_CLI=true" || echo "GH_CLI=false"
git fetch origin $_BASE --quiet 2>/dev/null || true
git diff origin/$_BASE --stat 2>/dev/null | tail -3
git log origin/$_BASE..HEAD --oneline 2>/dev/null
DIFF_LINES=$(git diff origin/$_BASE --stat 2>/dev/null | tail -1 | grep -oE '[0-9]+ insertion' | grep -oE '[0-9]+' || echo "0")
echo "DIFF_LINES: $DIFF_LINES"
[ -f delivery-plan.md ] && echo "DELIVERY_PLAN: exists" || echo "DELIVERY_PLAN: missing"
[ -f delivery-plan.md ] && head -20 delivery-plan.md
If DELIVERY_PLAN: exists: read the Next Verifiable Output and Current Phase sections. Before shipping, confirm:
⚠ delivery-plan.md check:
- Current phase: [X]
- Next output: [Y]
- Does this diff match? [yes / no / no delivery-plan found]
If it doesn't match, ask the user whether to update delivery-plan.md before shipping.
BRANCH == BASE: abort with "You're on the base branch. Ship from a feature branch."git status — if uncommitted changes exist, describe them and ask whether to commit, stash, or abort.git diff origin/$_BASE --statgit log origin/$_BASE..HEAD --onelinegit fetch origin $_BASE
git merge origin/$_BASE --no-edit
If merge conflicts: show each conflict and ask whether to keep mine, keep theirs, or show both.
Detect and run:
[ -f package.json ] && npm test 2>&1 | tee /tmp/mystack_tests.txt
[ -f Gemfile ] && bundle exec rspec 2>&1 | tee /tmp/mystack_tests.txt
[ -f go.mod ] && go test ./... 2>&1 | tee /tmp/mystack_tests.txt
[ -f Cargo.toml ] && cargo test 2>&1 | tee /tmp/mystack_tests.txt
[ -f requirements.txt ] && python -m pytest 2>&1 | tee /tmp/mystack_tests.txt
[ -f pyproject.toml ] && python -m pytest 2>&1 | tee /tmp/mystack_tests.txt
Test failure triage:
Goal: 100% of new code paths have at least one test.
find . -name "*.test.*" -o -name "*.spec.*" -o -name "*_test.*" -o -name "*_spec.*" | grep -v node_modules | wc -l
For each changed file, search for corresponding test coverage. Rate:
If no code review has been run on this branch, do a lightweight inline check:
If critical issues found: fix or get approval before pushing.
git push origin $_BRANCH
If GH CLI is available:
gh pr create \
--title "[auto-detect from branch name and commits]" \
--body "$(cat <<'EOF'
## What
[1-2 sentences: what does this change do]
## Why
[Why is this needed]
## How
[Brief technical description]
## Testing
- Tests run: N passed
- Coverage: [summary]
## Checklist
- [ ] Tests pass
- [ ] No secrets committed
- [ ] Migrations reversible (if applicable)
- [ ] Docs updated
EOF
)"
If no GH CLI: print the PR description for the user to copy.
PR 已建立。接下來你可以:
gh pr checks --watch 盯 CI 狀態
gh run watch 盯部署進度
或等 GitHub 通知
部署完成後建議跑:
diff-inspector 確認 production 狀態
project-memory 記下這次學到的
## Ship Report [branch] [date]
Tests: N passed, N failed
Coverage: [summary]
Pre-landing review: [SKIPPED / N issues found, N fixed]
PR: [URL or "ready — push manually"]
Status: shipped
echo "{\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"skill\":\"ship-it\",\"branch\":\"$(git branch --show-current 2>/dev/null || echo 'N/A')\",\"outcome\":\"success\",\"repo\":\"$(basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null || echo 'N/A')\"}" >> ~/.mystack/timeline.jsonl