Token导航 LogoToken导航

Agent Skill · 研究检索

python(Python 开发)

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

python 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 63,891。

总安装 309周安装 13GitHub Stars 38下载 108核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:python(Python 开发)
来源仓库:https://github.com/lanej/dotfiles
仓库路径:skills/python
安装命令:
npx skills add https://github.com/lanej/dotfiles --skill python
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/lanej/dotfiles --skill python

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

主要指令:使用 uv run 用于执行 Python 脚本和命令。

主要优点: 无需手动激活环境 自动依赖管理 极快的操作 适用于所有 Python 工作流程的单一工具 最常见的命令: uv运行脚本.py - 运行任何东西 uv添加包 - 添加依赖项 紫外同步 - 同步环境 uv python 引脚 3.11 - 设置Python版本 每周安装量 13 存储库 Lanej/点文件 GitHub 之星 38 第一次看到 2026 年 1 月 24 日 安全审计 Gen Agent Trust Hub 通行证 套接字通行证 斯尼克失败

来源仓库内路径:skills/python

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lanej/dotfiles --skill python;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

python 怎么安装?

在终端执行 npx skills add https://github.com/lanej/dotfiles --skill python。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

python 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

python 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/lanej/dotfiles --skill python;npx skills add lanej/dotfiles --skill "python" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

python 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

python 用的人多吗?

公开数据是累计安装 309 次,近一周安装 13 次,下载 108 次,GitHub 38 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

python 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
python

Python 开发 · 本页

30938执行命令MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Python/uv Development Skill

You are a Python development specialist using uv, an extremely fast Python package manager and project management tool. This skill provides comprehensive workflows, best practices, and common patterns for Python development with uv.

Why uv?

uv is the modern replacement for pip, virtualenv, poetry, and pyenv combined:

  • Extremely fast: 10-100x faster than pip
  • All-in-one: Package management, virtual environments, Python version management
  • Rust-powered: Built for speed and reliability
  • Compatible: Works with existing Python projects and tools

IMPORTANT: Avoid pip

DO NOT use pip commands. Always use uv equivalents:

  • WRONG: pip install requests → RIGHT: uv add requests
  • WRONG: pip install -r requirements.txt → RIGHT: uv sync
  • WRONG: pip freeze > requirements.txt → RIGHT: uv lock (creates uv.lock)
  • WRONG: python -m pip install → RIGHT: uv run or uv add

The only exception is legacy projects that explicitly require pip compatibility, and even then prefer migrating to uv.

Core Capabilities

  1. Project Management: init, add, remove, sync, lock
  2. Running Code: run (scripts and commands)
  3. Python Management: python (install, list, pin versions)
  4. Tools: tool (install and run CLI tools)
  5. Environments: venv (virtual environment creation)
  6. pip-compatible: pip interface for legacy workflows
  7. Building: build, publish packages

Quick Start

Running a Python Script

The most common use case - just run your script:

uv run script.py
uv run script.py arg1 arg2

What this does:

  • Automatically creates/uses virtual environment
  • Installs dependencies from pyproject.toml if present
  • Runs the script with the correct Python version

Running a Script with Dependencies

# Run with additional packages
uv run --with requests script.py
uv run --with requests --with pandas analyze.py

# Run with packages from requirements file
uv run --with-requirements requirements.txt script.py

Running a Python Module

uv run -m module_name
uv run -m pytest tests/
uv run -m black .

One-off Script Execution (No Project)

# Run a script in isolation
uv run --isolated script.py

# Run with specific Python version
uv run --python 3.11 script.py

# Run with dependencies without a project
uv run --with httpx --with rich my_script.py

Project Management

Creating a New Project

# Create application project
uv init my-app
uv init my-app --app

# Create library project
uv init my-lib --lib

# Create script (single file)
uv init my-script --script

# Create in current directory
uv init

# Create without package structure
uv init --bare  # Only creates pyproject.toml

Project types:

  • --app: Application (not meant to be imported)
  • --lib: Library (meant to be published and imported)
  • --script: Single-file script with inline dependencies

Managing Dependencies

# Add dependency
uv add requests
uv add "requests>=2.31.0"
uv add requests pandas numpy

# Add dev dependency
uv add --dev pytest
uv add --dev black ruff mypy

# Add optional dependency (extra)
uv add --extra docs sphinx

# Remove dependency
uv remove requests
uv remove --dev pytest

# Update dependencies
uv lock --upgrade
uv lock --upgrade-package requests

Syncing Environment

# Sync environment with lockfile
uv sync

# Sync without dev dependencies
uv sync --no-dev

# Sync with all extras
uv sync --all-extras

# Sync specific extra
uv sync --extra docs

# Exact sync (remove extraneous packages)
uv sync --exact

Lockfile Management

# Update lockfile
uv lock

# Update all packages
uv lock --upgrade

# Update specific package
uv lock --upgrade-package requests

# Lock without touching network (use cache only)
uv lock --offline

Python Version Management

Installing Python Versions

# Install specific Python version
uv python install 3.11
uv python install 3.12.1

# Install multiple versions
uv python install 3.11 3.12

# List available Python versions
uv python list

# List installed versions
uv python list --only-installed

Finding and Pinning Python

# Find Python installation
uv python find
uv python find 3.11

# Pin project to specific Python version
uv python pin 3.11
uv python pin 3.12.1

# This creates/updates .python-version file

Python Version in Projects

When you create a project, uv automatically:

  1. Creates .python-version file
  2. Detects or installs the appropriate Python version
  3. Uses it for all uv run commands in that project

Tool Management

Installing CLI Tools

# Install a tool globally
uv tool install ruff
uv tool install black
uv tool install httpie

# Install specific version
uv tool install "black==24.1.0"

# Run tool without installing
uv tool run ruff check .
uv tool run black --check .

Managing Installed Tools

# List installed tools
uv tool list

# Upgrade tools
uv tool upgrade ruff
uv tool upgrade --all

# Uninstall tool
uv tool uninstall ruff

# Show tool directory
uv tool dir

Common Tools to Install

# Linters and formatters
uv tool install ruff      # Fast linter and formatter
uv tool install black     # Code formatter
uv tool install mypy      # Type checker

# Testing
uv tool install pytest    # Test framework
uv tool install tox       # Test automation

# Utilities
uv tool install httpie    # HTTP client
uv tool install rich-cli  # Pretty terminal output
uv tool install pipx      # Legacy tool installer

Virtual Environments

Creating Virtual Environments

# Create venv in current directory
uv venv

# Create with specific Python version
uv venv --python 3.11

# Create in specific location
uv venv path/to/venv

# Create with specific name
uv venv .venv-dev

Using Virtual Environments

# Activate (traditional way)
source .venv/bin/activate

# Or just use uv run (recommended)
uv run python script.py
uv run pytest

Best Practice: With uv, you rarely need to manually activate environments. Just use uv run.

Legacy pip Interface (AVOID - Use Native uv Commands Instead)

WARNING: This interface exists only for legacy compatibility. Prefer native uv commands (uv add, uv sync, uv lock) over uv pip commands.

Only use uv pip when:

  • Working with a legacy project that cannot be migrated yet
  • Maintaining compatibility with existing CI/CD that expects pip commands
  • As a temporary bridge during migration

Better alternatives:

  • uv pip install requests → Use uv add requests instead
  • uv pip install -r requirements.txt → Use uv sync instead
  • uv pip freeze → Use uv lock instead
# Legacy pip-compatible commands (avoid if possible)
uv pip install requests              # Better: uv add requests
uv pip install -r requirements.txt   # Better: uv sync
uv pip list                          # Better: uv tree
uv pip show requests                 # Better: uv tree --package requests
uv pip freeze > requirements.txt     # Better: uv lock
uv pip uninstall requests            # Better: uv remove requests

Common Workflows

Workflow 1: New Python Project

# 1. Create project
uv init my-project --app
cd my-project

# 2. Add dependencies
uv add requests httpx rich

# 3. Add dev dependencies
uv add --dev pytest black ruff

# 4. Run your code
uv run python main.py

# 5. Run tests
uv run pytest

Workflow 2: Working with Existing Project

# 1. Clone repository
git clone <repo>
cd <repo>

# 2. Sync dependencies (reads pyproject.toml)
uv sync

# 3. Run the application
uv run python main.py

# 4. Run tests
uv run pytest

Workflow 3: Quick Script with Dependencies

# Option 1: Inline dependencies in script
cat > script.py << 'EOF'
# /// script
# dependencies = ["requests", "rich"]
# ///

import requests
from rich import print

response = requests.get("https://api.github.com")
print(response.json())
EOF

uv run --script script.py

# Option 2: Command-line dependencies
uv run --with requests --with rich script.py

Workflow 4: Testing and Linting

# Run tests
uv run pytest
uv run pytest tests/
uv run pytest -v --cov

# Format code
uv run black .
uv run ruff format .

# Lint code
uv run ruff check .
uv run ruff check --fix .

# Type check
uv run mypy .

Workflow 5: Dependency Updates

# 1. Check current dependencies
uv tree

# 2. Update all dependencies
uv lock --upgrade

# 3. Update specific package
uv lock --upgrade-package requests

# 4. Sync environment
uv sync

# 5. Run tests to verify
uv run pytest

Workflow 6: Building and Publishing

# Build package
uv build

# Publish to PyPI
uv publish

# Publish to test PyPI
uv publish --index https://test.pypi.org/simple/

Best Practices

1. Always Use uv run

Instead of:

# Don't do this
source .venv/bin/activate
python script.py

Do this:

# Do this
uv run script.py

Benefits:

  • Automatic environment management
  • Ensures dependencies are synced
  • Works consistently across systems

2. Pin Python Versions

Always create .python-version file:

uv python pin 3.11

This ensures everyone on the team uses the same Python version.

3. Use Lockfiles

Commit uv.lock to version control:

  • Ensures reproducible builds
  • Locks transitive dependencies
  • Faster installs for teammates

4. Separate Dev Dependencies

uv add --dev pytest black ruff mypy

This keeps production dependencies clean.

5. Use Scripts Section

In pyproject.toml:

[project.scripts]
my-cli = "my_package.cli:main"

[tool.uv]
dev-dependencies = [
    "pytest>=7.0.0",
    "black>=24.0.0",
]

Then run:

uv run my-cli

Project Structure

Typical uv Project Layout

my-project/
├── .python-version      # Python version (e.g., "3.11")
├── pyproject.toml       # Project config and dependencies
├── uv.lock             # Lockfile (commit this!)
├── .venv/              # Virtual environment (don't commit)
├── src/
│   └── my_package/
│       ├── __init__.py
│       └── main.py
└── tests/
    └── test_main.py

pyproject.toml Example

[project]
name = "my-project"
version = "0.1.0"
description = "My awesome project"
requires-python = ">=3.11"
dependencies = [
    "requests>=2.31.0",
    "rich>=13.0.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0.0",
    "black>=24.0.0",
    "ruff>=0.1.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv]
dev-dependencies = [
    "pytest>=7.0.0",
    "black>=24.0.0",
]

Advanced Features

Running with Extras

# Run with optional dependencies
uv run --extra docs sphinx-build
uv run --all-extras pytest

Dependency Groups

# Add to specific group
uv add --group test pytest

# Run with specific group
uv run --group test pytest

# Sync specific group
uv sync --group test

Environment Variables

# Use .env file
uv run --env-file .env script.py

# Override env file
uv run --no-env-file script.py

Offline Mode

# Work without network
uv run --offline script.py
uv sync --offline
uv lock --offline

Custom Indexes

# Use custom PyPI index
uv add requests --index https://my-pypi.org/simple/

# Use multiple indexes
uv add package --index https://index1.org/simple/ --index https://index2.org/simple/

Troubleshooting

Issue: Command not found after uv tool install

Solution: Update shell PATH

uv tool update-shell
# Then restart shell or source config

Issue: Python version not found

Solution: Install Python with uv

uv python install 3.11
uv python pin 3.11

Issue: Dependencies not syncing

Solution: Force sync

uv sync --reinstall
uv sync --exact

Issue: Cache issues

Solution: Clear cache

uv cache clean
uv run --no-cache script.py

Issue: Lock file out of sync

Solution: Regenerate lock

uv lock --upgrade
uv sync

Performance Tips

1. Use --frozen for CI/CD

# Skip lockfile updates in CI
uv sync --frozen
uv run --frozen pytest

2. Leverage Cache

uv automatically caches packages. To see cache:

uv cache dir

3. Parallel Operations

uv automatically parallelizes operations. No configuration needed.

Migration from Other Tools

From pip + virtualenv

# Old way
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python script.py

# New way
uv run script.py  # That's it!

From Poetry

# Old: poetry install && poetry run python script.py
# New:
uv sync && uv run python script.py

From Pipenv

# Old: pipenv install && pipenv run python script.py
# New:
uv sync && uv run python script.py

Integration with Other Tools

pytest

uv run pytest
uv run pytest --cov --cov-report=html

black/ruff

uv run black .
uv run ruff check --fix .

mypy

uv run mypy src/

jupyter

uv add --dev jupyter
uv run jupyter notebook

Quick Reference

# Run script
uv run script.py

# Run with dependencies
uv run --with requests script.py

# Project setup
uv init my-project
uv add package-name
uv add --dev pytest

# Environment management
uv sync
uv lock --upgrade

# Python management
uv python install 3.11
uv python pin 3.11

# Tools
uv tool install ruff
uv tool run black .

# Legacy compatibility (AVOID - use uv add/sync instead)
uv pip install package              # DON'T USE - use: uv add package
uv pip install -r requirements.txt  # DON'T USE - use: uv sync

# Testing and quality
uv run pytest
uv run black .
uv run ruff check .

Key Differences from pip/virtualenv

TaskOld Wayuv Way
Create venvpython -m venv.venvuv venv (or automatic)
Activatesource.venv/bin/activateNot needed with uv run
Install depspip install -r requirements.txtuv sync
Run scriptpython script.pyuv run script.py
Add packagepip install requestsuv add requests
Global toolpip install blackuv tool install black

Common Patterns

Pattern 1: Quick Data Analysis Script

uv run --with pandas --with matplotlib analyze.py

Pattern 2: Testing Before Commit

uv run pytest && uv run black --check . && uv run ruff check .

Pattern 3: Update All Dependencies

uv lock --upgrade && uv sync && uv run pytest

Pattern 4: Run with Specific Python

uv run --python 3.11 script.py

Pattern 5: Install and Run Tool

uv tool run ruff check .  # Installs if needed, then runs

Summary

Primary directive: Use uv run for executing Python scripts and commands.

Key advantages:

  • No manual environment activation needed
  • Automatic dependency management
  • Extremely fast operations
  • Single tool for all Python workflows

Most common commands:

  • uv run script.py - Run anything
  • uv add package - Add dependency
  • uv sync - Sync environment
  • uv python pin 3.11 - Set Python version

平台分布

Claude Code

31.97%
按下载量换算35

OpenCode

22.74%
按下载量换算25

Codex

19.71%
按下载量换算21

Antigravity

12.75%
按下载量换算14

Gemini CLI

7.8%
按下载量换算8

windsurf

3.26%
按下载量换算4

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/lanej/dotfiles --skill python;npx skills add lanej/dotfiles --skill "python" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills