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.
npx agentmods add rules/patrickjs/awesome-cursorrules/nativescriptgit clone --depth 1 https://github.com/PatrickJS/awesome-cursorrulesWrote 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/patrickjs/awesome-cursorrules/nativescript)<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/nativescript"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/nativescript.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 | $0.00711 | $0.00711 |
| Opus 5 | $0.00356 | $0.00356 |
| Sonnet 5 | $0.00142 | $0.00142 |
| Haiku 4.5 | $0.00071 | $0.00071 |
Grade A, and why
nativescript 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 today.
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 — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
NativeScript Best Practices
Code Style and Structure
- Organize code using modular components and services for maintainability.
- Use platform-specific files (
.ios.ts,.android.ts) when code exceeds 20 platform-specific lines. - When creating custom native code, use a folder structure like
custom-native/index.ios.ts,custom-native/index.android.ts,custom-native/common.ts,custom-native/index.d.tsto keep platform-specific code organized and easy to import with single import elsewhere, replacingcustom-nativewith the name of the custom code.
Naming Conventions
- Prefix platform-specific variables with
iosorandroid(e.g.,iosButtonStyle). - Name custom components and styles descriptively (
primaryButtonStyle,userProfileView).
Usage
- Use
@NativeClass()when extending native classes when needed - For iOS, when extending native classes, always use
static ObjCProtocols = [AnyUIKitDelegate];to declare custom delegates if a delegate is required or used. - For iOS, always retain custom delegate instances to prevent garbage collection. For example,
let delegate = MyCustomDelegate.new() as MyCustomDelegate, and ensure it is retained in the class scope. - Favor
__ANDROID__and__APPLE__for conditional platform code with tree-shaking. - Track and clean up all timers (
setTimeout,setInterval) to avoid memory leaks.
UI and Styling
- Always TailwindCSS as the CSS Framework using
"@nativescript/tailwind": "^2.1.0"for consistent styling paired with"tailwindcss": "~3.4.0". - Add ios: and android: style variants for platform-specific styling, addVariant('android', '.ns-android &'), addVariant('ios', '.ns-ios &');
- darkMode: ['class', '.ns-dark']
- Leverage
GridLayoutorStackLayoutfor flexible, responsive layouts. Place more emphasis on proper GridLayout usage for complex layouts but use StackLayout for simpler, linear arrangements. - Use
visibility: 'hidden'for elements that should not affect layout when hidden.
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.
- today First seen · 43 lines · 711 tokens per session scan A 47ba69c11e46
nativescript is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,722 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 711 tokens to every session, about $0.0036 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-03.
Other cursor rules, from other repositories
react-native
React Native: mobile app development, navigation, native modules.
expo
Expo/React Native: native modules, navigation, platform-specific code.
kotlin
Kotlin: coroutines, null safety, idiomatic patterns.
flutter
Flutter: Riverpod, widget extraction, Dart 3.
swift
Swift patterns: SwiftUI, actors, async/await, value types.
swiftui
SwiftUI best practices for iOS, macOS, and cross-platform Apple development.