用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/davila7/claude-with-skills --skill safe-deploy命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| title | safe-deploy |
| name | safe-deploy |
| description | Deploy to a target environment after running pre-flight checks. Only invoke manually. |
| disable-model-invocation | true |
| argument-hint | ["environment"] |
| allowed-tools | Bash(npm test) Bash(npm run build) Bash(git status) Bash(git log *) Bash(git push *) Bash(git tag *) |
!git status --short
!git log --oneline -5
Deploy to: $ARGUMENTS
If $ARGUMENTS is empty, stop immediately. Report: "No environment specified. Invoke as: /safe-deploy (e.g., /safe-deploy staging or /safe-deploy production)."
Check the git status output above. If it shows any modified, untracked, or staged files, stop here.
Report: "Deploy aborted: the working tree has uncommitted changes. Commit or stash them before deploying to $ARGUMENTS."
Do not proceed past this step if there are uncommitted changes.
Run:
npm test
If any test fails, stop here. Report the failing test names and do not proceed.
Run:
npm run build
If the build fails, report the full error output and stop. Do not proceed.
Construct a tag name:
deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
Use the current UTC date and time. For example, a production deploy on 2026-05-13 at 14:32:07 UTC produces: deploy-production-20260513-143207.
Run:
git tag deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
Run:
git push origin deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
If the push fails, report the error. Do not retry automatically.
Print a final summary:
Deploy initiated.
Environment: $ARGUMENTS
Tag: deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
Commit: <git rev-parse HEAD output>
Time: <YYYY-MM-DD HH:MM:SS UTC>
If any step failed, do not print this summary. The failure report for the failing step is the final output.