跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
部署与云服务

deploy

Build → verify artifact → deploy → wait → smoke deployment pipeline. Platform-agnostic (MCP or CLI), with configurable timeout, retry with exponential backoff, and integrated health-check. The deploy half of CI/CD: run after build to push to production.

danielvm-git · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add danielvm-git/bigpowers --skill deploy

技能说明


name: deploy model: sonnet description: "Build → verify artifact → deploy → wait → smoke deployment pipeline. Platform-agnostic (MCP or CLI), with configurable timeout, retry with exponential backoff, and integrated health-check. The deploy half of CI/CD: run after build to push to production."

Deploy

HARD GATE — Do not deploy without running tests first. Run test or your CI suite before this skill.

HARD GATE — Use this skill from a CI/CD pipeline or post-merge on main/master. Never deploy from a feature branch.

HARD GATE — The deploy skill orchestrates deployment; the smoke-test skill validates post-deploy health. Chain them: deploy → smoke-test.

Orchestrate a full build-to-deployment pipeline: build the artifact, verify it exists and is non-empty, invoke a platform deploy tool (MCP or CLI), poll until the deploy completes or times out, then run a baseline smoke test against the live URL.

Pipeline Stages

build → verify artifact → deploy → wait/retry → smoke
StageDescriptionFailure mode
BuildExecute the project's build commandNon-zero exit: report build error
VerifyCheck artifact exists and is non-emptyMissing/empty: report artifact path
DeployInvoke platform deploy tool (MCP, Vercel CLI, rsync, etc.)Non-zero exit: report deploy error
WaitPoll deploy status every 30s up to DEPLOY_TIMEOUT (default 5 min)Timeout: report exceeded
Smokecurl -sSf $DEPLOY_URL as baseline health checkNon-200: report failure

Process

1. Detect build command

Read project manifest files in order to determine the build command:

ManifestBuild command
package.jsonnpm run build (or scripts.build value)
Cargo.tomlcargo build --release
pyproject.toml / setup.pyDepends on build backend (poetry build, pip install -e ., etc.)
Makefilemake build or first target named build
AGENTS.md / CLAUDE.mdLook for build: in project commands section

If no manifest is found, prompt the user with: "No detected build command. Pass --build 'npm run build' or specify the command."

2. Build the artifact

npm run build

Or the detected command from step 1. If the build fails, exit non-zero and report the build output.

3. Verify the artifact

ARTIFACT_DIR="${ARTIFACT_DIR:-dist}"
if [ ! -d "$ARTIFACT_DIR" ] || [ -z "$(ls -A "$ARTIFACT_DIR" 2>/dev/null)" ]; then
  echo "FAIL: build artifact not found at $ARTIFACT_DIR"
  exit 1
fi

Configurable via $ARTIFACT_DIR environment variable (default: dist/).

4. Deploy to platform

Platform-agnostic — supports multiple deployment targets via environment variables:

PlatformEnv varExample
VercelVERCEL_TOKEN, VERCEL_PROJECT_IDvercel deploy --prod --token $VERCEL_TOKEN
NetlifyNETLIFY_AUTH_TOKEN, NETLIFY_SITE_IDnetlify deploy --prod --auth $NETLIFY_AUTH_TOKEN --dir $ARTIFACT_DIR
Platform MCPMCP tool callmcp deploy via your platform MCP server
rsync/SSHDEPLOY_SSH_USER, DEPLOY_SSH_HOST, DEPLOY_SSH_PATHrsync -avz $ARTIFACT_DIR/ $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST:$DEPLOY_SSH_PATH
CustomDEPLOY_COMMANDRun any deploy command string

The deploy tool is selected by which environment variables are set. If none are configured:

echo "No deploy target configured. Set one of: VERCEL_TOKEN, NETLIFY_AUTH_TOKEN, DEPLOY_SSH_USER+DEPLOY_SSH_HOST, DEPLOY_COMMAND, or MCP deploy tool."
exit 1

5. Wait and poll status

After invoking the deploy command, poll for completion:

See REFERENCE.md

Use exponential backoff for retries on transient failures:

See REFERENCE.md

6. Baseline smoke test

See REFERENCE.md

For comprehensive health-checking, chain to the smoke-test skill:

# After deploy success
bash scripts/run-smoke.sh "$DEPLOY_URL"

7. Three-independent-facts verification (e45s15)

Before declaring deploy success, verify three independent facts — build artifact, platform accept, live/registry reachability. See REFERENCE.md.

Verify

→ verify: command -v curl >/dev/null 2>&1 && test -f skills/smoke-test/SKILL.md


Deploy — Reference

Configuration

VariableDefaultDescription
ARTIFACT_DIRdistBuild output directory
DEPLOY_URL(required)Live URL for smoke test
DEPLOY_TIMEOUT300Max wait for deploy completion (seconds)
DEPLOY_POLL_INTERVAL30Polling interval (seconds)
RETRY_MAX3Max deploy retry attempts
BUILD_COMMAND(auto-detect)Override build command

Verification

→ verify: test -f deploy/SKILL.md && grep -q 'name: deploy' deploy/SKILL.md && echo OK → verify: grep -qi 'build\|artifact\|deploy\|smoke' deploy/SKILL.md && echo OK → verify: grep -ci 'package.json\|Cargo.toml\|Makefile\|manifest' deploy/SKILL.md | awk '{if($1>=1) print "OK"; else print "FAIL"}' → verify: grep -ci 'timeout\|poll\|status\|retry\|backoff' deploy/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}' → verify: grep -q 'curl.*DEPLOY_URL\|smoke\|health' deploy/SKILL.md && echo OK


Reference block 1

DEPLOY_TIMEOUT="${DEPLOY_TIMEOUT:-300}"   # seconds (default 5 minutes)
DEPLOY_POLL_INTERVAL="${DEPLOY_POLL_INTERVAL:-30}"  # seconds

start_time=$(date +%s)
while true; do
  elapsed=$(( $(date +%s) - start_time ))
  if [ "$elapsed" -ge "$DEPLOY_TIMEOUT" ]; then
    echo "FAIL: deploy status polling timed out after ${DEPLOY_TIMEOUT}s"
    exit 1
  fi
  
  status=$(get_deploy_status)  # platform-specific status check
  if [ "$status" = "ready" ] || [ "$status" = "done" ]; then
    echo "Deploy completed in ${elapsed}s"
    break
  f
阅读完整来源 ↗