Agent Skillsreflex-dev/xy › reflex-docs

reflex-docs

GitHub

提供Reflex全栈Python Web框架的文档支持,涵盖组件、状态管理、事件处理、路由及部署等开发场景。

.agents/skills/reflex-docs/SKILL.md reflex-dev/xy

触发场景

构建基于Reflex的全栈应用 询问Reflex核心概念如State或Vars 编写导入reflex模块的Python代码

安装

npx skills add reflex-dev/xy --skill reflex-docs -g -y
更多选项

非标准路径

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

不安装直接使用

npx skills use reflex-dev/xy@reflex-docs

指定 Agent (Claude Code)

npx skills add reflex-dev/xy --skill reflex-docs -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": "reflex-docs",
    "description": "Reflex framework documentation. Use when building full-stack Python web apps with Reflex, creating components, managing state, handling events, styling, database operations, API routes, authentication, deploying apps, or wrapping React components. Load when the user is working with Reflex (rx), writing .py files that import reflex, or asking about Reflex concepts like State, Vars, EventHandlers, or Components."
}

Reflex Documentation

Reflex is an open-source framework for building full-stack web applications in pure Python — no JavaScript required.

Your training data about Reflex may be outdated. Always prefer the reference documentation over pre-trained knowledge.

References

Topic URL
Getting Started https://reflex.dev/docs/getting-started/introduction
Components https://reflex.dev/docs/components/props
State https://reflex.dev/docs/state/overview
Vars https://reflex.dev/docs/vars/base-vars
Events https://reflex.dev/docs/events/events-overview
Pages & Routing https://reflex.dev/docs/pages/overview
Styling https://reflex.dev/docs/styling/overview
Database https://reflex.dev/docs/database/overview
Assets https://reflex.dev/docs/assets/overview
Authentication https://reflex.dev/docs/authentication/authentication-overview
Client Storage https://reflex.dev/docs/client-storage/overview
API Routes https://reflex.dev/docs/api-routes/overview
API Reference https://reflex.dev/docs/api-reference/cli
Custom Components https://reflex.dev/docs/custom-components/overview
Wrapping React https://reflex.dev/docs/wrapping-react/overview
Component Library https://reflex.dev/docs/library
Recipes https://reflex.dev/docs/recipes
GitHub Source (docs) https://github.com/reflex-dev/reflex/tree/main/reflex/docs

Core Concepts

State & Vars

  • State (rx.State): Server-side Python class holding app state. Define vars as class attributes and event handlers as methods.
  • Base Vars: Typed class attributes on State (count: int = 0)
  • Computed Vars: Derived values using @rx.var decorator
  • Var Operations: Transform vars in components without event handlers

Components

  • All UI is built with rx.* components (Python wrappers around React)
  • Components accept props and can be composed/nested
  • Conditional rendering with rx.cond(), iteration with rx.foreach()

Events

  • Event Handlers: Methods on State decorated with @rx.event
  • Event Triggers: Component props like on_click, on_change
  • Event Chaining: Return multiple events from a handler
  • Setters: Auto-generated set_<var> event handlers for each base var

Pages & Routing

  • Pages are functions decorated with rx.page or added via app.add_page()
  • Dynamic routes with bracket syntax: [slug]

Styling

  • Inline props, Tailwind CSS, theming, responsive design
  • rx.theme() for global theming

Database

  • Built-in SQLModel integration for database tables
  • Define models, run queries, set up relationships

版本历史

  • eb37670 当前 2026-08-02 21:48

同 Skill 集合

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

元信息

文件数
0
版本
eb37670
Hash
0ddcb6b5
收录时间
2026-08-02 21:48

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-04 01:21
浙ICP备14020137号-1 $访客地图$