Agent skill

Taro UI Guide

by jd-opensource in jd-opensource/taro-ui

Guides installing, configuring, styling and using taro-ui (At* components) in Taro apps for WeChat, Alipay, H5 and React Native.

MITAuto-check passedFrontend & Design

SKILL.md written in Chinese; this summary is our English description.

Install Taro UI Guide

skills CLI
$ npx skills add jd-opensource/taro-ui --skill taro-ui-guide -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jd-opensource/taro-ui taro-ui-guide --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jd-opensource/taro-ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/taro-ui-guide .claude/skills/taro-ui-guide && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
taro-ui-guide
GitHub stars
4.7k
Token cost
~1.3k tokens
SKILL.md length
252 words
Files
49 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Guides installing, configuring, styling and using taro-ui (At* components) in Taro apps for WeChat, Alipay, H5 and React Native.

  • Works in 2 steps: globalClass:在 Page 级 SCSS 用… → customStyle:仅部分组件支持,优先用前两种方式。
  • Integrating taro-ui into a Taro project
  • SKILL.md covers 何时使用本 Skill, 版本与安装, Taro 项目必配项 and 样式引入, plus 5 more sections
  • Calls pnpm

What it does

The skill covers taro-ui, a multi-platform React component library for Taro 3 and later, whose components are exported with an At prefix such as AtButton. Styles are separate from the JavaScript and must be imported explicitly: the full SCSS bundle for prototypes, or per-component SCSS or babel-plugin-import for production. Version pairing is listed: Taro below 3 uses taro-ui 2.3.4, and Taro 3 or later uses the latest release.

Required project settings include compiling taro-ui for H5 through esnextModules and, on Taro 3.5 and later, turning off its prebundling. Peer dependencies are @tarojs/taro, @tarojs/components, @tarojs/react, react and react-dom, with React Native also needing react-native, and WeChat mini programs need base library 2.2.3 or later. It covers common props such as className and customStyle, compound components like AtModal and AtList, controlled open and close callbacks, theming, i18n and on-demand loading. A references folder has one page per component, opened only when that component is used. The SKILL.md is written in Chinese.

When your agent uses it

  • Integrating taro-ui into a Taro project
  • Choosing and combining At components and checking their props
  • Customizing the theme, internationalization or on-demand style loading
  • Developing or fixing components in the taro-ui repository

Example prompts

  • “Add taro-ui to my Taro 3 project and import only the button and modal styles.”
  • “Build a settings page with AtList, AtListItem and AtSwitch.”
  • “My taro-ui page renders blank on H5. Check the Taro config.”

Requirements

  • A Taro project
  • react and react-dom 16.13 or later

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. globalClass:在 Page 级 SCSS 用 .my-btn.at-button { } 覆盖(自定义组件内无效)。
  2. customStyle:仅部分组件支持,优先用前两种方式。

What it can do on your machine

Read from SKILL.md and the folder at commit d065330. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • jd-opensource.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Taro UI Guide loads about 1.3k tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 252 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~14k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jd-opensource/taro-ui at commit d065330, republished under its MIT licence (© jd-opensource). 252 words, ~1,325 tokens.

Download SKILL.mdSave it as .claude/skills/taro-ui-guide/SKILL.md (or your agent's skills folder). This skill also uses 48 other files; get the full folder from 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 版本
< 3taro-ui@2.3.4
≥ 3taro-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/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。

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

  2. 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 — 组件索引(按维度渐进披露)
  • docs/docs/guide/quickstart.md — 快速上手与 babel 按需
  • docs/docs/guide/customize-theme.md — 主题详解

© jd-opensource, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 48 other files (references) in packages/taro-ui-guide of jd-opensource/taro-ui.

  • SKILL.md
  • references/README.md
  • references/accordion.md
  • references/action-sheet.md
  • references/activity-indicator.md
  • references/avatar.md
  • references/badge.md
  • references/button.md
  • references/calendar.md
  • references/card.md
  • references/checkbox.md
  • references/config-provider.md
  • references/countdown.md
  • references/curtain.md
  • references/divider.md
  • references/drawer.md
  • references/fab.md
  • references/float-layout.md
  • references/form.md
  • references/grid.md
  • … and 29 more

Open the folder on GitHubat commit d065330

Compare with similar skills

Taro UI Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Taro UI Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Taro UI Guide this skilljd-opensource/taro-ui4.7k—~1.3kAutomated safety check: PassMIT
React GeneralLedgerHQ/ledger-live621—~738Automated safety check: PassMIT
UniwindOhh-889/skyroc795—~1.4kAutomated safety check: PassMIT
Maui Localizationdavidortinau/maui-skills174—~1.2kAutomated safety check: PassMIT
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
UI UX Pro Maxsaoudi-h/solar-icons18218 repos~11kAutomated safety check: NotesCustom licence

Similar skills

  • React General

    LedgerHQ/ledger-live

    General React and React Native engineering rules for Ledger Live.

    621 GitHub stars~738 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Uniwind

    Ohh-889/skyroc

    Uniwind — Tailwind CSS v4 styling for React Native. An agent skill from Ohh-889/skyroc.

    795 GitHub stars~1.4k tokensUpdated 1 mo ago
    Frontend & DesignAuto-check passed
  • Maui Localization

    davidortinau/maui-skills

    Guidance for localizing .NET MAUI apps: multi-language support via .resx resource files, culture resolution and runtime switching, RTL layout, platform language declarations (iOS/Mac Catalyst…

    174 GitHub stars~1.2k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated today
    Frontend & DesignAuto-check passed
  • UI UX Pro Max

    saoudi-h/solar-icons

    UI/UX design intelligence for web and mobile. An agent skill from saoudi-h/solar-icons.

    182 GitHub starsUsed in 18 repos~11k tokens
    Frontend & DesignAuto-check: notes
  • Pierre Trees File Tree

    pierrecomputer/pierre

    Use when an app uses @pierre/trees to render or control a file tree, including React, vanilla JavaScript, SSR, web components, selection, search, rename, drag…

    6.2k GitHub stars~473 tokensUpdated today
    Frontend & DesignAuto-check passed

Works with

Questions about Taro UI Guide

What does Taro UI Guide do?

Guides installing, configuring, styling and using taro-ui (At* components) in Taro apps for WeChat, Alipay, H5 and React Native. The skill covers taro-ui, a multi-platform React component library for Taro 3 and later, whose components are exported with an At prefix such as AtButton. Styles are separate from the JavaScript and must be imported explicitly: the full SCSS bundle for prototypes, or per-component SCSS or babel-plugin-import for production.

When should I use Taro UI Guide?

Taro UI Guide fits situations like: integrating taro-ui into a Taro project; choosing and combining At components and checking their props; customizing the theme, internationalization or on-demand style loading; developing or fixing components in the taro-ui repository.

How do I install Taro UI Guide in Claude Code?

Run `npx skills add jd-opensource/taro-ui --skill taro-ui-guide -a claude-code`. Or copy the skill folder (packages/taro-ui-guide in jd-opensource/taro-ui) into .claude/skills/taro-ui-guide in your project. Claude Code loads it when a task matches its description.

How do I install Taro UI Guide in Codex?

Run `npx skills add jd-opensource/taro-ui --skill taro-ui-guide -a codex`. Or copy the skill folder (packages/taro-ui-guide in jd-opensource/taro-ui) into .agents/skills/taro-ui-guide in your project. Codex loads it when a task matches its description.

Can I use Taro UI Guide in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jd-opensource/taro-ui --skill taro-ui-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/taro-ui-guide, .gemini/skills/taro-ui-guide, .github/skills/taro-ui-guide and .opencode/skills/taro-ui-guide in your project.

What does Taro UI Guide need to run?

Going by SKILL.md and its folder, Taro UI Guide needs the command-line tools its instructions call (pnpm). Our summary lists: A Taro project; react and react-dom 16.13 or later.

Does Taro UI Guide access the network?

SKILL.md names 1 domain. As links in the text: jd-opensource.github.io. This is read from the text; nothing was executed.

Is Taro UI Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Taro UI Guide use?

Taro UI Guide is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Taro UI Guide use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.

What are the alternatives to Taro UI Guide?

Skills that share tags, products or a category with Taro UI Guide: React General (LedgerHQ/ledger-live, 621 stars), Uniwind (Ohh-889/skyroc, 795 stars), Maui Localization (davidortinau/maui-skills, 174 stars) and Chakra UI v3 Builder (chakra-ui/chakra-ui, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Taro UI Guide?

jd-opensource (a GitHub organization) maintains it in jd-opensource/taro-ui, which has 4,731 GitHub stars. The repository was last updated on September 25, 2026.

Source: jd-opensource/taro-ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.