原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

taro-ui Skill

作者:jd-opensource★ 4,7311 个 skill

安装

What it does

一款基于 Taro 框架开发的多端 UI 组件库

  • Connects Instruction files the AI reads; connects to nothing
  • Account or key No key needed
  • Category 设计与网页
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/skill/jd-opensource-taro-ui.svg)](https://mcp.popnx.com/en/skills/jd-opensource-taro-ui)

可搭配使用

在同一工作中把 AI 连到服务的 MCP

Figma Context MCP

Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.

作者:GLips广泛使用↓ 15.2万/周★ 1.6万5个月前更新

MCP · 连接服务在你的电脑上运行

Next AI Draw.io

draw.io diagrams your AI agent draws on a live browser canvas that you can also edit by hand

作者:DayuanJiang广泛使用↓ 2.2万/周★ 3.7万 整个仓库的星标前天更新

MCP · 连接服务在你的电脑上运行

Pascal 3D Editor

Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.

作者:pascalorg广泛使用↓ 1037/周★ 2.6万 整个仓库的星标3天前更新

MCP · 连接服务电脑或云端✓ 服务方 · pascal.app

相似的 Skill

同类工作,排序与 Skill 列表相同

与相似项目对比
本项
taro-ui
impeccablediagram-designfrontend-slidesguizang-ppt-skill
作者jd-opensourcepbakauscathrynlaveryzarazhangruiop7418
Skill 数1111–
GitHub 星标4,731110,69067,37132,35829,835
最近代码更新2026年9月25日2026年11月16日2026年11月13日2026年6月24日2026年10月30日
许可证MITApache-2.0MITMITAGPL-3.0

jd-opensource 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server

Skill 和 MCP 有什么不同

MCP = 手

把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。

Skill = 手册

教 AI 怎么做某项工作的文本文件,不连接任何服务。

有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。

适用的应用

开发者未说明 · SKILL.md 形式的 Skill 可用于支持 Agent Skills 的应用,如 Claude Code、Codex 和 Cursor

安装

Is it safe?

  • Who made it

    GitHub account jd-opensource (organization), 5 years old

  • Use and upkeep

    ★ 4,731 stars · code last changed 2026年9月25日

  • Any scripts?

    No, plain text files the AI reads and follows

  • Uses the internet?

    No scripts, so it does not go online by itself

  • Changes machine-wide settings?

    No hooks or writes to machine settings found

Checked automatically from the repo files at commit d065330 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself

第一步:你用哪个 AI?

选择你用的应用,本页只显示该应用的安装方法

Option 1Upload to claude.ai (web and app)

Uploading to claude.ai would fail: the description is over 200 characters (220). Use "Let the AI install it" instead

Option 1让 Claude Code 帮你安装

复制这句话,粘贴到 Claude Code 的对话中

Where to install

正在检查命令 · 通过后才会显示复制按钮

正在检查命令 · 通过后才会显示复制按钮

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

重新打开 Claude Code,输入 /taro-ui-guide,或直接提出相关任务,Claude 会自动选用

Checked against official docs 2026年11月12日 · Source: code.claude.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.claude/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    正在检查命令 · 通过后才会显示复制按钮

  3. 重新打开 Claude Code,输入 /taro-ui-guide,或直接提出相关任务,Claude 会自动选用

自己安装的 Skill 可用于 ChatGPT 桌面应用、Codex CLI 和 IDE 中的 Codex 扩展 · 网页版和手机版 ChatGPT 不能使用自己安装的 Skill,只能使用目录中插件自带的 Skill

ChatGPT 桌面应用

ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill

Option 1让 ChatGPT 帮你安装

在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中

Where to install

正在检查命令 · 通过后才会显示复制按钮

正在检查命令 · 通过后才会显示复制按钮

The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Option 2自己放入文件夹

把 taro-ui-guide 文件夹放到 ~/.agents/skills/taro-ui-guide

~ 是你的主文件夹($HOME)

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    正在检查命令 · 通过后才会显示复制按钮

安装之后

  • ChatGPT 桌面应用:打开侧边栏中的 Skills,确认 Skill 已出现
  • 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
  • Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

网页版和手机版 ChatGPT

不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill

想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

Option 1让 Codex 帮你安装

复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展

Where to install

正在检查命令 · 通过后才会显示复制按钮

正在检查命令 · 通过后才会显示复制按钮

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    正在检查命令 · 通过后才会显示复制按钮

  3. 重新打开 Codex 并提出相关任务,Codex 会列出这个 skill

Option 1让 Cursor 帮你安装

复制这句话,粘贴到 Cursor 的对话中

Where to install

正在检查命令 · 通过后才会显示复制按钮

正在检查命令 · 通过后才会显示复制按钮

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

在 Cursor 的 Agent 聊天中输入 / 并选择 taro-ui-guide

Checked against official docs 2026年11月12日 · Source: cursor.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.cursor/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    正在检查命令 · 通过后才会显示复制按钮

  3. 在 Cursor 的 Agent 聊天中输入 / 并选择 taro-ui-guide

Option 1Let the AI install it

适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat

Where to install

正在检查命令 · 通过后才会显示复制按钮

正在检查命令 · 通过后才会显示复制按钮

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。

在 GitHub 上查看 ↗

已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹

查看原始 SKILL.md

以下文字来自开发者的 repo,不是 PopNx MCP 的指令

5,300 个字符 · 在 GitHub 打开完整文件

---
name: taro-ui-guide
description: >-
  Guides installation, Taro config, styling, and usage of taro-ui (At* components)
  for WeChat/Alipay/H5/RN. Use when building Taro apps with taro-ui, picking
  components, theming, i18n, or modifying packages/taro-ui source.
---

# Taro UI 使用指南

基于 Taro 3+ 的多端 React 组件库。组件均以 `At` 前缀导出(如 `AtButton`),样式与逻辑分离,需单独引入 SCSS。

官方文档:<https://jd-opensource.github.io/taro-ui/#/>  
源码:`packages/taro-ui/`(本 monorepo)

## 何时使用本 Skill

- 在 Taro 项目中集成、配置或排查 taro-ui
- 选择/组合组件、查 Props、写示例页面
- 自定义主题、国际化、按需加载
- 在本仓库内开发/修复 `packages/taro-ui` 组件

## 版本与安装

| Taro 版本 | taro-ui 版本 |
|-----------|--------------|
| < 3       | `taro-ui@2.3.4` |
| ≥ 3       | `taro-ui@latest`(当前 monorepo 为 3.x) |

```bash
pnpm add taro-ui
# 或 npm install taro-ui@latest
```

**Peer 依赖**:`@tarojs/taro`、`@tarojs/components`、`@tarojs/react`、`react`、`react-dom`(≥16.13)。RN 端另需 `react-native`、`react-native-modal`(可选)。

微信小程序需基础库 **≥ 2.2.3**(`globalClass` 与样式穿透)。

## Taro 项目必配项

在消费方项目的 `config/index.ts`(或 `config/index.js`)中:

**1. H5 编译 node_modules 中的 taro-ui**

```js
h5: {
  esnextModules: ['taro-ui']
}
```

**2. Taro 3.5+ 关闭对 taro-ui 的 prebundle**(否则 `@tarojs/components` 可能未打进 bundle,页面异常)

```js
compiler: {
  type: 'webpack5',
  prebundle: {
    exclude: ['taro-ui']
  }
}
```

## 样式引入

样式在 `taro-ui/dist/style/`,**不会**随 JS 自动注入,必须显式引入。

### 全量(开发/原型)

入口或 `app.scss`:

```js
import 'taro-ui/dist/style/index.scss'
```

```scss
@import 'taro-ui/dist/style/index.scss';
```

### 按需(推荐生产)

页面/全局 SCSS 按组件名引入(`AtButton` → `button.scss`):

```scss
@import 'taro-ui/dist/style/components/button.scss';
```

或用 `babel-plugin-import`(见 `docs/docs/guide/quickstart.md`):

```js
// babel.config.js plugins
['import', {
  libraryName: 'taro-ui',
  customName: name => `taro-ui/lib/components/${name.slice(3)}`,
  customStyleName: name => `taro-ui/dist/style/components/${name.slice(3)}.scss`
}, 'taro-ui']
```

`At` 前缀去掉后即为目录名:`AtActionSheet` → `action-sheet`。

## 组件使用模式

### 基础引入

```tsx
import { View } from '@tarojs/components'
import { AtButton } from 'taro-ui'

export default function Page() {
  return (
    <View>
      <AtButton type="primary" onClick={() => {}}>
        按钮
      </AtButton>
    </View>
  )
}
```

### 公共 Props(`AtComponent`)

多数组件支持:

| Prop | 说明 |
|------|------|
| `className` | 外层类名(小程序可用 `globalClass` 覆盖内部 BEM 类) |
| `customStyle` | 内联样式,`string` 或 `CSSProperties` |
| `children` | 子节点 |

类型定义:`packages/taro-ui/types/base.d.ts`。

### 复合组件

按文档组合子组件,例如:

- `AtModal` + `AtModalHeader` / `AtModalContent` / `AtModalAction`
- `AtList` + `AtListItem`
- `AtTabs` + `AtTabsPane`
- `AtActionSheet` + `AtActionSheetItem`

按组件查阅:[references/README.md](references/README.md)(如 `references/button.md`)。**仅在使用该组件时**打开对应文件。

### 受控与回调

- 开关类:`open` / `isOpened` + `onClick` / `onClose`(以各组件 `types/*.d.ts` 为准)
- 表单类:`AtForm` 包裹 `AtInput`、`AtSwitch` 等,注意 `formType`、校验文案
- 环境判断:组件内部常用 `Taro.getEnv()` 区分 WEB / WEAPP / ALIPAY

查 Props 时**优先读** `references/<slug>.md`,其次 `packages/taro-ui/types/<component>.d.ts` 与 `docs/docs/components/<name>.md`。

### 命令式 API:`AtMessage`

页面需挂载 `<AtMessage />`,再通过 `Taro.atMessage` 调用:

```tsx
import Taro from '@tarojs/taro'
import { AtMessage } from 'taro-ui'

// render 中: <AtMessage />
Taro.atMessage({ message: '提示', type: 'success', duration: 3000 })
// type: info | success | error | warning
```

`AtToast` 为声明式:`isOpened`、`text`、`status`、`onClose`。

### 国际化 `ConfigProvider`

```tsx
import { ConfigProvider, AtLoadMore, enUS } from 'taro-ui'

export default function App({ children }) {
  return (
    <ConfigProvider locale={enUS}>
      {children}
    </ConfigProvider>
  )
}
```

- 内置:`zhCN`(默认)、`enUS`
- `locale` 与默认包深合并,可只覆盖部分 key(如 `LoadMore.moreText`)
- 优先级:组件 props > `ConfigProvider.locale` > 默认 `zhCN`

## 自定义主题

1. **SCSS 变量**(推荐):在引入默认样式**之前**覆盖变量,再 `@import` 全量样式。

```scss
$color-brand: #6190e8;
@import 'taro-ui/dist/style/index.scss';
```

变量表:`packages/taro-ui/src/style/variables/default.scss`。

2. **globalClass**:在 **Page** 级 SCSS 用 `.my-btn.at-button { }` 覆盖(自定义组件内无效)。

3. **`customStyle`**:仅部分组件支持,优先用前两种方式。

> `AtSlider`、`AtSwitch` 暂不支持 SCSS 变量覆盖主题。

## 在本仓库开发 taro-ui

```bash
pnpm install          # 根目录,仅允许 pnpm
pnpm build:ui         # 构建 packages/taro-ui → dist/
pnpm --filter demo dev:h5
pnpm --filter demo dev:weapp
pnpm --filter docs dev
```

组件实现路径:

| 内容 | 路径 |
|------|------|
| 组件实现 | `packages/taro-ui/src/components/<name>/` |
| 类型 | `packages/taro-ui/types/<name>.d.ts` |
| 样式 | `packages/taro-ui/src/style/components/<name>.scss` |
| 导出 | `packages/taro-ui/src/index.ts` |
| RN 实现 | `packages/taro-ui/rn/components/` |
| 单测 | `packages/taro-ui/test/components/` |

新增/修改组件:同步更新 `src/index.ts`、类型文件、样式、`test` 快照;提交信息格式 `feat(ComponentName): ...`(见 `.github/CONTRIBUTING.md`)。

## Agent 工作流

1. **确认场景**:消费方 Taro 项目 vs 本 monorepo 源码修改。
2. **查 API**:`references/<slug>.md` → `types/*.d.ts` → `docs/docs/components/*.md`。
3. **写用法**:`import { AtX } from 'taro-ui'` + 对应 `dist/style/components/x.scss`。
4. **排查样式缺失**:是否引入 SCSS;H5 是否配置 `esnextModules`;是否配置 `prebundle.exclude`。
5. **排查小程序样式**:基础库版本、`globalClass`、BEM 类名是否与文档一致。

## 延伸阅读

- [references/README.md](references/README.md) — 组件索引(按维度渐进披露)
- `docs/docs/guide/quickstart.md` — 快速上手与 babel 按需
- `docs/docs/guide/customize-theme.md` — 主题详解

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

来自 GitHub

GitHub 星标
4,731
开发者
jd-opensource
许可证
MIT
最近代码更新
2026年9月25日
repo 中的 SKILL.md 文件(含译本和模板)
1
主题
javascript, nervjs, react, taro, taro-compontent, ui-design, ui-kit, wechat-mini-program, wechat-weapp, wxapp