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/conditional-compilation)<a href="https://agentmods.dev/rules/dcloudio/uni-ai-x/conditional-compilation"><img src="https://agentmods.dev/badge/rules/dcloudio/uni-ai-x/conditional-compilation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/dcloudio/uni-ai-x/conditional-compilation"><img src="https://agentmods.dev/badge/rules/dcloudio/uni-ai-x/conditional-compilation.svg" alt="Reviewed on agentmods" width="80" 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.00888 | $0.00888 |
| Opus 5.5 | $0.00355 | $0.00355 |
| Sonnet 5.5 | $0.00178 | $0.00178 |
| Haiku 4.5 | $0.00089 | $0.00089 |
Grade A, and why
conditional-compilation 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
core syntax
// Platform basic judgment
#ifdef APP-PLUS
//Mini programs/APP common code
#elifdef APP-ANDROID
// Android-specific logic
#elifdef APP-IOS
// IOS-specific logic
#endif
// Environmental judgment
#ifdef DEBUG
console.log('Debugging information')
#endif
Multi-terminal UI adaptation
<template>
<view #ifdef="APP-IOS">
<uni-swipe-cell :rightWidth="120"></uni-swipe-cell>
</view>
<view #ifndef="APP-HARMONY">
<div class="custom-cell">123</div>
</view>
</template>
Core Platform Identifier
VUE3 uni-app js engine version is used to distinguish between vue2 and 3, see HBuilderX 3.2.0 for details VUE2 uni-app js engine version is used to distinguish between vue2 and 3, see more UNI-APP-X is used to distinguish whether it is a uni-app x project Details HBuilderX 3.9.0 uniVersion is used to distinguish the version of the compiler Details HBuilderX 3.9.0 APP App When the APP-PLUS uni-app js engine version is compiled to an app APP-PLUS-NVUE or APP-NVUE App nvue page APP-ANDROID App Android Platform Details APP-IOS App iOS Platform Details APP-HARMONY App HarmonyOS Next platform H5 H5 (WEB recommended) WEB web (same as H5) HBuilderX 3.6.3 MP-WEIXIN WeChat Mini Program MP-ALIPAY APPLET MP-BAIDU BAIDU MINI PROGRAM MP-TUTIAO TIKTOK MINI PROGRAM MP-LARK Feishu Mini Program MP-QQ QQ applet MP-KUAISHOU Kuaishou Mini Program MP-JD JD Mini Program MP-360 360 applet MP-HARMONY Harmony Yuan Service HBuilderX 4.34 MP-XHS Xiaohongshu Mini Program MP WeChat Mini Program/Alipay Mini Program/Baidu Mini Program/Douyin Mini Program/Feishu Mini Program/QQ Mini Program/360 Mini Program/Hongmeng Yuan Service QUICKAPP-WEBVIEW (INCLUDING ALLIANCE AND HUAWEI) QUICKAPP-WEBVIEW-UNION QUICKAPP-WEBVIEW-HUAWEI 快訂計
- Compiler versioning UNI-APP-X: Distinguish uni-app x items (requires HBuilderX 3.9) uniVersion: supports version comparison (e.g. #ifdef uniVersion > 3.9)
Advanced
- COMBINATORIAL LOGIC: SUPPORT AND/OR LOGIC OPERATIONS (E.G. APP-PLUS AND (ANDROID OR IOS))
- Dynamic Identity: Add a custom compilation identity via plus.define({IS_LOGIN: true}).
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.
- 1mo ago First seen · 78 lines · 888 tokens per session scan A cca7fe47948b
conditional-compilation is a cursor rule published in the GitHub repository dcloudio/uni-ai-x (86 stars, last pushed 2d ago), licensed Apache-2.0. It adds 888 tokens to every session, about $0.0036 per session on Opus 5.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
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.
uvue
Utz, Ounitec Scripter, Is-Akros-Platfom, Hai Performans, Stanley Tepdemodern, Programine Langguag.
uni-app-x-best-practices
Best practices for uni-app-x.
uts
Development rules for building cross-platform apps with Uni-App X and Vue 3. They cover Tailwind CSS, themes, internationalization, components, and page templates.
svelte-5-vs-svelte-4-cursorrules-prompt-file
Cursor rules for comparing Svelte 5 and Svelte 4 development.
cursorrules
Kortix is a React Native + Expo app built with TypeScript, NativeWind (Tailwind CSS), and a custom design system.