Install any skill in seconds. Free to start, no credit card required.
Get Started Free →NativeScript best practices and patterns for mobile applications
.claude/skills/amariahak-nativescript-best-practices-and-patterns-for-mobile-applications/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 28% | 0% |
NativeScript best practices and patterns for mobile applications
Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/nativescript.mdc.
.ios.ts, .android.ts) when code exceeds 20 platform-specific lines.custom-native/index.ios.ts, custom-native/index.android.ts, custom-native/common.ts, custom-native/index.d.ts to keep platform-specific code organized and easy to import with single import elsewhere, replacing custom-native with the name of the custom code.ios or android (e.g., iosButtonStyle).primaryButtonStyle, userProfileView).@NativeClass() when extending native classes when neededstatic ObjCProtocols = [AnyUIKitDelegate]; to declare custom delegates if a delegate is required or used.let delegate = MyCustomDelegate.new() as MyCustomDelegate, and ensure it is retained in the class scope.__ANDROID__ and __APPLE__ for conditional platform code with tree-shaking.setTimeout, setInterval) to avoid memory leaks."@nativescript/tailwind": "^2.1.0" for consistent styling paired with "tailwindcss": "~3.4.0".GridLayout or StackLayout for flexible, responsive layouts. Place more emphasis on proper GridLayout usage for complex layouts but use StackLayout for simpler, linear arrangements.visibility: 'hidden' for elements that should not affect layout when hidden.GridLayout wisely to setup complex layouts.ns clean) after modifying files in App_Resources or package.json.itemTemplateSelector) for conditional layouts in ListView and RadListView.Observable or ObservableArray properties to reflect state changes efficiently.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 18,156 | 12,181 | -33% | 1 | 1 | 0% | 3,574 | 3,253 | -9% | 0 | 0 | — |
case-02 | fail→pass | 21,200 | 15,365 | -28% | 1 | 1 | 0% | 4,392 | 3,986 | -9% | 0 | 0 | — |
case-03 | fail→pass | 19,481 | 11,773 | -40% | 1 | 1 | 0% | 4,286 | 3,180 | -26% | 0 | 0 | — |
case-04 | pass→pass | 15,174 | 12,096 | -20% | 1 | 1 | 0% | 3,192 | 3,297 | +3% | 0 | 0 | — |
case-05 | pass→pass | 13,333 | 10,364 | -22% | 1 | 1 | 0% | 2,800 | 2,654 | -5% | 0 | 0 | — |
case-06 | pass→pass | 18,293 | 17,797 | -3% | 1 | 1 | 0% | 3,663 | 3,566 | -3% | 0 | 0 | — |
case-07 | pass→pass | 15,603 | 8,070 | -48% | 1 | 1 | 0% | 1,858 | 1,908 | +3% | 0 | 0 | — |
case-08 | pass→pass | 4,114 | 2,420 | -41% | 1 | 1 | 0% | 629 | 1,157 | +84% | 0 | 0 | — |
case-09 | pass→pass | 11,269 | 3,513 | -69% | 1 | 1 | 0% | 1,971 | 1,294 | -34% | 0 | 0 | — |
case-10 | pass→pass | 7,770 | 2,639 | -66% | 1 | 1 | 0% | 1,322 | 1,139 | -14% | 0 | 0 | — |
case-11 | fail→pass | 7,063 | 2,306 | -67% | 1 | 1 | 0% | 1,169 | 1,090 | -7% | 0 | 0 | — |
case-12 | fail→fail | 5,474 | 7,476 | +37% | 1 | 1 | 0% | 906 | 1,640 | +81% | 0 | 0 | — |
case-13 | fail→pass | 4,638 | 2,373 | -49% | 1 | 1 | 0% | 841 | 1,077 | +28% | 0 | 0 | — |
case-14 | pass→pass | 10,693 | 3,025 | -72% | 1 | 1 | 0% | 1,758 | 1,202 | -32% | 0 | 0 | — |
case-15 | fail→pass | 9,978 | 1,658 | -83% | 1 | 1 | 0% | 1,673 | 966 | -42% | 0 | 0 | — |
case-16 | pass→pass | 4,593 | 1,562 | -66% | 1 | 1 | 0% | 715 | 949 | +33% | 0 | 0 | — |
case-17 | pass→pass | 6,955 | 2,596 | -63% | 1 | 1 | 0% | 1,277 | 1,108 | -13% | 0 | 0 | — |
case-18 | fail→pass | 12,554 | 4,393 | -65% | 1 | 1 | 0% | 2,111 | 1,484 | -30% | 0 | 0 | — |
case-19 | pass→pass | 14,707 | 8,086 | -45% | 1 | 1 | 0% | 2,500 | 2,199 | -12% | 0 | 0 | — |
case-20 | fail→pass | 9,463 | 2,281 | -76% | 1 | 1 | 0% | 1,650 | 1,131 | -31% | 0 | 0 | — |
case-21 | fail→pass | 9,105 | 2,824 | -69% | 1 | 1 | 0% | 1,638 | 1,117 | -32% | 0 | 0 | — |
case-22 | fail→pass | 12,185 | 1,431 | -88% | 1 | 1 | 0% | 2,012 | 938 | -53% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.