unifiles-mcp: Command for Claude Code

.cursor/commands/publish-to-pypi.md

publish-to-pypi is a command for Claude Code, Cursor from Asheng008/unifiles-mcp. It costs 0 tokens per session (1,516 once invoked), scanned A, original, MIT.

A command workflow for packaging and publishing the unifiles-mcp Python project to PyPI, the public package index for Python software. It supports TestPyPI for trial releases and the main PyPI service for production releases.

In plain words
What is it for?
Preparing the virtual environment, building source and wheel packages, validating them, and publishing test or production releases.
Why use it?
It reduces release mistakes by checking versions, metadata, licensing, build files, and package contents before upload.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

This is Asheng008/unifiles-mcp's own configuration. It tells Claude Code and Cursor how to work on unifiles-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unifiles-mcp configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Asheng008/unifiles-mcp/main/.cursor/commands/publish-to-pypi.md
Clone the repo
git clone --depth 1 https://github.com/Asheng008/unifiles-mcp

Made for: Claude Code, Cursor.

Wrote 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.

agentmods badge for publish-to-pypi

README.md
[![agentmods](https://agentmods.dev/badge/commands/asheng008/unifiles-mcp/publish-to-pypi/github.svg)](https://agentmods.dev/commands/asheng008/unifiles-mcp/publish-to-pypi)
Your own site
<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.

agentmods 80×15 button for publish-to-pypi

Your own site · 80×15
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,516 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 12d ago against content hash 319aff52be3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

.cursor/commands/publish-to-pypi.md · 162 lines

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 testpublish_pypi.bat,效果相同。

必做步骤

1. 检查前置条件

在执行发布前,检查以下内容:

  • 确认 pyproject.toml 中的 version 已更新(不能与已发布版本重复)
  • 确认 pyproject.toml 中的 name 在 PyPI 上可用(TestPyPI 可重复,正式 PyPI 必须唯一)
  • 确认已创建 LICENSE 文件(本项目使用 MIT 许可证)
  • 确认 README.md 内容完整(会显示在 PyPI 项目页面)
  • 确认 src/unifiles_mcp/__init__.py__version__pyproject.tomlversion 一致

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

Read the full file on GitHub · 162 lines

Changes

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.

  1. 12d ago First seen · 162 lines · 0 tokens per session scan A 319aff52be3d

Subscribe to this mod's changes

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.