You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reflex Agent Skills give AI coding assistants up-to-date guidance for building Reflex applications. They package Reflex-specific knowledge, setup steps, and process-management workflows into reusable skill files that agents can load when the conversation or codebase calls for them.
42
+
Reflex Agent Skills give AI coding assistants up-to-date guidance for building Reflex applications. They package Reflex-specific knowledge, setup steps, and process-management workflows into reusable `SKILL.md` files that agents can load when the conversation or codebase calls for them.
8
43
9
44
The skills are maintained in the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository and are designed for agents that support the Agent Skills standard, including Claude Code, Cursor, OpenCode, OpenAI Codex, and Pi.
10
45
11
-
## Why Use Skills
46
+
```python eval
47
+
skills_summary_cards()
48
+
```
49
+
50
+
## When to Use Skills
12
51
13
-
AI assistants can be very helpful when building Reflex apps, but their built-in training data may be stale or too general. Reflex Agent Skills help by giving the assistant project-specific instructions about:
52
+
Use Reflex Agent Skills when you want an AI assistant to follow Reflex-specific workflows instead of relying only on general training data. They are especially useful when an assistant needs to:
14
53
15
-
- How Reflex apps are structured.
16
-
- Which docs to consult for core concepts such as state, vars, events, components, routing, styling, database usage, API routes, authentication, and deployment.
17
-
- How to set up a Python environment for a new Reflex project.
18
-
- How to compile, run, reload, and debug Reflex app processes safely.
54
+
- Build or edit a Reflex app.
55
+
- Set up a new Python environment.
56
+
- Decide which Reflex docs apply to the task.
57
+
- Compile, run, restart, or debug a local Reflex server.
58
+
- Keep generated code aligned with current Reflex patterns.
19
59
20
-
Skills are loaded contextually by the agent. For example, when an assistant sees a Python file importing `reflex as rx`, it can load the Reflex docs skill. When you ask it to start a new app, it can load the Python environment setup skill before running project commands.
60
+
Skills load contextually. For example, when an assistant sees a Python file importing `reflex as rx`, it can load the Reflex docs skill. When you ask it to start a new app, it can load the Python environment setup skill before running project commands.
21
61
22
62
## Skills vs MCP
23
63
24
-
Skills and MCP solve related but different problems.
64
+
Skills and MCP solve related but different problems. For the best experience, use both.
25
65
26
-
Skills are local instruction packs. They tell the agent how to work with Reflex, which workflows to follow, and which references matter for common development tasks.
66
+
```md definition
67
+
# Skills
68
+
69
+
Local instruction packs that tell the agent how to work with Reflex, which workflows to follow, and which references matter for common development tasks.
27
70
28
-
MCP provides structured runtime access to Reflex documentation and component information through a hosted server. It is useful when the agent or editor can call MCP tools directly while working.
71
+
# MCP
29
72
30
-
For the best experience, use both:
73
+
Structured runtime access to Reflex documentation and component information through a hosted server. Use it when an agent or editor can call MCP tools directly.
74
+
```
31
75
32
-
- Use Skills for durable local guidance and repeatable workflows.
33
-
- Use MCP for structured documentation lookup and richer tool-assisted context.
76
+
```md alert info
77
+
# Use Skills for durable local guidance. Use MCP for structured documentation lookup and richer tool-assisted context.
78
+
```
34
79
35
80
## Installation
36
81
37
-
The Reflex skills repository can be installed in several ways depending on your assistant.
82
+
Choose the install path that matches your assistant.
38
83
39
-
### Claude Code
84
+
`````md tabs
85
+
86
+
## Claude Code
40
87
41
88
Install the plugin from the Claude Code plugin marketplace:
42
89
@@ -45,33 +92,40 @@ Install the plugin from the Claude Code plugin marketplace:
45
92
/plugin install reflex@reflex-agent-skills
46
93
```
47
94
48
-
### Cursor
95
+
Restart or refresh Claude Code after installation if the skills do not appear immediately.
96
+
97
+
98
+
## Cursor
49
99
50
100
Install from the Cursor Marketplace, or add the repository manually from:
51
101
52
102
```text
53
103
reflex-dev/agent-skills
54
104
```
55
105
56
-
In Cursor, you can add it through **Settings > Rules > Add Rule > Remote Rule (Github)**.
106
+
In Cursor, add it through **Settings > Rules > Add Rule > Remote Rule (GitHub)**.
107
+
57
108
58
-
### npx skills
109
+
##CLI
59
110
60
111
If your environment supports the `skills` CLI, install the package with:
61
112
62
113
```bash
63
114
npx skills add reflex-dev/agent-skills
64
115
```
65
116
66
-
### Clone or Copy
117
+
Use the CLI's update command later to keep the skill pack current.
67
118
68
-
You can also clone the repository and copy the skill folders into your assistant's skills directory:
Then copy the folders from`skills/` into the appropriate location:
128
+
Then copy the folders inside`skills/` into the appropriate location:
75
129
76
130
| Agent | Skill Directory |
77
131
| --- | --- |
@@ -81,57 +135,50 @@ Then copy the folders from `skills/` into the appropriate location:
81
135
| OpenAI Codex |`~/.codex/skills/`|
82
136
| Pi |`~/.pi/agent/skills/`|
83
137
138
+
Copy the skill folders themselves, not the parent `skills/` directory.
139
+
140
+
`````
141
+
84
142
## Included Skills
85
143
86
144
The Reflex skill pack includes three core skills.
87
145
88
-
### reflex-docs
146
+
`````md tabs
147
+
148
+
## Docs
89
149
90
150
The `reflex-docs` skill gives the assistant a Reflex-specific reference map and a summary of the framework's core concepts.
91
151
92
-
Use this skill when the assistant is:
152
+
### Use this skill when the assistant is:
93
153
94
154
- Building full-stack Python web apps with Reflex.
95
155
- Writing files that import `reflex` or use the `rx` namespace.
96
156
- Creating components.
97
157
- Managing state, vars, computed vars, or event handlers.
98
158
- Working with routing, styling, database models, assets, authentication, client storage, API routes, custom components, or wrapped React components.
99
159
100
-
The skill points the agent to the official Reflex docs for topics such as:
101
-
102
-
- Getting started.
103
-
- Components.
104
-
- State and vars.
105
-
- Events.
106
-
- Pages and routing.
107
-
- Styling.
108
-
- Database.
109
-
- Assets.
110
-
- Authentication.
111
-
- Client storage.
112
-
- API routes.
113
-
- API reference.
114
-
- Custom components.
115
-
- Wrapping React.
116
-
- Component library.
117
-
- Recipes.
160
+
### It points the assistant to docs for:
161
+
162
+
- Core app structure: getting started, components, state and vars, events, pages, and routing.
163
+
- UI and styling: styling, assets, the component library, and recipes.
164
+
- Backend features: database models, authentication, client storage, API routes, and API reference.
165
+
- Advanced integrations: custom components and wrapped React components.
118
166
119
167
It also reminds the assistant to prefer current Reflex documentation over pre-trained knowledge when there is a conflict.
120
168
121
-
### setup-python-env
169
+
170
+
## Setup
122
171
123
172
The `setup-python-env` skill guides the assistant through setting up a Python environment for a Reflex app.
124
173
125
-
Use this skill when:
174
+
### Use this skill when:
126
175
127
176
- Starting a new Reflex project.
128
177
- Setting up a development environment.
129
178
- There is no `.venv` directory.
130
179
- Reflex imports fail because dependencies are missing.
131
180
132
-
The workflow checks for an existing `.venv`, prefers `uv` when available, falls back to `python3 -m venv`, verifies Python 3.10 or newer, upgrades `pip` when using the fallback path, and installs Reflex if it is not already installed.
133
-
134
-
For a new app, the expected flow is:
181
+
### Preferred workflow:
135
182
136
183
```bash
137
184
uv venv .venv
@@ -140,7 +187,7 @@ uv add reflex
140
187
reflex init
141
188
```
142
189
143
-
If `uv` is not available, the skill uses:
190
+
If `uv` is not available, the skill falls back to:
144
191
145
192
```bash
146
193
python3 -m venv .venv
@@ -150,41 +197,48 @@ pip install reflex
150
197
reflex init
151
198
```
152
199
153
-
### reflex-process-management
200
+
The workflow checks for an existing `.venv`, verifies Python 3.10 or newer, and installs Reflex only when needed.
201
+
202
+
203
+
## Process
154
204
155
205
The `reflex-process-management` skill teaches the assistant how to compile, run, reload, and debug Reflex apps.
156
206
157
-
Use this skill when:
207
+
### Use this skill when:
158
208
159
209
- Testing that a Reflex app compiles.
160
210
- Starting a local Reflex server.
161
211
- Restarting a server after code changes.
162
212
- Reading logs to diagnose app errors.
163
213
164
-
The skill recommends validating changes with:
214
+
### Validation command:
165
215
166
216
```bash
167
217
reflex compile --dry
168
218
```
169
219
170
-
When the user asks the assistant to run a Reflex app, the skill starts the app in production mode and captures logs:
220
+
### Run command:
171
221
172
222
```bash
173
223
reflex run --env prod --single-port 2>&1| tee reflex.log
174
224
```
175
225
176
-
Production mode does not hot reload. To apply code changes, the assistant should stop the listening process for the app port and restart the server. The skill specifically uses `lsof` with `-sTCP:LISTEN` so the assistant targets the server process instead of browser connections:
226
+
Production mode does not hot reload. To apply code changes, the assistant should stop the listening process for the app port and restart the server:
177
227
178
228
```bash
179
229
lsof -i :<port> -sTCP:LISTEN -t
180
230
kill -INT $(lsof -i :<port> -sTCP:LISTEN -t)
181
231
```
182
232
183
-
If the server does not stop cleanly, the assistant can escalate to `SIGTERM` and then restart the app.
233
+
Using `-sTCP:LISTEN` helps the assistant target the server process instead of browser connections.
234
+
235
+
`````
184
236
185
237
## Recommended Workflow
186
238
187
-
### Starting a New Reflex Project
239
+
`````md tabs
240
+
241
+
## New App
188
242
189
243
1. Install Reflex Agent Skills in your assistant.
190
244
2. Ask the assistant to create or initialize a Reflex app.
@@ -193,20 +247,24 @@ If the server does not stop cleanly, the assistant can escalate to `SIGTERM` and
193
247
5. As the app is built, the assistant should use `reflex-docs` for current framework guidance.
194
248
6. Before handing the app back, the assistant should use `reflex-process-management` to compile or run the project.
195
249
196
-
### Working on an Existing App
250
+
251
+
## Existing
197
252
198
253
1. Open your Reflex project in an agent-enabled editor.
199
254
2. Ask for the feature, bug fix, or refactor you want.
200
255
3. The assistant should load `reflex-docs` when it sees Reflex code.
201
256
4. For local verification, the assistant should compile the app with `reflex compile --dry` or run it with the process-management workflow.
202
257
203
-
### Debugging a Running App
258
+
259
+
## Debugging
204
260
205
261
1. Ask the assistant to inspect the error.
206
262
2. The assistant should read `reflex.log` if the app was started through the process-management workflow.
207
263
3. The assistant should identify the failing import, component, event handler, route, or state update.
208
264
4. After applying a fix, the assistant should restart the app if it is running in production mode.
209
265
266
+
`````
267
+
210
268
## Keeping Skills Updated
211
269
212
270
Because Reflex evolves quickly, update the skill pack regularly.
@@ -222,7 +280,9 @@ Then copy the updated skill folders back into your assistant's skills directory
222
280
223
281
## Troubleshooting
224
282
225
-
### The Assistant Does Not Load the Skills
283
+
`````md tabs
284
+
285
+
## Loading
226
286
227
287
Check that:
228
288
@@ -231,11 +291,13 @@ Check that:
231
291
- Each skill folder contains a `SKILL.md` file.
232
292
- The assistant was restarted or refreshed after installation if required.
233
293
234
-
### The Assistant Gives Outdated Reflex Advice
294
+
295
+
## Outdated Advice
235
296
236
297
Ask the assistant to use the Reflex docs skill, or pair the skill pack with the Reflex MCP integration for structured access to current docs and component information.
237
298
238
-
### Reflex Commands Fail
299
+
300
+
## Commands
239
301
240
302
Ask the assistant to follow the `setup-python-env` skill again and verify:
241
303
@@ -244,10 +306,13 @@ Ask the assistant to follow the `setup-python-env` skill again and verify:
244
306
- Reflex is installed in the active environment.
245
307
- The command is being run from the project root.
246
308
247
-
### A Running App Does Not Reflect Code Changes
309
+
310
+
## App Updates
248
311
249
312
If the app was started with `--env prod`, it will not hot reload. Restart the server with the `reflex-process-management` workflow.
250
313
314
+
`````
315
+
251
316
## Contributing
252
317
253
318
Each skill lives in `skills/<name>/` and contains a `SKILL.md` manifest. To contribute new guidance, update or add a skill in the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository and follow the [Agent Skills spec](https://agentskills.io/) for the skill format.
0 commit comments