uv 是一个用 Rust 编写的超高速 Python 包管理器。此技能可帮助您设置项目、管理依赖项,并借助 uv 的极速性能优化 Python 工作流程。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“uv-package-manager”。 使用 uv 初始化新的 Python 项目
预期结果:
Run: uv init my-project
This creates: pyproject.toml, .python-version, README.md, .gitignore
Then: cd my-project
Then: uv add requests pandas
正在使用“uv-package-manager”。 使用 uv 设置快速 CI/CD
预期结果:
Use: uv sync --frozen for exact reproducible installs
Enable caching with: enable-cache: true in GitHub Actions
Install Python: uv python install 3.12
安全审计
安全This skill is a documentation and guide for the legitimate uv Python package manager. The static analysis flagged 103 potential issues, but upon evaluation, all findings are false positives. The detected patterns (external commands, network URLs, filesystem access) are bash code examples within markdown documentation blocks, not executable code. The skill provides educational content about uv installation and usage - a trusted tool from Astral. No malicious intent detected.
高风险问题 (1)
中风险问题 (3)
质量评分
你能构建什么
快速 Python 项目设置
在几秒而非几分钟内快速初始化新的 Python 项目(含虚拟环境)、安装依赖项并开始编码。
规模化依赖项管理
管理复杂的依赖关系树、解决冲突,并通过锁文件为生产项目维护可复现构建。
CI/CD 流水线优化
通过使用 uv 进行更快的依赖项安装和缓存构建来加速 CI/CD 流水线。
试试这些提示
Help me install uv package manager and create a new Python project with a virtual environment.
Show me how to add dependencies to my Python project using uv. I want to add requests, pandas, and pytest.
Explain how to use uv lockfiles for reproducible builds and how to integrate them in CI/CD.
Show me how to optimize a Python Docker image using uv for faster builds and smaller images.
最佳实践
- 在生产环境中始终使用锁文件 (uv.lock) 以实现可复现构建
- 使用 .python-version 文件固定 Python 版本以保持一致性
- 使用 'uv run' 而非手动激活虚拟环境
避免
- 不要在生产环境中跳过锁文件——它们确保确定性构建
- 避免在 Docker 构建中通过 pip 安装 uv——应使用官方安装程序
- 不要忽略 Python 版本兼容性——显式固定版本