Skill Directory Structure
src/ui-ux-pro-max/data/stacks/reflex-ui/
├── manifest.json
├── techstack.md
├── rules.md
├── templates/
│ ├── template#12/
│ │ ├── reflex_app.py # Entry point with app = rx.App()
│ │ ├── pages/
│ │ │ ├── index.py # Home page component
│ │ │ ├── about.py
│ │ │ └── dashboard.py
│ │ ├── components/
│ │ │ ├── navbar.py
│ │ │ ├── footer.py
│ │ │ ├── form.py
│ │ │ └── modal.py
│ │ ├── state/
│ │ │ ├── base_state.py # Shared state (auth, nav, toasts)
│ │ │ └── form_state.py # Feature-specific state
│ │ └── requirements.txt
│ └── ...
└── examples/
├── form-validation/
├── dashboard-layout/
├── data-table/
└── modal-dialog/
techstack.md
Tech Stack: Reflex UI + Python (Zero-JS)
ALLOWED
Python 3.11+
Reflex (https://github.com/reflex-dev/reflex)
Reflex rx.* components only (rx.box, rx.flex, rx.text, rx.button, rx.input, rx.select, rx.dialog, rx.drawer, rx.cond, rx.foreach, rx.match, rx.html, etc.)
Reflex rx.State for all state management
Reflex rx.Var for reactive variables
Reflex style prop dicts for styling
Reflex class_name prop for Tailwind utility classes (secondary, when explicitly requested)
Reflex rx.App() routing via app.add_page()
Reflex rx.redirect() for programmatic navigation
Reflex event handlers as State methods
Reflex rx.event and rx.background_task for async/side-effects
Standard Python stdlib (os, pathlib, json, httpx, etc.)
Python-only packages via requirements.txt (SQLAlchemy, pydantic, httpx, etc.)
FORBIDDEN
No HTML files. Zero .html files in the project.
No JavaScript. Zero .js files, zero <script> tags, zero inline JS.
No React, Vue, Svelte, Angular, Astro, Next.js, Nuxt.
No Node.js, npm, yarn, pnpm, bun.
No TypeScript, JSX, TSX files.
No Jinja2, Django templates, Mako, Chameleon.
No HTMX, Alpine.js, Tailwind CDN script tags, Bootstrap CDN.
No package.json, tsconfig.json, vite.config., next.config..
No build tools (Vite, Webpack, esbuild, Turbo).
No index.html entry point — entry point is always a .py file.
No raw CSS files — style via Reflex style prop dicts or class_name.
No flask, fastapi, django in requirements.txt.
No direct manipulation of React internals, hooks, or context.
FILE STRUCTURE (mandatory)
project-root/
├── reflex_app.py # Entry point — app = rx.App(), app.add_page() calls
├── requirements.txt # reflex + Python deps only
├── rxconfig.py # Reflex config (generated by reflex init)
├── pages/
│ ├── index.py # Home page — def index() -> rx.Component
│ ├── about.py
│ └── dashboard.py
├── components/
│ ├── navbar.py # Reusable rx.Component functions
│ ├── footer.py
│ ├── form.py
│ └── modal.py
├── state/
│ ├── base_state.py # rx.State subclass for global state
│ └── form_state.py # rx.State subclass for feature state
└── assets/ # Optional: images, favicon only
CONVENTIONS
- Every page is a Python function returning
rx.Component — def index() -> rx.Component:
- Every page must be registered:
app.add_page(index, route="/")
- All state lives in
rx.State subclasses in state/ directory
- Event handlers are State methods — never standalone functions with side effects
- Styling primary:
style={"padding": "1rem", "background_color": "#fff"}
- Styling secondary:
class_name="flex items-center gap-4" (only when explicitly requested)
- Layout: use
rx.flex() and rx.box() — avoid deprecated rx.hstack/rx.vstack
- Conditional rendering:
rx.cond(state.show, component_a, component_b)
- Lists:
rx.foreach(state.items, lambda item: rx.text(item))
- Imports: always import state classes, never mutate state outside of event handlers
- All async work: use
@rx.background_task or yield pattern in event handlers
VIOLATION RESPONSE
If asked to use any forbidden technology, respond:
"This project uses Reflex UI (pure Python, zero-JS). [Requested tech] is not part of this stack. Here's how to achieve the same result with Reflex:"
Then provide the Reflex rx.* equivalent.
rules.md
Generation Rules for Reflex UI + Python Stack
On project init (@quickstart)
Copy template#12 structure into the user's project directory
Generate techstack.md at project root — this file MUST exist in every project
Ensure reflex_app.py contains app = rx.App() and all app.add_page() calls
Ensure requirements.txt starts with reflex>=0.6.0 — no other web frameworks
Ensure state/base_state.py has at minimum a bare class BaseState(rx.State): for extension
Output a terminal command to run: pip install -r requirements.txt && reflex run
During generation
Every UI element MUST be an rx.* component — never raw HTML strings
Never generate a .html file
Never generate a .js file
Never generate a package.json
If the user says "add a navbar" → generate components/navbar.py with rx.flex() and rx.link()
If the user says "add a modal" → use rx.dialog.root(), rx.dialog.trigger(), rx.dialog.content()
If the user says "add a form" → use rx.input(), rx.select(), rx.text_area() with on_change bound to State setter
If the user says "fetch data" → create a State method with yield or @rx.background_task that sets a rx.Var
If the user says "add animation" → use rx.motion() or CSS transitions via style dict
If the user says "style with Tailwind" → use class_name prop, never a CDN script tag
If the user says "API endpoint" → this is a Reflex app, not Flask/FastAPI — use a State method or explain that Reflex handles this differently via event handlers
If the user says "add a page" → create pages/xxx.py, define def xxx() -> rx.Component, add app.add_page(xxx, route="/xxx") in reflex_app.py
File generation order
state/base_state.py (state foundation — everything depends on it)
state/.py (feature state classes)
components/.py (reusable pieces — depend on state)
pages/*.py (pages compose components)
reflex_app.py (wires pages to app — depends on all pages)
requirements.txt
techstack.md (always last — acts as the lock file)
Self-check before responding
manifest.json
{
"id": "reflex-ui",
"name": "Reflex UI + Python (Zero-JS)",
"category": "web",
"language": "python",
"jsLevel": "zero",
"quickstartTemplate": "template#12",
"constraintFile": "techstack.md",
"rulesFile": "rules.md",
"docs": "https://reflex.dev/docs/",
"github": "https://github.com/reflex-dev/reflex",
"forbidden": [
"react", "vue", "svelte", "angular", "next.js", "astro",
"node.js", "npm", "typescript", "jsx", "vite", "webpack",
"html", ".html files", "jinja2", "django", "flask", "fastapi",
"htmx", "alpine.js", "bootstrap", "package.json",
".js files", ".css files", "<script>", "tailwind cdn"
]
}
Skill Directory Structure
src/ui-ux-pro-max/data/stacks/reflex-ui/
├── manifest.json
├── techstack.md
├── rules.md
├── templates/
│ ├── template#12/
│ │ ├── reflex_app.py # Entry point with app = rx.App()
│ │ ├── pages/
│ │ │ ├── index.py # Home page component
│ │ │ ├── about.py
│ │ │ └── dashboard.py
│ │ ├── components/
│ │ │ ├── navbar.py
│ │ │ ├── footer.py
│ │ │ ├── form.py
│ │ │ └── modal.py
│ │ ├── state/
│ │ │ ├── base_state.py # Shared state (auth, nav, toasts)
│ │ │ └── form_state.py # Feature-specific state
│ │ └── requirements.txt
│ └── ...
└── examples/
├── form-validation/
├── dashboard-layout/
├── data-table/
└── modal-dialog/
techstack.md
Tech Stack: Reflex UI + Python (Zero-JS)
ALLOWED
Python 3.11+
Reflex (https://github.com/reflex-dev/reflex)
Reflex rx.* components only (rx.box, rx.flex, rx.text, rx.button, rx.input, rx.select, rx.dialog, rx.drawer, rx.cond, rx.foreach, rx.match, rx.html, etc.)
Reflex rx.State for all state management
Reflex rx.Var for reactive variables
Reflex style prop dicts for styling
Reflex class_name prop for Tailwind utility classes (secondary, when explicitly requested)
Reflex rx.App() routing via app.add_page()
Reflex rx.redirect() for programmatic navigation
Reflex event handlers as State methods
Reflex rx.event and rx.background_task for async/side-effects
Standard Python stdlib (os, pathlib, json, httpx, etc.)
Python-only packages via requirements.txt (SQLAlchemy, pydantic, httpx, etc.)
FORBIDDEN
No HTML files. Zero .html files in the project.
No JavaScript. Zero .js files, zero <script> tags, zero inline JS.
No React, Vue, Svelte, Angular, Astro, Next.js, Nuxt.
No Node.js, npm, yarn, pnpm, bun.
No TypeScript, JSX, TSX files.
No Jinja2, Django templates, Mako, Chameleon.
No HTMX, Alpine.js, Tailwind CDN script tags, Bootstrap CDN.
No package.json, tsconfig.json, vite.config., next.config..
No build tools (Vite, Webpack, esbuild, Turbo).
No index.html entry point — entry point is always a .py file.
No raw CSS files — style via Reflex style prop dicts or class_name.
No flask, fastapi, django in requirements.txt.
No direct manipulation of React internals, hooks, or context.
FILE STRUCTURE (mandatory)
project-root/
├── reflex_app.py # Entry point — app = rx.App(), app.add_page() calls
├── requirements.txt # reflex + Python deps only
├── rxconfig.py # Reflex config (generated by reflex init)
├── pages/
│ ├── index.py # Home page — def index() -> rx.Component
│ ├── about.py
│ └── dashboard.py
├── components/
│ ├── navbar.py # Reusable rx.Component functions
│ ├── footer.py
│ ├── form.py
│ └── modal.py
├── state/
│ ├── base_state.py # rx.State subclass for global state
│ └── form_state.py # rx.State subclass for feature state
└── assets/ # Optional: images, favicon only
CONVENTIONS
rx.Component—def index() -> rx.Component:app.add_page(index, route="/")rx.Statesubclasses instate/directorystyle={"padding": "1rem", "background_color": "#fff"}class_name="flex items-center gap-4"(only when explicitly requested)rx.flex()andrx.box()— avoid deprecatedrx.hstack/rx.vstackrx.cond(state.show, component_a, component_b)rx.foreach(state.items, lambda item: rx.text(item))@rx.background_taskoryieldpattern in event handlersVIOLATION RESPONSE
If asked to use any forbidden technology, respond:
"This project uses Reflex UI (pure Python, zero-JS). [Requested tech] is not part of this stack. Here's how to achieve the same result with Reflex:"
Then provide the Reflex
rx.*equivalent.rules.md
Generation Rules for Reflex UI + Python Stack
On project init (@quickstart)
Copy template#12 structure into the user's project directory
Generate techstack.md at project root — this file MUST exist in every project
Ensure reflex_app.py contains app = rx.App() and all app.add_page() calls
Ensure requirements.txt starts with reflex>=0.6.0 — no other web frameworks
Ensure state/base_state.py has at minimum a bare class BaseState(rx.State): for extension
Output a terminal command to run: pip install -r requirements.txt && reflex run
During generation
Every UI element MUST be an rx.* component — never raw HTML strings
Never generate a .html file
Never generate a .js file
Never generate a package.json
If the user says "add a navbar" → generate components/navbar.py with rx.flex() and rx.link()
If the user says "add a modal" → use rx.dialog.root(), rx.dialog.trigger(), rx.dialog.content()
If the user says "add a form" → use rx.input(), rx.select(), rx.text_area() with on_change bound to State setter
If the user says "fetch data" → create a State method with yield or @rx.background_task that sets a rx.Var
If the user says "add animation" → use rx.motion() or CSS transitions via style dict
If the user says "style with Tailwind" → use class_name prop, never a CDN script tag
If the user says "API endpoint" → this is a Reflex app, not Flask/FastAPI — use a State method or explain that Reflex handles this differently via event handlers
If the user says "add a page" → create pages/xxx.py, define def xxx() -> rx.Component, add app.add_page(xxx, route="/xxx") in reflex_app.py
File generation order
state/base_state.py (state foundation — everything depends on it)
state/.py (feature state classes)
components/.py (reusable pieces — depend on state)
pages/*.py (pages compose components)
reflex_app.py (wires pages to app — depends on all pages)
requirements.txt
techstack.md (always last — acts as the lock file)
Self-check before responding
manifest.json
{
"id": "reflex-ui",
"name": "Reflex UI + Python (Zero-JS)",
"category": "web",
"language": "python",
"jsLevel": "zero",
"quickstartTemplate": "template#12",
"constraintFile": "techstack.md",
"rulesFile": "rules.md",
"docs": "https://reflex.dev/docs/",
"github": "https://github.com/reflex-dev/reflex",
"forbidden": [
"react", "vue", "svelte", "angular", "next.js", "astro",
"node.js", "npm", "typescript", "jsx", "vite", "webpack",
"html", ".html files", "jinja2", "django", "flask", "fastapi",
"htmx", "alpine.js", "bootstrap", "package.json",
".js files", ".css files", "<script>", "tailwind cdn"
]
}