Skills Plugins MCP Prompt Model 博客 我的中心

react

Use for TSX components, UI libraries, styling, state locality, layout, render performance and memoization.

DeepseekModel 官方收录技能 质量 优秀 · 90 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=lobehub-lobehub-agents-skills-react-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name react description Use for TSX components, UI libraries, styling, state locality, layout, render performance and memoization. user-invocable false React Component Writing Guide Styling Scenario Approach Most cases createStaticStyles + cssVar.* (zero-runtime, module-level) Simple one-off Inline style attribute Truly dynamic (JS color fns like readableColor / chroma ) createStyles + token — last resort Component Priority src/components — project-specific reusable components @lobehub/ui/base-ui — headless primitives. If the component lives here, use it. Do NOT import the same-named root export. @lobehub/ui — higher-level / antd-wrapping components (only when no base-ui equivalent) antd — only when neither base-ui nor @lobehub/ui root provides it Custom implementation — true last resort If unsure about available components, search existing code or check node_modules/@lobehub/ui/es/index.mjs and node_modules/@lobehub/ui/es/base-ui/ . @lobehub/ui/base-ui — always prefer for these Component Import Alert (+ AlertProps ) import { Alert, type AlertProps } from '@lobehub/ui/base-ui'; Select (+ SelectProps , SelectOption ) import { Select } from '@lobehub/ui/base-ui'; Modal (imperative API) import { createModal, confirmModal, useModalContext, type ModalInstance } from '@lobehub/ui/base-ui'; DropdownMenu import { DropdownMenu } from '@lobehub/ui/base-ui'; ContextMenu import { ContextMenu } from '@lobehub/ui/base-ui'; Popover import { Popover } from '@lobehub/ui/base-ui'; ScrollArea import { ScrollArea } from '@lobehub/ui/base-ui'; Switch import { Switch } from '@lobehub/ui/base-ui'; Toast import { Toast } from '@lobehub/ui/base-ui'; FloatingSheet import { FloatingSheet } from '@lobehub/ui/base-ui'; Drawer import { Drawer } from '@lobehub/ui/base-ui'; For Modal specifically, see the dedicated modal skill — use the imperative createModal({ content: … }) pattern over the legacy <Modal open … /> declarative pattern. base-ui has its own ModalHost already mounted in SPAGlobalProvider . Common slip: import { Select } from '@lobehub/ui' looks fine but it's the antd-backed Select. Use base-ui Select. Same for Modal , DropdownMenu , etc. @lobehub/ui root — use when base-ui has no equivalent Category Components General ActionIcon, ActionIconGroup, Block, Button, Icon Data Display Avatar, Collapse, Empty, Highlighter, Markdown, Tag, Tooltip Data Entry CodeEditor, CopyButton, EditableText, Form, Input, InputPassword, SearchBar, TextArea Layout Center, DraggablePanel, Flexbox, Grid, Header, MaskShadow Navigation Burger, Menu, SideNav, Tabs State Keep transient state in its smallest useful owner. Extract a custom hook when state transitions and handlers obscure rendering or form a reusable unit; do not extract solely because a component has a particular number of hooks. Split a component only to establish a real state, reuse, render-update, or mountable-capability boundary. Do not split solely to make files smaller. Decomposing a heavy domain feature into host-assembled atoms is owned by compose-atoms . Render Performance and Memoization Treat memo , useMemo , and useCallback as opt-in optimizations, not default component wrappers. Before adding one, identify the actual rerender boundary and prefer structural fixes: Split at the update boundary. Move transient state to its smallest owner. Use narrow Zustand selectors and avoid broad subscriptions. Do not memoize prop-free or trivially rendered components, or a component that normally receives new objects, arrays, functions, or JSX children. Do not use memoization to compensate for state held too high in the tree. Use memoization only when the subtree is demonstrably expensive or frequently repeated, its relevant inputs are stable during normal parent renders, and profiling or a concrete render-path analysis identifies the avoided work. State that reason in the implementation summary or PR. Layout Use Flexbox and Center from @lobehub/ui . See references/layout-kit.md for full props and examples. Use gap instead of margin for spacing between flex children Use flex={1} to fill available space Nest Flexbox for complex layouts; set overflow: 'auto' for scrollable regions Related Skills ux : loading visuals and user-facing interaction design. Do not use antd Spin / <Spin /> . modal : imperative base-ui modal patterns. spa-routes : SPA navigation, route ownership, router configuration, and .desktop variants. compose-atoms : split a heavy domain feature into mountable capability atoms; each host imports only what it mounts. zustand : store structure and selector conventions.
Agent 识别该技能的关键词,点击任意一个即可复制。

该技能未提供触发词。

下载的 .skill 包内含以下字段。
字段 说明
format格式标识(skill/v1)
skill_id技能唯一 ID
name技能名称
version版本号
description技能描述
category所属分类(数组)
trigger_words触发词列表
tags标签列表
source来源标识
source_url来源链接(本页地址)
exported_at导出时间(每次下载生成)
system_prompt系统提示词正文
model_config模型参数:provider / model / temperature / max_tokens / top_p
examples示例
install_guide各平台导入说明(Coze / Dify / Claude / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

验证码 --

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。