AGENT SKILL

React 组件使用与导入

react-components

CoreAI Sandbox 组件使用:导入边界、已发布的 CoreAI 文档和本地适配器检查。适用于:编辑任何 `*.tsx` 文件、选择组件或编写组件导入时。

License 许可
MIT
所属仓库
github/replica
最近更新
2026-11-15
Stars
★ 273
Forks
35

01 前言 Front Matter

name
react-components
description
CoreAI Sandbox component usage: import boundaries, published CoreAI documentation, and local adapter inspection. USE WHEN: editing any `*.tsx` file, picking a component, or writing component imports.

03 SKILL.md 正文

CoreAI Sandbox Component Usage

Import Boundary

Import CoreAI components, styling APIs, and tokens directly from @coreai-ds/react-components.

import { Button, Dropdown, Spinner } from '@coreai-ds/react-components';

Import CoreAI-Sandbox-owned components and adapters from ~/components/common.

import { Card, ExternalLink, Image, Link, TabLinkList } from '~/components/common';

The app barrel exports only repository-owned behavior. It does not re-export CoreAI. Never import components from @fluentui/react-components directly. Direct imports from @fluentui/react-icons remain supported.

Use the local Link for React Router navigation, ExternalLink for external URLs, Card for all cards, and Image for theme-aware and deployment-safe image sources. ESLint restricts direct Link, Card, and Image imports from @coreai-ds/react-components; only the local adapter implementations may import those underlying CoreAI components.

Skill Boundary

  • This skill owns CoreAI Sandbox's repository boundary: decide whether the need is satisfied by CoreAI or by an existing app-owned adapter, composition, hook, theme utility, or asset.
  • coreai-ds-fluentui-react owns external package documentation retrieval and version checks. Invoke it for every CoreAI component or prop decision instead of restating its catalog here.
  • Local source under app/components/common/** is authoritative only for CoreAI-Sandbox-owned behavior; it is not a substitute for CoreAI documentation.

Choose and Verify Components

  1. Invoke the coreai-ds-fluentui-react skill and retrieve the relevant published documentation before selecting, changing, or reviewing a component or its props. Follow its discovery, version-check, and retrieval-failure workflow. Do not infer APIs from stock Fluent behavior.
  2. Verify the selected API against the installed package when documented versions differ. Report missing guidance or unsupported APIs rather than silently substituting prior knowledge.
  3. Check app/components/common/index.ts for an existing CoreAI-Sandbox-owned export only when the requested behavior is product-specific or integrates an app concern such as React Router.
  4. When a local export exists, read its source under app/components/common/** before using it. Published package documentation does not define CoreAI-Sandbox-owned behavior.
  5. Prefer an existing documented component or template over recreating the same interaction with custom markup and CSS.

Do not maintain a static component catalog in this skill. Published CoreAI documentation is the source of truth for CoreAI components, and the app barrel and local source are the source of truth for repository-owned exports.

Semantics

Use links for navigation and buttons for actions. Do not make a Button navigate or use a link to perform an action. Use Link for app routes and ExternalLink for URLs outside the app.

Related skills

  • css-styling — required when writing styles for the component
  • icons — for icon selection and bundling
  • coreai-ds-fluentui-react — required for CoreAI component documentation and API decisions

04 同仓库更多 Skills

github
github/replica

create-prototype-from-production

Use when asked to copy, clone, replicate or recreate a live production website or web app as a Replica prototype from its URL, such as "create a prototype from https://example.com" or "replicate this site for a demo". Do not use for building a new design from a brief, or for changing an existing prototype.

★ 273
github
github/replica

页面视觉设计评审

visual-design-review

依据使用方自有的产品与设计系统指南,审查页面层级、分组、密度、操作及状态设计。当用户要求视觉设计评审、页面点评,或询问新页面是否清晰传达其任务时使用。

界面设计师视觉设计
★ 273
github
github/replica

技能共享源配置与上下文起草

setup-skills

配置共享源,并使用独立的 writer 起草上下文。普通/全新设置会提供用户指定包的安装,并复用内置浏览器能力,仅在确有证据表明必要检查存在缺口时才添加浏览器工具。适用于设置、源修复、编写上下文或刷新草稿。仅配置模式会跳过工具安装和编写;安装和激活需要单独批准。

AI 工程师插件与技能管理
★ 273
github
github/replica

Hub 反馈设计主题提炼

review-hub-feedback

通过发现、独立判断和综合归纳,审查 Hub 反馈以提炼可复用的设计主题。不进行诊断或优化。

界面设计师用户反馈处理
★ 273
github
github/replica

UI 响应式布局审计

responsive-audit

使用使用者上下文和浏览器工具,跨产品定义的视口审查 UI 布局、溢出和导航。当用户要求检查响应式、测试移动端布局或审查断点行为时使用。

软件开发工程师前端开发与界面实现
★ 273
github
github/replica

Replica 原型控件创建与绑定

prototype-controls

创建并连接 Replica 原型控件。当用户要求添加或修改下拉框、滑块、输入框、切换开关或操作按钮(用于配置变体、场景、可见 UI、应用状态或数据源)时使用,即使未使用画布术语也一样。涵盖声明、类型化绑定、默认值、条件、重置和动作。仅涉及产品 UI 表单字段和筛选器时,应使用 create-prototype。

界面设计师低代码应用开发
★ 273