Agent Skillsnixopus/nixopus › pre-deploy-checklist

pre-deploy-checklist

GitHub

部署前检查清单,验证Dockerfile、端口、环境变量、构建命令、依赖锁定及迁移等配置,提前发现部署风险。

api/skills/pre-deploy-checklist/SKILL.md nixopus/nixopus

Trigger Scenarios

准备触发构建或部署时 检查应用部署就绪状态

Install

npx skills add nixopus/nixopus --skill pre-deploy-checklist -g -y
More Options

Non-standard path

npx skills add https://github.com/nixopus/nixopus/tree/master/api/skills/pre-deploy-checklist -g -y

Use without installing

npx skills use nixopus/nixopus@pre-deploy-checklist

指定 Agent (Claude Code)

npx skills add nixopus/nixopus --skill pre-deploy-checklist -a claude-code -g -y

安装 repo 全部 skill

npx skills add nixopus/nixopus --all -g -y

预览 repo 内 skill

npx skills add nixopus/nixopus --list

SKILL.md

Frontmatter
{
    "name": "pre-deploy-checklist",
    "metadata": {
        "version": "1.0"
    },
    "description": "Validate deployment readiness before triggering a build — check Dockerfile, ports, env vars, healthchecks, and resource config. Use before any deployment to catch common configuration issues early."
}

Pre-Deploy Checklist

Run through this checklist before triggering any deployment. Each check uses workspace tools. Report all findings, do not stop at the first failure.

Checklist

1. Dockerfile exists and is valid

  • Use read_file on the Dockerfile path
  • Verify it has a FROM directive
  • Verify it has an EXPOSE directive matching the expected port
  • Verify it ends with a CMD or ENTRYPOINT
  • If using multi-stage, verify the final stage copies the built artifacts

If Dockerfile is missing: Use the dockerfile-generation skill to generate one.

2. Port configuration matches

  • Compare: Dockerfile EXPOSE value, app's actual listen port, any PORT env var, and the port configured in the Nixopus application
  • All must agree. Mismatched ports are a top deployment failure cause.
  • If using docker-compose, also check the ports: mapping

3. Required env vars are set

  • Run env detection (use env-detection skill) to find all required vars
  • Cross-reference with what's configured in the Nixopus application
  • Flag any missing required vars
  • Flag any vars using placeholder values (your-api-key-here, change-me, TODO)

4. Build command works

  • Check package.json scripts.build (or equivalent) exists
  • If TypeScript, check tsconfig.json exists and outDir is set
  • Check that the build output directory referenced in the Dockerfile matches the actual build output

5. Dependencies are locked

  • Check for a lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml, Cargo.lock, poetry.lock, go.sum)
  • Using npm install instead of npm ci in a Dockerfile without a lockfile leads to inconsistent builds

6. .dockerignore exists

  • Check for .dockerignore file
  • Must include at minimum: node_modules, .git, dist, .env
  • Missing .dockerignore causes bloated build contexts and potential secret leaks

7. Healthcheck endpoint

  • For API servers: check if there's a /health or /healthz or /api/health endpoint
  • If the Dockerfile or compose file includes a HEALTHCHECK, verify the endpoint exists in code
  • Not strictly required but recommended — flag as warning if missing

8. Database migrations

  • Check if the app has a migration system (prisma, typeorm, knex, alembic, django migrate, goose)
  • If yes, verify the migration command is included in the deployment flow (compose command:, Dockerfile CMD, or Nixopus pre-deploy hook)
  • Unmigrated databases after deploy cause runtime crashes

Result format

Report as a table:

Check Status Details
Dockerfile PASS/FAIL/WARN What was found or missing
Port match PASS/FAIL Expected vs actual
Env vars PASS/FAIL Count of missing vars
Build command PASS/FAIL The command found
Lockfile PASS/WARN Which lockfile, or none
.dockerignore PASS/WARN Present or missing
Healthcheck PASS/WARN Endpoint found or none
Migrations PASS/WARN/N/A Migration tool and command

Only block deployment (report FAIL) for checks 1-4. Checks 5-8 are warnings that should be reported but don't block.

Summary Format

Report the checklist table, then: Ready: what looks good Warnings: non-critical issues Blockers: must fix before deploy Recommendations: specific fixes with code blocks

Version History

  • cf05d97 Current 2026-08-20 14:52

Same Skill Collection

api/skills/api-catalog/SKILL.md
api/skills/caddyfile-generation/SKILL.md
api/skills/compose-setup/SKILL.md
api/skills/container-resource-tuning/SKILL.md
api/skills/cpp-deploy/SKILL.md
api/skills/database-migration/SKILL.md
api/skills/deno-deploy/SKILL.md
api/skills/deploy-delegation/SKILL.md
api/skills/deploy-flow/SKILL.md
api/skills/deployment-analysis/SKILL.md
api/skills/diagnostic-workflow/SKILL.md
api/skills/dockerfile-generation/SKILL.md
api/skills/dockerignore-generation/SKILL.md
api/skills/domain-attachment/SKILL.md
api/skills/domain-tls-routing/SKILL.md
api/skills/dotnet-deploy/SKILL.md
api/skills/elixir-deploy/SKILL.md
api/skills/failure-diagnosis/SKILL.md
api/skills/github-onboarding/SKILL.md
api/skills/github-workflow/SKILL.md
api/skills/gleam-deploy/SKILL.md
api/skills/go-deploy/SKILL.md
api/skills/incident-response/SKILL.md
api/skills/java-deploy/SKILL.md
api/skills/machine-ops/SKILL.md
api/skills/mcp-integrations/SKILL.md
api/skills/monorepo-strategy/SKILL.md
api/skills/nixopus-docs/SKILL.md
api/skills/node-deploy/SKILL.md
api/skills/onboarding/SKILL.md
api/skills/php-deploy/SKILL.md
api/skills/post-deploy-verification/SKILL.md
api/skills/python-deploy/SKILL.md
api/skills/rollback-strategy/SKILL.md
api/skills/ruby-deploy/SKILL.md
api/skills/rust-deploy/SKILL.md
api/skills/self-heal/SKILL.md
api/skills/shell-deploy/SKILL.md
api/skills/static-deploy/SKILL.md

Metadata

Files
0
Version
cf05d97
Hash
65963bec
Indexed
2026-08-20 14:52

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 23:16
浙ICP备14020137号-1 $방문자$