uni-app is a Vue.js-based framework for building applications that run on iOS, Android, HarmonyOS, Web, and various mini-program platforms. It offers over 50 built-in components and APIs for networking, storage, and more, catering to developers looking for a comprehensive cross-platform solution.
$ npx skills add https://github.com/uni-helper/skills --skill uni-appuni-app is a cross-platform application development framework built on Vue.js that enables developers to write code once and deploy across iOS, Android, HarmonyOS, Web, and various mini-program platforms. The framework provides over 50 built-in components and APIs for common tasks like networking and storage, reducing development time and complexity. This skill collection includes the uni-app core framework documentation and integrates with complementary tools like VueUse, Pinia, and Vite for a complete development experience. Developers can install individual skills or the entire collection to access comprehensive reference material for uni-app development. The project is designed to keep agent skills synchronized with official uni-app documentation.
Add the skill using the command: `$ npx skills add https://github.com/uni-helper/skills --skill uni-app`
Develop cross-platform applications using Vue.js.
Utilize built-in UI components for rapid development.
Implement platform-specific code with ease.
$ npx skills add https://github.com/uni-helper/skills --skill uni-appgit clone https://github.com/uni-helper/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a uni-app cross-platform mobile app for [COMPANY] in the [INDUSTRY] sector. Use uni-app's built-in components and APIs to create a responsive app with features like [FEATURE 1], [FEATURE 2], and [FEATURE 3]. Ensure the app supports iOS, Android, and web platforms. Provide the code structure, key files, and implementation steps. Use Vue.js syntax and uni-app conventions.
# uni-app Cross-Platform App for GreenFarm Groceries
## Overview
A responsive e-commerce app for GreenFarm Groceries, built with uni-app to support iOS, Android, and web platforms. Features include product listings, a shopping cart, user authentication, and order tracking.
## Project Structure
```
📁 src/
├── 📁 pages/
│ ├── 📁 home/
│ │ └── index.vue
│ ├── 📁 products/
│ │ └── index.vue
│ ├── 📁 cart/
│ │ └── index.vue
│ └── 📁 user/
│ ├── login.vue
│ └── profile.vue
├── 📁 components/
│ ├── 📁 ProductCard.vue
│ ├── 📁 CartItem.vue
│ └── 📁 HeaderNav.vue
├── 📁 static/
│ └── 📁 images/
├── 📁 store/
│ └── index.js
├── 📁 api/
│ └── products.js
├── App.vue
├── main.js
└── manifest.json
```
## Key Features Implemented
### 1. Product Listing Page (`pages/products/index.vue`)
- Uses `uni-list` and `uni-list-item` for product display.
- Fetches data from a mock API using `uni.request`.
- Implements infinite scroll with `uni-load-more`.
```vue
<template>
<view>
<uni-list>
<uni-list-item
v-for="product in products"
:key="product.id"
:title="product.name"
:note="product.description"
:thumb="product.image"
@click="goToProduct(product.id)"
/>
</uni-list>
<uni-load-more :status="loadingStatus" />
</view>
</template>
<script>
import { uniList, uniListItem, uniLoadMore } from '@dcloudio/uni-ui';
import { getProducts } from '@/api/products';
export default {
components: { uniList, uniListItem, uniLoadMore },
data() {
return {
products: [],
loadingStatus: 'more',
page: 1,
limit: 10
};
},
async onLoad() {
await this.loadProducts();
},
methods: {
async loadProducts() {
this.loadingStatus = 'loading';
const data = await getProducts(this.page, this.limit);
this.products = [...this.products, ...data];
this.loadingStatus = data.length < this.limit ? 'noMore' : 'more';
},
goToProduct(id) {
uni.navigateTo({
url: `/pages/products/detail?id=${id}`
});
}
},
onReachBottom() {
if (this.loadingStatus === 'more') {
this.page++;
this.loadProducts();
}
}
};
</script>
```
### 2. Shopping Cart (`pages/cart/index.vue`)
- Uses `uni-data-picker` for cart management.
- Syncs with Pinia store for state management.
- Implements swipe actions for item removal.
### 3. User Authentication (`pages/user/login.vue`)
- Uses uni-app's `uni-id-pages` module for login.
- Supports OAuth with Apple, Google, and WeChat.
### 4. Responsive Design
- Adapts layout for mobile and desktop using CSS media queries.
- Uses `uni-app`'s built-in `uni-platform` detection for platform-specific styles.
## Deployment
### iOS & Android
1. Install HBuilderX and configure the project.
2. Run `npm run build` to generate platform-specific bundles.
3. Use `uni-app` cloud compilation or local SDK to build APK/IPA.
### Web
1. Run `npm run build:mp-weixin` for mini-programs or `npm run build:h5` for web.
2. Deploy the `dist/build/h5` folder to a web server.
### HarmonyOS
1. Configure the `manifest.json` for HarmonyOS support.
2. Use DevEco Studio to compile and deploy the app.
## Next Steps
- Integrate payment gateways (Stripe, Alipay).
- Add real-time order tracking with WebSockets.
- Implement push notifications using `uni-push`.
---
*Built with uni-app 3.0+ | Vue 3 | Pinia*Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan