Agent Skillsreflex-dev/xy › setup-python-env

setup-python-env

GitHub

用于初始化Python虚拟环境并安装Reflex框架,支持检测现有环境、使用uv或pip创建venv及依赖安装。

.agents/skills/setup-python-env/SKILL.md reflex-dev/xy

Trigger Scenarios

初始化新的Reflex项目 设置开发环境 用户请求创建venv并安装依赖 没有.venv目录时 导入因缺少包而失败时

Install

npx skills add reflex-dev/xy --skill setup-python-env -g -y
More Options

Non-standard path

npx skills add https://github.com/reflex-dev/xy/tree/main/.agents/skills/setup-python-env -g -y

Use without installing

npx skills use reflex-dev/xy@setup-python-env

指定 Agent (Claude Code)

npx skills add reflex-dev/xy --skill setup-python-env -a claude-code -g -y

安装 repo 全部 skill

npx skills add reflex-dev/xy --all -g -y

预览 repo 内 skill

npx skills add reflex-dev/xy --list

SKILL.md

Frontmatter
{
    "name": "setup-python-env",
    "description": "Set up a Python virtual environment and install Reflex. Use when initializing a new Reflex project, setting up a development environment, or when the user needs to create a venv and install dependencies. Load when there is no .venv directory, when the user asks to start a new Reflex app, or when imports fail due to missing packages."
}

Python Environment Setup for Reflex

This skill handles creating a Python virtual environment and installing Reflex.

Step 1: Check for an existing virtual environment

Look for a .venv directory in the project root:

ls -d .venv 2>/dev/null

If .venv exists, activate it and skip to Step 3.

source .venv/bin/activate

Step 2: Create the virtual environment

If no .venv exists, determine which tools are available.

Option A: uv is available

Check if uv is installed:

uv --version

If uv is found:

  1. If no pyproject.toml exists, initialize one:

    uv init --bare
    
  2. Create the virtual environment:

    uv venv .venv
    
  3. Activate it:

    source .venv/bin/activate
    

Skip to Step 3.

Option B: Fall back to python / pip

If uv is not available, check the Python version:

python3 --version

If the version is older than 3.10, stop and inform the user:

Python 3.10 or newer is required. Please install a more up-to-date version of Python before continuing.

If the version is 3.10 or newer:

  1. Create the virtual environment:

    python3 -m venv .venv
    
  2. Activate it:

    source .venv/bin/activate
    
  3. Upgrade pip:

    pip install --upgrade pip
    

Step 3: Install Reflex

Check if Reflex is already installed:

pip show reflex 2>/dev/null

If Reflex is not installed:

If using uv:

uv add reflex

If using pip:

pip install reflex

Version History

  • eb37670 Current 2026-08-02 21:48

Same Skill Collection

.agents/skills/reflex-docs/SKILL.md
.agents/skills/reflex-process-management/SKILL.md
.agents/skills/codspeed-optimize/SKILL.md
.agents/skills/codspeed-setup-harness/SKILL.md

Metadata

Files
0
Version
eb37670
Hash
b48de4d5
Indexed
2026-08-02 21:48

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-03 02:20
浙ICP备14020137号-1 $Гость$