ship
Deploy, release, or run migrations against production for a project. Use when user says "deploy", "ship", "push to prod", "release", "run the migration", "apply migrations", or asks how a project gets deployed / where it lives. Reads per-project DEPLOY.md as source of truth; falls back to inference + offer to scaffold one.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- ship
- description
- Deploy, release, or run migrations against production for a project. Use when user says "deploy", "ship", "push to prod", "release", "run the migration", "apply migrations", or asks how a project gets deployed / where it lives. Reads per-project DEPLOY.md as source of truth; falls back to inference + offer to scaffold one.
- disable-model-invocation
- true
02 资源文件 1
- 参考文档template.md2.9 KB
03 SKILL.md 正文
Ship
Deterministic deployment workflow. Reads the project's DEPLOY.md and executes it. If none exists, infers the shape from project files and offers to write one.
The goal: stop burning cycles re-discovering "where does this deploy / how do migrations apply / what can the agent actually run" every session.
Workflow
1. Find the project root + DEPLOY.md
From the current directory or the file under discussion, walk up to the nearest package.json, pyproject.toml, Cargo.toml, or .git/. That's the project root.
Look for DEPLOY.md at the project root.
- Present → use it as the source of truth. Don't second-guess it. If something looks stale, flag it but follow the stated workflow until corrected.
- Missing → go to step 2.
2. Infer + offer to scaffold (only if DEPLOY.md missing)
Read these in parallel to infer the deploy shape:
package.json(scripts, dependencies —next,astro,@sveltejs/kit, etc.)wrangler.toml/wrangler.jsonc→ Cloudflare Workers/Pagesvercel.json/vercel.ts→ Vercelsupabase/config.toml→ Supabase project ref.github/workflows/*.yml→ CI-triggered deploysnetlify.toml,fly.toml,railway.toml,render.yamlgit remote -v→ where pushes go
Offer to scaffold a DEPLOY.md from template.md, pre-filled with what you inferred. Show the inferred values; ask the user to confirm or correct before writing. (This is the one place to ask — getting this wrong contaminates every future ship.)
3. Preflight (before any deploy action)
Run these checks. Report any that fail; ask before proceeding.
git status— uncommitted or unpushed work? Naming the branch you're on matters; deploys to main vs preview behave differently.- Pending migrations? Check the project's migration directory against what's deployed (if the manifest specifies a check command, run it).
- Required env vars present in the target environment? The manifest should list them; if it doesn't, name what you'd expect based on the code and stop.
4. Trigger the deploy
Follow the manifest. Most common shapes:
- Push-to-deploy (Vercel / Cloudflare Pages / Netlify with GitHub integration):
git pushand report the expected build URL. Do not run the platform CLI to "redeploy" unless the manifest says to — push-triggered builds are the canonical path; CLI re-deploys can race. - Manual CLI deploy: run the exact command in the manifest. Don't substitute flags.
- CI-gated: push and link to the workflow run.
Never assume push-to-deploy is wired. A Cloudflare Pages project, a Vercel project, or a Netlify site can all exist without the git integration enabled — in which case git push does nothing and you have to run the platform CLI yourself. The integration is configured in the dashboard, not the repo, so you cannot infer it from the codebase alone.
Signals that push-to-deploy IS wired (any one is sufficient):
- The manifest says so (canonical source — trust it).
- A
.github/workflows/*.ymlfile deploys on push. - A
.vercel/project.jsonexists AND project is linked AND user has confirmed it deploys on push (the file alone doesn't prove the integration is active).
If none of those are true, treat the project as manual-CLI-deploy. Don't push and wait. Don't poll Pages dashboards "in case it picks up." Run the CLI command, or ask the user which mode this project uses.
5. Verify
After triggering, do whatever the manifest's verify step says. If no verify step is specified:
- Curl the prod URL's health endpoint if one exists
- Report the expected build URL and an estimated build time
- Name the runtime errors that could appear if a step was skipped (e.g., "the deploy will succeed, but route X will 500 because the migration hasn't run")
End with a status sentence, not a question.
Authority limits — things the agent CANNOT run
These fail silently or hit auth walls. Don't waste a turn trying; instead, hand the exact command to the user OR use the documented fallback.
| Command | Why it fails | What to do instead |
|---|---|---|
supabase db push against prod |
Requires supabase login state the agent's shell doesn't have, OR SUPABASE_DB_PASSWORD env var. Returns 403 "your account does not have the necessary privileges". |
Either (a) ask user to run supabase db push themselves, or (b) paste migration SQL into Supabase dashboard → SQL Editor. Manifest should specify which. |
vercel deploy --prod without VERCEL_TOKEN |
Requires interactive vercel login. |
Push to main if project is GitHub-linked (canonical). Otherwise ask user to run. |
wrangler deploy / wrangler pages deploy without prior login |
Requires wrangler login browser flow OR CLOUDFLARE_API_TOKEN. Usually already authed because wrangler login persists to ~/.wrangler/. Try it; if it 401s, ask user to run wrangler login. |
|
gh auth refresh / anything needing TOTP |
Browser/device auth. | Hand off. |
| Anything that needs an unlocked 1Password CLI session | op requires eval $(op signin) in the user's shell. |
Either ask user to run with their session, or instruct them to fetch the specific secret and paste it. |
Production database writes via psql / direct connections |
Connection strings with prod credentials are not in the agent shell. | Use the platform's migration mechanism (Supabase dashboard, etc.). |
When you hit one of these, stop. Don't retry with different flags. State the limit, give the user the exact command to run, and continue with whatever can be done without that step.
Common platform shorthand
For when the manifest is terse and you need to fill in standard behavior. All "X-linked" notes below require evidence — see step 4. Don't assume linkage from repo files alone.
- Cloudflare Pages, GitHub-linked: push to
maintriggers production build; PR branches trigger preview builds at<branch>.<project>.pages.dev. Build runs in CF's environment. - Cloudflare Pages, manual (standalone project): requires
npm run build(or framework equivalent) THENwrangler pages deploy <build-output-dir>. SvelteKit + adapter-cloudflare outputs to.svelte-kit/cloudflare. Astro outputs todist. Next.js via Cloudflare adapter outputs to.vercel/output/static. The wrangler CLI usually works in the agent shell becausewrangler loginpersists to~/.wrangler/config/. - Vercel, GitHub-linked: push to production branch (usually
main) triggers prod build. Preview URL per branch + per PR. - Vercel, manual:
vercel deploy --prod. RequiresVERCEL_TOKENor interactive login the agent can't do — usually hand off to user. - Supabase migrations: files in
supabase/migrations/apply in filename order. The dashboard SQL Editor always works for the agent;supabase db pushusually doesn't (see authority limits). - GitHub Actions deploys: the workflow is the source of truth; trigger conditions are in
on:. Don't run deploy scripts manually if a workflow exists for the same step — you'll desync.
When the user says "deploy this"
- Read
DEPLOY.md(or scaffold one). - Preflight:
git status, list any pending migrations. - State what you're about to do in one sentence.
- Do it.
- Report what's happening, what could go wrong, and end with a status sentence.
Don't ask permission for each step inside an already-authorized ship.
04 同仓库更多 Skills
zoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
write-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
triage
Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.
tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
symbol-surgery
Symbol-first refactoring discipline using the native LSP tool — locate by symbol, check blast radius before changing, edit at symbol boundaries, verify references after. Use when renaming, changing a signature, moving/extracting/inlining, or deleting code that other code depends on; or whenever the question is "where is this used and what breaks if I change it?" Mechanical-execution complement to `deepen` (which decides what to refactor) and `simplify` (which decides what's clean).
session-closeout
Preserve durable lessons and produce an archive-safety receipt before ending, clearing, or archiving an agent task. Use without being asked when a task reaches its finish line (its PR merged and its worktree removed, or the deliverable handed over), and when the operator says close out, wrap up, end the session, prepare the task for archive, make it archive-ready, or invokes $session-closeout after substantive work.