Taro Documentation by whinc/my-claude-plugins
npx skills add https://github.com/whinc/my-claude-plugins --skill 'Taro Documentation'Taro 是一个全面的多平台开发框架,支持从单一代码库构建适用于多个平台的应用程序。支持的平台包括微信小程序、支付宝小程序、百度智能小程序、字节跳动小程序、QQ 小程序、H5(网页)、React Native 以及 Harmony OS。
主要特性:
当用户进行以下操作时使用此技能:
Taro 遵循类 React 架构:
Taro 编译到不同的平台目标:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
标准 Taro 项目组织:
taro-project/
├── src/
│ ├── app.config.ts # 全局应用配置
│ ├── app.ts # 应用入口点
│ ├── pages/ # 页面组件
│ │ ├── index/
│ │ │ ├── index.tsx
│ │ │ └── index.config.ts
│ ├── components/ # 可复用组件
│ └── assets/ # 静态资源
├── config/
│ ├── index.js # 构建配置
│ ├── dev.js # 开发配置
│ └── prod.js # 生产配置
└── package.json
此技能提供访问按小主题文件组织的全面 Taro 文档(所有文件均小于 100 KB)。选择与问题匹配的文件前缀:
API 参考(前缀为 apis- 的文件)
apis-network*.md, apis-routing.mdapis-storage*.md, apis-ui-feedback*.md, apis-ui-navigation.mdapis-device-system.md, apis-device-sensors.md, apis-device-connectivity*.mdapis-media-image.md, apis-media-video*.md, apis-media-audio*.mdapis-location*.md, apis-canvas*.mdapis-cloud*.md, apis-payment.mdapis-other*.md-partN 后缀的文件延续同一主题。)组件参考(前缀为 components- 的文件)
components-containers*.mdcomponents-basic.md, components-other.mdcomponents-form*.mdcomponents-navigation.mdcomponents-media*.md, components-map-canvas.md, components-gesture.md, components-skyline.md配置参考
config-app.md – 全局应用配置 (app.config.ts)config-page.md – 页面级配置config-build.md – 构建/编译器设置和优化指南参考(前缀为 guides- 的文件)
guides-quickstart*.md, guides-basics*.mdguides-routing.md, guides-testing.mdguides-state.md, guides-ui-libraries.mdguides-platform-weapp.md, guides-platform-h5.md, guides-platform-rn.md, 当用户提出 Taro 相关问题时:
Read references/apis-network.md # 网络/API 调用(续集请见 apis-network-part*.md)
Read references/components-form.md # 表单组件和输入
Read references/config-app.md # 全局应用配置
Read references/guides-platform-weapp.md # 微信小程序指南
Grep pattern:"Taro\.request" path:"references/apis-network*.md"
Grep pattern:"Button component" path:"references/components-form*.md"
当用户询问 Taro API 时:
references/apis-*.md 文件(例如,网络调用用 apis-network*.md,设备信息用 apis-device-system.md)示例:对于“如何发起网络请求?”,参考 Taro.request API 文档并提供包含错误处理的示例。
当用户询问 Taro 组件时:
references/components-*.md 文件(例如,components-form*.md 或 components-media*.md)示例:对于“如何创建可滚动列表?”,参考 ScrollView 组件文档并用示例代码演示。
当用户询问项目设置或配置时:
references/config-app.md、config-page.md 或 config-build.md示例:对于“如何配置页面路由?”,参考 app.config.ts 页面配置并演示路由设置。
当用户需要更广泛的指导或最佳实践时:
references/guides-*.md 文件(例如,guides-platform-weapp.md 或 guides-state.md)示例:对于“如何集成 Redux?”,参考状态管理指南并展示集成步骤。
Taro 支持具有不同功能的多平台:
对于平台特定代码:
// 条件编译示例
if (process.env.TARO_ENV === 'weapp') {
// 微信小程序特定代码
}
if (process.env.TARO_ENV === 'h5') {
// H5 特定代码
}
检查跨平台的 API 支持:
当用户遇到问题时:
如需详细文档,请查阅这些特定主题的文件(除非注明,否则均小于 100 KB):
references/apis-*.md) – 40 多个文件,涵盖网络、路由、存储、设备、媒体、位置、画布、云、支付和其他 API。带有 -partN 后缀的文件按顺序延续同一主题。references/components-*.md) – 容器、基础内容、表单控件、手势、天际线渲染、导航、媒体、地图/画布和开放能力组件。references/config-*.md) – config-app.md、config-page.md 和 config-build.md 分别对应其范围。references/guides-*.md) – 快速入门、基础、路由、测试、状态、UI 库、平台特定指南、优化、故障排除、插件开发和社区资源。references/taro-docs.xml (3.9 MB, 92,568 行) – 保留的原始 Repomix 包,作为需要完整存档时的备用参考。*.original 备份 – 之前的大型文件重命名为 .original 以供历史参考;除非必要,避免加载它们。在参考文件内搜索时,使用 glob 模式覆盖一个族中的所有分片:
对于 API:
Grep pattern:"Taro\.[APIName]" path:"references/apis-*.md"
对于组件:
Grep pattern:"<ComponentName" path:"references/components-*.md"
对于配置:
Grep pattern:"config\.(option)" path:"references/config-*.md"
对于指南:
Grep pattern:"specific topic" path:"references/guides-*.md"
按以下结构组织响应:
此技能提供全面的 Taro 框架文档,以支持多平台应用程序的开发。根据用户问题参考有组织的文档文件,并结合文档知识和实践指导,帮助用户构建有效的 Taro 应用程序。
专注于提供准确、上下文相关且可操作的信息,帮助用户解决其特定的 Taro 开发挑战。
每周安装次数
–
代码仓库
GitHub 星标数
10
首次出现
–
安全审计
Taro is a comprehensive multi-platform development framework that enables building applications for multiple platforms from a single codebase. Platforms include WeChat Mini Programs, Alipay Mini Programs, Baidu Smart Programs, ByteDance Mini Apps, QQ Mini Programs, H5 (web), React Native, and Harmony OS.
Key characteristics:
Use this skill when users are:
Taro follows a React-like architecture:
Taro compiles to different platform targets:
Standard Taro project organization:
taro-project/
├── src/
│ ├── app.config.ts # Global app configuration
│ ├── app.ts # App entry point
│ ├── pages/ # Page components
│ │ ├── index/
│ │ │ ├── index.tsx
│ │ │ └── index.config.ts
│ ├── components/ # Reusable components
│ └── assets/ # Static resources
├── config/
│ ├── index.js # Build configuration
│ ├── dev.js # Development config
│ └── prod.js # Production config
└── package.json
This skill provides access to comprehensive Taro documentation organized into small topic files (all <100 KB). Choose the file prefix that matches the question:
API References (files prefixed with apis-)
apis-network*.md, apis-routing.mdapis-storage*.md, apis-ui-feedback*.md, apis-ui-navigation.mdapis-device-system.md, apis-device-sensors.md, apis-device-connectivity*.mdWhen users ask Taro-related questions:
Identify the topic : Determine which documentation area is relevant (API, component, configuration, or guide)
Load appropriate reference : Use the Read tool to access the specific topic file:
Read references/apis-network.md # Network/API calls (see apis-network-part*.md for continuation)
Read references/components-form.md # Form components and inputs
Read references/config-app.md # Global app configuration
Read references/guides-platform-weapp.md # WeChat Mini Program guides
3. Search within files : Use Grep with wildcards to scan the relevant file family:
Grep pattern:"Taro\.request" path:"references/apis-network*.md"
Grep pattern:"Button component" path:"references/components-form*.md"
4. Provide contextual answers : Combine documentation with understanding of user's context to give relevant, actionable guidance
When users ask about Taro APIs:
references/apis-*.md file (for example, apis-network*.md for network calls or apis-device-system.md for device info)Example : For "How do I make a network request?", reference Taro.request API documentation and provide example with error handling.
When users ask about Taro components:
references/components-*.md file (for example, components-form*.md or components-media*.md)Example : For "How do I create a scrollable list?", reference ScrollView component documentation and demonstrate with sample code.
When users ask about project setup or configuration:
references/config-app.md, config-page.md, or config-build.md depending on scopeExample : For "How do I configure page routing?", reference app.config.ts page configuration and demonstrate route setup.
When users need broader guidance or best practices:
references/guides-*.md file (for example, guides-platform-weapp.md or guides-state.md)Example : For "How do I integrate Redux?", reference state management guide and show integration steps.
Taro supports multiple platforms with varying capabilities:
For platform-specific code:
// Example of conditional compilation
if (process.env.TARO_ENV === 'weapp') {
// WeChat Mini Program specific code
}
if (process.env.TARO_ENV === 'h5') {
// H5 specific code
}
Check API support across platforms:
When users encounter issues:
For detailed documentation, consult these topic-specific files (all <100 KB unless noted):
references/apis-*.md) – 40+ files covering network, routing, storage, device, media, location, canvas, cloud, payment, and miscellaneous APIs. Files with -partN suffix continue the same topic sequentially.references/components-*.md) – Containers, basic content, form controls, gestures, skyline rendering, navigation, media, map/canvas, and open capability components.references/config-*.md) – config-app.md, config-page.md, and config-build.md for their respective scopes.references/guides-*.md) – Quickstart, fundamentals, routing, testing, state, UI libraries, platform-specific guides, optimization, troubleshooting, plugin development, and community resources.When searching within reference files, use glob patterns to cover all shards in a family:
For APIs:
Grep pattern:"Taro\.[APIName]" path:"references/apis-*.md"
For components:
Grep pattern:"<ComponentName" path:"references/components-*.md"
For configuration:
Grep pattern:"config\.(option)" path:"references/config-*.md"
For guides:
Grep pattern:"specific topic" path:"references/guides-*.md"
Structure responses with:
This skill provides comprehensive Taro framework documentation to support development of multi-platform applications. Reference the organized documentation files based on user questions, and combine documentation knowledge with practical guidance to help users build effective Taro applications.
Focus on providing accurate, contextual, and actionable information that helps users solve their specific Taro development challenges.
Weekly Installs
–
Repository
GitHub Stars
10
First Seen
–
Security Audits
Flutter应用架构设计指南:分层结构、数据层实现与最佳实践
4,000 周安装
components-open-capability.mdguides-platform-harmony*.mdguides-optimization*.md, guides-troubleshooting.md, guides-community.mdguides-plugin-dev*.mdapis-media-image.mdapis-media-video*.mdapis-media-audio*.mdapis-location*.md, apis-canvas*.mdapis-cloud*.md, apis-payment.mdapis-other*.md-partN suffix continue the same topic.)Component References (files prefixed with components-)
components-containers*.mdcomponents-basic.md, components-other.mdcomponents-form*.mdcomponents-navigation.mdcomponents-media*.md, components-map-canvas.md, components-gesture.md, components-skyline.mdcomponents-open-capability.mdConfiguration References
config-app.md – Global app configuration (app.config.ts)config-page.md – Page-level configurationconfig-build.md – Build/compiler settings and optimizationGuide References (files prefixed with guides-)
guides-quickstart*.md, guides-basics*.mdguides-routing.md, guides-testing.mdguides-state.md, guides-ui-libraries.mdguides-platform-weapp.md, guides-platform-h5.md, guides-platform-rn.md, guides-platform-harmony*.mdguides-optimization*.md, guides-troubleshooting.md, guides-community.mdguides-plugin-dev*.mdreferences/taro-docs.xml (3.9 MB, 92,568 lines) – Original Repomix bundle retained as a fallback reference when you need the complete archive.*.original backups – The previous monolithic files renamed with .original for historical reference; avoid loading them unless necessary.