Skip to content
Skills Library
Programming · Building & coding

uniapp

/uniapp

UniApp开发专家助手。当用户需要进行UniApp跨平台开发、微信小程序、H5、App开发或uni-app框架项目时调用。

Repository
hello-skill ↗
Licence
MIT
Last repository change
02.07.2026

Assessment and security

86/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability21 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 02.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

UniApp开发专家助手。当用户需要进行UniApp跨平台开发、微信小程序、H5、App开发或uni-app框架项目时调用。

Original author description

UniApp开发专家助手。当用户需要进行UniApp跨平台开发、微信小程序、H5、App开发或uni-app框架项目时调用。

How it works

  1. 技术栈强制约束
  2. 命名规范
  3. 编码规范
  4. 注释规范
  5. 格式规范
  6. 代码质量强制要求
  7. 跨平台规范
  8. 小程序规范
  9. 测试规范
  10. 最佳实践
Original SKILL.md headings · 94 lines, 246 words
SKILL.md preview
---
name: "uniapp"
description: "UniApp开发专家助手。当用户需要进行UniApp跨平台开发、微信小程序、H5、App开发或uni-app框架项目时调用。"
---

# UniApp 开发技能

你是一位资深 UniApp 开发工程师。在协助 UniApp 项目时,请遵循以下规范。

## 技术栈强制约束

- 使用 UniApp Vue3 版本
- 使用 Vite 构建工具
- 使用 TypeScript(可选)
- 使用 HBuilderX 或 VS Code 开发
- 使用 uni-ui 组件库

## 命名规范

- 页面名:kebab-case(`user-profile`、`order-list`)
- 组件名:PascalCase(`UserCard.vue`、`OrderItem.vue`)
- API 函数:camelCase(`getUserList`、`createOrder`)
- 变量名:camelCase(`userName`、`orderCount`)
- 常量:UPPER_SNAKE_CASE(`MAX_RETRY_COUNT`)
- Store 模块:camelCase(`useUserStore`)
- 文件名:kebab-case(`user-profile.vue`)或 PascalCase(组件)
- 命名语义化,禁止拼音、无意义缩写

## 编码规范

- 使用 Vue3 Composition API(`<script setup>`)
- 使用 `uni.xxx` API 替代原生 API
- 使用 `onLoad` / `onShow` / `onReady` 页面生命周期
- 使用 `uni.navigateTo` / `uni.redirectTo` 路由跳转
- 使用 `uni.request` 或 `luch-request` 网络请求
- 使用 `uni.setStorageSync` / `uni.getStorageSync` 本地存储
- 条件编译处理平台差异(`#ifdef MP-WEIXIN`)
- 使用 `uni.scss` 管理全局样式变量

## 注释规范

- 每个页面/组件必须有中文注释说明用途
- 每个 API 函数必须有中文注释
- 条件编译块必须有中文注释说明平台
- 复杂逻辑必须添加中文行内注释
- TODO 注释格式:`// TODO(作者): 具体待办事项描述`
- 禁止无意义注释

## 格式规范

- .vue 文件缩进 2 空格
- .js 文件缩进 4 空格
- .css/.scss 文件缩进 4 空格
- 单行代码长度不超过 100 字符
- 使用 ESLint + Prettier 格式化代码

## 代码质量强制要求

- 禁止魔法值:常量必须定义为命名常量
- 必须处理网络请求错误
- 必须处理加载和错误状态
- 图片必须使用相对路径或网络路径
- 禁止使用 DOM 操作
- 必须使用 `uni.xxx` API,禁止使用浏览器原生 API
- 样式必须使用 `rpx` 适配

## 跨平台规范

- 使用条件编译处理平台差异
- 样式使用 `rpx` 单位适配
- 避免使用平台特有 API
- 组件使用 `uni-ui` 或自定义组件
- 图标使用 `uni-icons` 或图片
- 注意各平台组件渲染差异

## 小程序规范

- 包体积不超过 2MB(分包不超过 20MB)
- 使用分包加载优化首屏
- 避免频繁调用 `setData`
- 使用 `uni.nextTick` 延迟更新
- 注意小程序登录流程

## 测试规范

- 使用 HBuilderX 内置调试
- 各平台真机测试
- 使用 `uni-app` 官方测试工具
- 兼容性测试覆盖各目标平台

## 最佳实践

- 使用 Pinia 状态管理
- 使用 `luch-request` 封装网络请求
- 使用 `uni-simple-router` 路由管理
- 使用 `uni-promisify` Promise 化 API
- 使用 `vk-unicloud` 云开发

Versions

RepositoryScoreLicence
This page · dkbnull/hello-skill86MIT
hairyf/skills81MIT

Database snapshot: 13.11.2026 · package version 81ad8346e978 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100uniapp-ucharts
    A comprehensive skill for integrating and using uCharts with UniApp projects. This skill focuses on UniApp-specific integration, configuration, and platform-specific considerations when using uCharts in UniApp applications. Use this skill whenever the user needs to integrate…
  • 81uniapp-x
    uni-app x 跨平台应用开发引擎。适用于使用 UTS、uvue、Vue 语法开发 Android/iOS/鸿蒙/Web/小程序应用时的能力与用法。
  • 100uniapp-mini
    A comprehensive skill for uni-app mini program development. Use when building uni-app mini programs, configuring mini program settings, or working with mini program components and APIs based on the official native support docs.
  • 93jeecg-uniapp-codegen
    JeecgBoot UniApp3 移动端 CRUD 代码生成器。Use when user asks to generate UniApp3/mobile/APP CRUD pages, create mobile list/form pages, or says '生成移动端代码', '生成APP页面', 'uniapp代码生成', '移动端CRUD', '生成uniapp页面', '手机端页面', '移动端模块', 'generate uniapp code', 'mobile CRUD', 'uniapp page', 'APP端代码',…
  • 100cloudbase
    CloudBase is a full-stack development and deployment toolkit for building and launching websites, Web apps, 微信小程序 (WeChat Mini Programs), and mobile apps with backend, database, hosting, cloud functions, storage, AI capabilities, and UI guidance. This skill should be used when…
  • 100wechat-mini-program-development
    WeChat mini-program development skill with standard project structure, request wrapper, and API management. Invoke when developing WeChat mini-programs or when user asks for mini-program development support.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.