Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"source": "./",
"strict": false,
"skills": ["./skills/reflex-docs"]
},
{
"name": "setup-python-env",
"description": "Set up a Python virtual environment and install Reflex for new projects",
"source": "./",
"strict": false,
"skills": ["./skills/setup-python-env"]
}
]
}
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Agents

## Initializing a New Reflex Project

When starting a new Reflex project or setting up a development environment, you **must** follow the [setup-python-env](skills/setup-python-env/SKILL.md) skill before doing anything else.

Do not skip any steps. Do not assume a virtual environment or Reflex is already available — always verify first by following the skill's instructions in order.

After the environment is ready and Reflex is installed, run:

```bash
reflex init
```

Then proceed with the user's request.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ Clone this repo and copy the skill folders into the appropriate directory for yo

Skills are contextual and auto-loaded based on your conversation.

| Skill | Description |
| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| [reflex-docs](skills/reflex-docs/SKILL.md) | Framework documentation covering components, state management, events, styling, database, routing, authentication, and more |
| Skill | Description |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| [reflex-docs](skills/reflex-docs/SKILL.md) | Framework documentation covering components, state management, events, styling, database, routing, authentication, and more |
| [setup-python-env](skills/setup-python-env/SKILL.md) | Set up a Python virtual environment and install Reflex for new projects |

## MCP Servers

Expand Down
114 changes: 114 additions & 0 deletions skills/setup-python-env/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
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:

```bash
ls -d .venv 2>/dev/null
```

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

```bash
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:

```bash
uv --version
```

If `uv` is found:

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

```bash
uv init --bare
```

2. Create the virtual environment:

```bash
uv venv .venv
```

3. Activate it:

```bash
source .venv/bin/activate
```

Skip to **Step 3**.

### Option B: Fall back to `python` / `pip`

If `uv` is not available, check the Python version:

```bash
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:

```bash
python3 -m venv .venv
```

2. Activate it:

```bash
source .venv/bin/activate
```

3. Upgrade pip:

```bash
pip install --upgrade pip
```

## Step 3: Install Reflex

Check if Reflex is already installed:

```bash
pip show reflex 2>/dev/null
```

If Reflex is **not** installed:

### If using `uv`:

```bash
uv add reflex
```

### If using `pip`:

```bash
pip install reflex
```
Loading