Borrowing it
Nothing to install: this file belongs to Asheng008/unifiles-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Asheng008/unifiles-mcp/main/.cursor/commands/publish-to-pypi.mdgit clone --depth 1 https://github.com/Asheng008/unifiles-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/asheng008/unifiles-mcp/publish-to-pypi)<a href="https://agentmods.dev/commands/asheng008/unifiles-mcp/publish-to-pypi"><img src="https://agentmods.dev/badge/commands/asheng008/unifiles-mcp/publish-to-pypi/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/asheng008/unifiles-mcp/publish-to-pypi"><img src="https://agentmods.dev/badge/commands/asheng008/unifiles-mcp/publish-to-pypi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01516 |
| Opus 5 | $0.00000 | $0.00758 |
| Sonnet 5 | $0.00000 | $0.00303 |
| Haiku 4.5 | $0.00000 | $0.00152 |
Grade A, and why
publish-to-pypi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
发布 Python 包到 PyPI
将当前项目(unifiles-mcp)打包并发布到 PyPI(Python Package Index)。
目标
- 清理旧的构建产物
- 构建新的分发包(sdist + wheel)
- 上传到 TestPyPI(测试)或正式 PyPI(生产)
使用方式
用户可以通过以下方式触发:
/publish-to-pypi test- 发布到 TestPyPI(测试)/publish-to-pypi或/publish-to-pypi prod- 发布到正式 PyPI(生产)
替代方式:也可在项目根目录直接运行脚本 publish_pypi.bat test 或 publish_pypi.bat,效果相同。
必做步骤
1. 检查前置条件
在执行发布前,检查以下内容:
- 确认
pyproject.toml中的version已更新(不能与已发布版本重复) - 确认
pyproject.toml中的name在 PyPI 上可用(TestPyPI 可重复,正式 PyPI 必须唯一) - 确认已创建
LICENSE文件(本项目使用 MIT 许可证) - 确认
README.md内容完整(会显示在 PyPI 项目页面) - 确认
src/unifiles_mcp/__init__.py中__version__与pyproject.toml的version一致
2. 执行发布流程
根据用户选择的目标(test 或 prod),执行以下步骤:
步骤 1:激活虚拟环境
.\.venv\Scripts\Activate.ps1
如果虚拟环境不存在,提示用户先创建:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
步骤 2:安装/升级构建工具
pip install --upgrade build twine
步骤 3:清理旧构建并构建新分发包
chcp 65001
Remove-Item -Recurse -Force dist -ErrorAction SilentlyContinue
python -m build
说明:
chcp 65001设置 UTF-8 编码,避免中文输出乱码Remove-Item清理旧的dist/目录python -m build生成新的分发包(sdist + wheel)
步骤 4:验证构建产物
检查 dist/ 目录是否包含:
unifiles_mcp-*.tar.gz文件(源码分发包)unifiles_mcp-*-py3-none-any.whl文件(wheel 分发包)
如果构建失败,停止流程并报告错误。
步骤 5:上传到 PyPI
如果目标是 TestPyPI(test):
python -m twine upload --repository testpypi dist/*
如果目标是正式 PyPI(prod 或默认):
python -m twine upload dist/*
认证信息:
- Username:
__token__ - Password: 用户的 PyPI API Token(含
pypi-前缀)
注意:
- TestPyPI 和正式 PyPI 使用不同的账号和 Token
- Token 创建后只显示一次,需妥善保存
- 如果用户配置了
.pypirc文件,twine 会自动使用其中的凭证
3. 验证发布结果
上传成功后,提示用户:
- TestPyPI: 访问
https://test.pypi.org/project/unifiles-mcp/查看 - 正式 PyPI: 访问
https://pypi.org/project/unifiles-mcp/查看
并提供安装测试命令:
# TestPyPI
pip install --index-url https://test.pypi.org/simple/ --no-deps unifiles-mcp
# 正式 PyPI
pip install unifiles-mcp
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 162 lines · 0 tokens per session scan A 319aff52be3d
publish-to-pypi is a command published in the GitHub repository Asheng008/unifiles-mcp (0 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,516 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
type-coverage
Vérification Couverture des Types Python.
execute-pydantic-ai-prp
Implement a Pydantic AI agent using the PRP file.
fastapi
FastAPI application design and implementation conventions. Use this skill when building, updating, or reviewing FastAPI services, routers, dependencies, request/response schemas, streaming endpoints, or API tests. Trigger on FastAPI-specific work such as path operation design, dependency injection, response models…
scaffold-service
Scaffold a thin ArchiPy FastAPI or gRPC service under services/{domain}/v{n}/.
savant-python
Python performance optimization with Python Developer agent.
python-review
Comprehensive Python code review for PEP 8 compliance, type hints, security, and Pythonic idioms. Invokes the python-reviewer agent.