This skill should be used when the user mentions "Taro" in any technical context, asks about "Taro API", "Taro components", "Taro configuration", "Taro development", "Taro project", "mini program...
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*.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 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*.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
Grep pattern:"Taro\.request" path:"references/apis-network*.md"
Grep pattern:"Button component" path:"references/components-form*.md"
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.references/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.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.