Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/dcloudio/uni-ai-xWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/dcloudio/uni-ai-x/uni-app-x-best-practices)<a href="https://agentmods.dev/rules/dcloudio/uni-ai-x/uni-app-x-best-practices"><img src="https://agentmods.dev/badge/rules/dcloudio/uni-ai-x/uni-app-x-best-practices.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00540 | $0.00540 |
| Opus 5 | $0.00270 | $0.00270 |
| Sonnet 5 | $0.00108 | $0.00108 |
| Haiku 4.5 | $0.00054 | $0.00054 |
Grade A, and why
uni-app-x-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Memory Bank
You are an expert in uni-app-x, uts, ucss, uni-app with a deep understanding of best practices and performance optimization techniques in these technologies.
Code Style and Structure
- Write concise, maintainable, and technically accurate UTS code with relevant examples.
- Use functional and declarative programming patterns; avoid classes.
- Favor iteration and modularization to adhere to DRY principles and avoid code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
- Organize files systematically: each file should contain only related content, such as exported components, subcomponents, helpers, static content, and types.
- Must be strongly typed, and must be typed in any case
Naming Conventions
- Use lowercase with dashes for directories (e.g., components/auth-wizard).
- Favor named exports for functions.
UTS Usage
- Use UTS for all code; prefer interfaces over types for their extendability and ability to merge.
- Avoid enums; use maps instead for better type safety and flexibility.
- Use functional components with UTS interfaces.
Syntax and Formatting
- uni-app-x supports UTS native component development (native views are written by Android/iOS engineers and encapsulated into components) to achieve high-performance cross-platform rendering, while uni-app and Vue projects only support front-end component development.
- Always use the UVue Composition API script setup style.
UI and Styling
- You must first try to implement and refine functionality using components in the current project
- Strictly follow the style attributes supported by UCSS
- Adopt mobile first responsive design
- Avoid using style attributes and selectors that are not supported by UCSS
- Use flex layout first
Component And Easycom
- easycom is uni-app-x's intelligent component management solution. It realizes zero-configuration invocation of components by automatically scanning the components directory and files that comply with the component name/component name.uvue specification. Developers only need to create components according to the agreed catalog, and they can directly use the upper initials of tag names in the template, significantly improving cross-platform development efficiency.
- Automatically register components in the components directory through pages.json, which supports strict matching of component names and file names (such as test/test.uvue)
- Built-in components and easycom components are used directly through capitalized tag names. The responsive system is based on Proxy optimization and supports cross-platform compilation
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 42 lines · 540 tokens per session scan A f8472f5d3f3a
uni-app-x-best-practices is a cursor rule published in the GitHub repository dcloudio/uni-ai-x (86 stars, last pushed today), licensed Apache-2.0. It adds 540 tokens to every session, about $0.0027 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other cursor rules, from other repositories
react-native-expo-router-typescript-windows-cursorrules-prompt-file
Cursor rules for React Native Expo Router Typescript Windows.
flutter_ui_dev
// Header section Column( children: [ // Title Text('Title'), // Subtitle Text('Subtitle'), ], ).
project
Development rules for uni-app projects built with Vue 3 and TypeScript. uni-app is a framework for creating H5 websites, mini-programs, and mobile apps from one codebase.
expo
Expo/React Native standards.
apaas-form-component-dual-dev
A Vue 2.7 form component project for both desktop and mobile applications, with shared code and separate web and mobile packages.
conditional-compilation
Cursor rule "conditional-compilation" from dcloudio/uni-app-x-ai-rules, covering conditional compilation, core syntax and core platform identifier.