用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cwijayasundara/claude_harness_eng_v4 --skill deploy命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | deploy |
| description | Generate Docker Compose stack, Dockerfiles, environment config, and init.sh bootstrap script. |
| argument-hint | [--up] |
| context | fork |
| agent | planner |
/deploy
/deploy --up
/deploy — generate all deployment files without starting services./deploy --up — generate files and immediately run bash init.sh to start the stack.The following must exist before running this skill:
backend/ and/or frontend/ — source code with known runtimes and entry points.specs/design/deployment.md — deployment architecture decisions (DB engine, port assignments, service names).project-manifest.json — for service names, port config, and environment variable inventory.If any of these are missing, stop and report what is absent.
Read project-manifest.json. Extract:
Read specs/design/deployment.md. Extract:
docker-compose.ymlGenerate docker-compose.yml at the project root from the deployment template.
Requirements:
depends_on with a condition: service_healthy entry.healthcheck block with a realistic test, interval, timeout, and retries.postgres:16-alpine), never latest.backend/Dockerfile
builder stage installs dependencies, runtime stage copies only the built artefact.EXPOSE the port declared in the manifest.HEALTHCHECK instruction matching the health check endpoint.frontend/Dockerfile (if frontend exists)
EXPOSE the frontend port..env.exampleGenerate .env.example at the project root.
Every environment variable referenced in docker-compose.yml or either Dockerfile must have an entry. Each entry must include a comment explaining what it is and what format it expects:
# Database connection string
DATABASE_URL=postgresql://user:pass@db:5432/appdb
# JWT signing secret — generate with: openssl rand -hex 32
JWT_SECRET=change-me-in-production
No variable may appear in compose or Dockerfiles without a corresponding .env.example entry.
init.shGenerate init.sh at the project root from the init template.
The script must:
.env.example to .env if .env does not already exist.docker compose build.docker compose up -d.Make init.sh executable (chmod +x init.sh).
This gate runs BEFORE the stack is started — it exists to catch invalid compose syntax, port conflicts, and missing health checks before they become runtime failures.
First, validate syntax deterministically:
docker compose config
Fix any errors before spawning the evaluator.
Then spawn the evaluator agent (artifact mode) to validate deploy artifacts.
Agent invocation:
Spawn Agent with subagent_type="evaluator" and prompt:
Ratchet loop (max 2 iterations):
--up on an unresolved FAIL — report the failure instead.--up FlagOnly after the gate above has passed (or warnings were explicitly accepted), run:
bash init.sh
Report the output. If any service fails its health check, print the service logs and stop.
| Path | Purpose |
|---|---|
docker-compose.yml | Full service stack definition |
backend/Dockerfile | Backend container build |
frontend/Dockerfile | Frontend container build (if applicable) |
.env.example | All required environment variables documented |
init.sh | Bootstrap script: build, start, health check |
depends_on with health conditions. Services that start before their dependencies are ready cause intermittent failures. Always use condition: service_healthy.docker compose down. Bind mounts to host paths break in CI and on other machines.docker-compose.yml. All secrets go in .env..env.example entries. New variables added to compose but not documented leave other developers with silent failures.latest image tags. Tags like postgres:latest break reproducibility. Pin to a specific version.Discover and map an existing codebase before planning or changing it.
Change the behavior of existing code — story-driven by default, or --issue N for a GitHub bug fix. Test-first, full verification, code review.
Use when a planned change touches persisted data shape — ORM models, migration files, schema definitions, serialized formats, or message contracts — in /change, /refactor, or /implement on an existing codebase. Routes schema changes through expand-contract and proves reversibility before any deploy.
基于 SOC 职业分类