蟒蛇部署
- 作者仓库星标 0
- 作者仓库 skills-registry
- 领域
- 运维部署
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tomevault-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:如果有未提交的更改则中止
检查上面的 git status 输出。如果它显示任何行(已修改、未跟踪、暂存或已删除的文件),请在此处停止。报告:“部署中止:存在未提交的更改。在部署到 $ARGUMENTS 之前提交或存储它们。”干净的工作树没有显示`git status --short`的输出。除非输出为空,否则不要继续。
第 2 步:运行测试套件
运行:如果任何测试失败,则报告失败的测试名称和计数,然后停止。不要继续。如果未安装 pytest,请尝试: 如果两者都不可用,则报告未找到测试运行程序并停止。请勿在未运行测试的情况下进行部署。
第 3 步:构建分发包
运行:这需要`build`包。如果未安装,请运行:然后重试`python -m build`。如果构建失败,报告错误输出并停止。成功后,确认输出:`dist/`目录应包含一个`.whl`和一个`.tar.gz`文件。
步骤 4:创建部署标签
构建标签名称:使用当前 UTC 日期和时间。示例:`deploy-staging-20260513-143207`。运行:
第五步:推送标签
运行:如果推送失败,报错并停止。
第 6 步:报告成功
打印最终摘要:来源:davila7/claude-with-skills — 由 TomeVault 分发。
## Pre-flight checks
!`git status --short`
!`git log --oneline -5`
---
Deploy to: $ARGUMENTS
If `$ARGUMENTS` is empty, stop immediately. Report: "No environment specified. Invoke as: /python-deploy <environment> (e.g., /python-deploy staging or /python-deploy production)."
### Step 1: Abort if there are uncommitted changes
Check the git status output above. If it shows any lines (modified, untracked, staged, or deleted files), stop here.
Report: "Deploy aborted: there are uncommitted changes. Commit or stash them before deploying to $ARGUMENTS."
A clean working tree shows no output from `git status --short`. Do not proceed unless the output is empty.
### Step 2: Run the test suite
Run:
```
python -m pytest
```
If any tests fail, report the failing test names and count, then stop. Do not proceed.
If pytest is not installed, try:
```
python -m unittest discover
```
If neither is available, report that no test runner was found and stop. Do not deploy without running tests.
### Step 3: Build the distribution package
Run:
```
python -m build
```
This requires the `build` package. If it is not installed, run:
```
pip install build
```
Then retry `python -m build`.
If the build fails, report the error output and stop.
On success, confirm the output: the `dist/` directory should contain a `.whl` and a `.tar.gz` file.
### Step 4: Create a deployment tag
Construct the tag name:
```
deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
```
Use current UTC date and time. Example: `deploy-staging-20260513-143207`.
Run:
```
git tag deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
```
### Step 5: Push the tag
Run:
```
git push origin deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
```
If the push fails, report the error and stop.
### Step 6: Report success
Print a final summary:
```
Deploy initiated.
Environment: $ARGUMENTS
Tag: deploy-$ARGUMENTS-<YYYYMMDD>-<HHMMSS>
Time: <YYYY-MM-DD HH:MM:SS UTC>
Build artifacts: dist/
```
---
> Source: [davila7/claude-with-skills](https://github.com/davila7/claude-with-skills) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->
章节与文件索引
按说明文件中的顺序排列。
飞行前检查
第 1 步:如果有未提交的更改则中止
第 2 步:运行测试套件
第 3 步:构建分发包
步骤 4:创建部署标签
文件/命令 -> git status --short · git log --oneline -5 · $ARGUMENTS · build · python -m build · dist/ · .whl · .tar.gz
内容校验值 -> da4a602d62e7
当前原文的自动摘译,尚未人工审校。
飞行前检查
!
git status --short!git log --oneline -5部署到:$ARGUMENTS 如果$ARGUMENTS为空,立即停止。报告:“未指定环境。调用为:/python-deploy <环境>(例如,/python-deploy staging 或 /python-deploy production)。”第 1 步:如果有未提交的更改则中止
检查上面的 git status 输出。如果它显示任何行(已修改、未跟踪、暂存或已删除的文件),请在此处停止。报告:“部署中止:存在未提交的更改。在部署到 $ARGUMENTS 之前提交或存储它们。”干净的工作树不显示
git status --short的输出。除非输出为空,否则不要继续。