pre-ship-gate
Skill này làm gì
Kiểm tra xem bản cập nhật phần mềm đã thực sự được áp dụng thành công trong môi trường production hay chưa, thay vì chỉ tin vào thông báo thành công của công cụ triển khai. Nó đảm bảo người dùng đang dùng đúng phiên bản.
Khi nào nên dùng
- ✓Trước khi đưa phiên bản mới lên môi trường production.
- ✓Khi một bản cập nhật đã hoàn tất nhưng người dùng vẫn báo lỗi.
- ✓Khi kiểm tra cấu hình và các phụ thuộc đã đúng trước khi triển khai.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/pre-ship-gate/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra xem phiên bản đang chạy trên production có đúng là phiên bản tôi định triển khai không. Phiên bản tôi muốn triển khai là từ commit abc123.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Đầu tiên, công cụ kiểm tra xem tất cả điều kiện cần thiết để triển khai an toàn đã đủ chưa, như migration database đã sẵn sàng và feature flag đã bật. Sau khi triển khai xong, nó trực tiếp xác nhận với hệ thống đang chạy xem phiên bản nào thực sự đang hoạt động.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Pre-Ship Gate
Overview
Most bad deploys do not fail loudly. The pipeline goes green, the CLI prints "deployed", and the old or broken version is still what users hit. This skill is the gate you run right before a production deploy and right after, so an agent stops trusting deploy output and starts confirming what is actually live. It exists because "the deploy command exited 0" and "the new version is serving traffic" are two different facts, and agents routinely confuse them.
When to Use This Skill
- Use before running any command that pushes to a production or staging environment.
- Use when an agent is about to report "shipped", "deployed", or "live".
- Use when a deploy reported success but users still see the old behavior.
- Use when a release involves database migrations, feature flags, or a staged rollout.
How It Works
The gate has three phases. Do not skip to phase 3.
Phase 1: Pre-flight (before the deploy runs)
Walk the silent failure catalog. These are the modes that let a deploy "succeed" while production stays broken. For each one, confirm it or flag it. Do not assume.
- Migrations: Are schema migrations part of this release, and will they run against the target before the new code serves traffic? A deploy that ships code expecting a column that does not exist yet fails silently for users, not for the pipeline.
- Feature flags: Is the flag that gates this change actually enabled in the target environment, not just in dev? Shipped code behind an off flag looks like a no-op deploy.
- Build cache / stale assets: Could a cached build or CDN layer serve the previous bundle after deploy? Confirm the artifact hash or asset fingerprint changed.
- Release pointer: Does the deploy update the symlink, active revision, or traffic pointer, or does it only upload the new build? Uploading is not releasing.
- Staged rollout / canary: If traffic is staged, is it stuck at 0 percent or waiting on a manual promote? A canary that never promotes is not a deploy.
- Env and secrets: Are the env vars and secrets the new code needs present in the target, not just locally? Missing config surfaces as runtime errors, not deploy errors.
Phase 2: Run the deploy
The human or the deploy tooling runs the actual command. This skill does not execute the production deploy itself. It gates it.
Phase 3: Verify live (before saying "shipped")
Confirm the running system, not the deploy log.
- Fetch the live version or revision identifier from the running service and compare it to the one you intended to ship.
- Hit a health or status endpoint and confirm it returns the expected version, not just HTTP 200.
- Tail production logs for the first errors after cutover.
- Only after the live revision matches the intended revision may you report "shipped". If it does not match, report the mismatch, not success.
Examples
Example 1: Verifying the live revision instead of trusting the deploy log
# You intended to ship this commit
INTENDED="$(git rev-parse --short HEAD)"
# Ask the running service what it is actually serving
LIVE="$(curl -fsS https://your-service.example.com/health | jq -r '.revision')"
if [ "$INTENDED" = "$LIVE" ]; then
echo "Live revision $LIVE matches intended $INTENDED: verified shipped."
else
echo "MISMATCH: intended $INTENDED but live is $LIVE. Do not report shipped."
fi
Example 2: Pre-flight verdict format an agent can emit
PRE-SHIP GATE, verdict: HOLD
- Migrations: 1 pending (add_users_status_col): NOT yet applied to prod. BLOCK.
- Feature flags: new_checkout flag is OFF in prod. Enabling required post-deploy.
- Build assets: new bundle hash confirmed (a1b2c3 != previous 9f8e7d). OK.
- Release pointer: deploy updates active symlink. OK.
- Rollout: canary at 10%, manual promote required. NOTE.
- Env/secrets: STRIPE_KEY present in prod. OK.
Reason for HOLD: run migration add_users_status_col before cutover, or the
new code will 500 on /orders.
Best Practices
- ✅ Treat "the command exited 0" and "the new version is live" as separate facts, and verify the second one.
- ✅ Emit an explicit verdict (SHIP / HOLD) with the failing item named, not a vague "looks good".
- ✅ Compare a live revision identifier against the intended one after every deploy.
- ✅ Name the specific silent failure mode you are worried about, so a human can override with context.
- ❌ Do not report "shipped" from deploy output alone.
…
Câu hỏi thường gặp
Tại sao không thể chỉ tin vào thông báo “thành công” của việc triển khai?
Vì công cụ triển khai có thể báo đã hoàn tất, nhưng người dùng vẫn có thể thấy phiên bản cũ hoặc bị lỗi. Hệ thống này kiểm tra những gì thực sự đang chạy.
“Lỗi im lặng” là gì?
Đó là các vấn đề khiến việc triển khai có vẻ thành công nhưng phần mềm vẫn lỗi với người dùng. Ví dụ như code mới chưa được bật bằng feature flag, hoặc migration database chưa được áp dụng.
Hệ thống này có tự triển khai giúp tôi không?
Không, nó không chạy việc triển khai. Nó hoạt động như một người gác cổng, kiểm tra mọi thứ trước và sau khi triển khai để đảm bảo mọi việc diễn ra suôn sẻ.
Chi tiết
Mô tả gốc của tác giả
A ship gate that runs before any production deploy: checks the silent failure modes that make a deploy 'succeed' while prod stays broken, then verifies the live revision instead of trusting deploy output.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5489
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.