一键导入
ship
Use when code is ready to ship — creates PRs, merges, deploys, and verifies. Handles the full PR-to-production pipeline. Triggers on /ship.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when code is ready to ship — creates PRs, merges, deploys, and verifies. Handles the full PR-to-production pipeline. Triggers on /ship.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user asks about available workflow skills, wants an overview of the engineering workflow, or references "nanostack". Also triggers on /nanostack.
Orchestrate parallel agent sessions through a sprint. Coordinates task claiming, dependency resolution, and artifact handoff between independent agents. Triggers on /conductor, /sprint, /parallel.
Use when working near production, sensitive systems, or destructive operations. Activates on-demand safety hooks that block dangerous commands. Supports modes — careful (warn), freeze (block writes outside scope), unfreeze (remove restrictions). Triggers on /guard, /careful, /freeze, /unfreeze.
Use to list the open-source licenses of every dependency in this project, grouped by license family. Flags GPL or AGPL dependencies that may force the project itself to be open-source. Triggers on /audit-licenses.
Quick reference for all nanostack commands. Shows available skills, what each one does, and how to use them. Triggers on /nano-help.
Use to verify that code works correctly — browser-based testing with Playwright, native app testing with computer use, CLI testing, API testing, or root-cause debugging. Supports --quick, --standard, --thorough modes. Triggers on /qa.
| name | ship |
| description | Use when code is ready to ship — creates PRs, merges, deploys, and verifies. Handles the full PR-to-production pipeline. Triggers on /ship. |
| concurrency | exclusive |
| depends_on | ["review","qa","security"] |
| summary | Release pipeline. PR creation, CI monitoring, post-deploy verification, rollback plan. |
| estimated_tokens | 350 |
| hooks | {"PreToolUse":[{"matcher":"Bash","command":"./ship/bin/pre-ship-check.sh"}]} |
You get code from "done" to "verified in production" in one pass. You own the full pipeline: pre-flight, PR, CI, deploy, verification. If something breaks after merge, you rollback first and debug second.
Run source bin/lib/git-context.sh && detect_git_mode.
If local (no git repo): Skip the entire PR/CI/deploy flow below. Instead:
ship/bin/quality-check.sh (already works without git).open index.html (or the main HTML file) so the user sees it instantly. Then say "Se abrió en tu navegador."If local-git (git, no remote): Run pre-ship check and quality check. Skip PR/CI/deploy. Suggest git tag for versioning. Output: "Listo. Commit: [hash]."
If full: Continue with the normal process below.
Run both checks before proceeding:
ship/bin/pre-ship-check.sh # uncommitted changes, missing tests, staged secrets, branch check
ship/bin/quality-check.sh # broken README links, stale references, writing quality, secrets in diff
If either reports errors, fix them before proceeding. Warnings are informational but should be reviewed.
Resolve context and verify review findings were resolved:
~/.claude/skills/nanostack/bin/resolve.sh ship
The output is JSON with upstream_artifacts (review, security, qa paths). If a review artifact exists, read it and check that all blocking findings have been addressed. For each blocking finding, verify the code at the reported file and line no longer has the issue. If a blocking finding is still present, do NOT proceed. Flag it.
Then verify:
# Are there uncommitted changes?
git status
# Do tests pass?
# (use the project's test command — check package.json, Makefile, etc.)
# Is the branch up to date with the target?
git fetch origin && git log --oneline HEAD..origin/main | head -5
If tests fail, fix them first. Do not ship broken code with a "will fix later" comment.
If the branch is behind, rebase or merge:
git rebase origin/main # preferred for clean history
# or
git merge origin/main # if rebase would be messy
Before creating the PR, show the user a full preview. This is a mandatory stop because after creation it's public.
## PR Preview
**Title:** {{title}}
**Branch:** {{branch}} → {{base}}
**Files changed:** {{count}}
### Summary
{{1-3 bullets of what changed and why}}
### Changes
{{file list with one-line description each}}
### Test plan
{{how to verify}}
Wait for user approval. Only proceed after explicit confirmation. If the user adjusts something, update the preview and ask again.
After approval, use the template at ship/templates/pr-template.md for the PR body.
gh pr create \
--title "{{concise title, under 70 chars}}" \
--body "$(cat <<'EOF'
{{filled PR template}}
EOF
)"
PR title rules:
PR body rules:
After creating the PR, check CI status:
gh pr checks <number> --watch
If CI fails:
gh pr checks <number> --fail-onlyAfter the PR is merged:
# Verify merge completed
gh pr view <number> --json state,mergedAt
# Check deploy pipeline
gh run list --limit 3
If the project has a staging/production URL, run a post-deploy checklist:
/qa --quick against prod URL)gh run view --log-failed — any new errors in the deploy?If any check fails: stop and rollback before debugging. A broken prod is worse than a reverted feature.
If something goes wrong after deploy:
# Quick rollback: revert the merge commit
git revert <merge-commit-sha> --mainline 1
gh pr create --title "Revert: {{original PR title}}" --body "Reverting due to {{reason}}"
Document what went wrong for the team.
Before creating the PR, verify the standards in ship/references/repo-quality-standards.md (README links, PR/commit quality, repo hygiene). The public repo is the face of the project. ship/bin/quality-check.sh automates the checks it can; use judgment for the rest.
After shipping, do these steps in order:
Step 1: Save the artifact. Run this command now — do not skip it:
~/.claude/skills/nanostack/bin/save-artifact.sh --from-session ship 'PR #N: title. Status: merged/open. CI: passed/failed.'
~/.claude/skills/nanostack/bin/sprint-journal.sh
Or pass full JSON for richer detail:
~/.claude/skills/nanostack/bin/save-artifact.sh ship '<json with phase, summary including pr_number, pr_url, title, status, ci_passed, context_checkpoint>'
~/.claude/skills/nanostack/bin/sprint-journal.sh
Step 2: How to see the result.
If AUTOPILOT is active: Skip this question. Go directly to Next Step (compound + sprint summary). The user will decide how to run it after the sprint closes.
Otherwise, ask:
How do you want to see it?
- Local — I'll start the server and show you how to open it
- Production — I'll guide you through deploying to the internet
- I'm done — just the commit
If Local (option 1):
index.html in your browser"npm start, node src/server.js, etc.) and tell the user the URLopen commands. Show the path and let the user decide.If Production (option 2): Detect project type, recommend ONE provider (Next.js→Vercel, Node→Railway, Static→Cloudflare Pages, Python→Railway, Go→Fly.io). Walk through: account, connect repo, env vars, push. Mention domain (~$10/yr), SSL (automatic), monitoring (Sentry free + UptimeRobot free). Show monthly cost.
If Done (option 3): Skip to next features.
Close with a summary:
Ship: PR #N created. CI passed.
Tests: X → Y (+N new). No regressions.
Include before/after test counts when tests were added. Quantify the improvement.
After shipping, two things happen in order:
First: capture learnings. Run compound immediately:
Use Skill tool: skill="compound"
Do not ask. Do not skip. Compound reads the sprint artifacts and saves solutions for future sprints.
Then: close the sprint. This is the last thing the user sees. Make it count.
1. What was built. Summarize what the user now has in plain language. Not phase names or artifact counts. What does the thing DO, where is it, and how to use it.
2. How to use it. Show the exact command or URL to try it right now.
3. What could come next. Suggest 2-3 concrete extensions as /feature commands the user can run immediately.
Example:
Sprint complete. You have a JSON validator CLI.
Try it:
node src/index.js test.jsonIdeas for the next feature:
/feature Add --format flag to pretty-print valid JSON/feature Add directory mode: jsonlint schemas/*.json/feature Add --fix mode that auto-corrects trailing commas