.claude/skills/nativescript/SKILL.md
NativeScript best practices and patterns for mobile applications
npx skillsauth add oimiragieo/agent-studio nativescriptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
.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..ios.ts, .android.ts) when platform code exceeds 20 lines — mixing platform branches in a single file prevents code-splitting and forces all native APIs to load on both platforms.| Anti-Pattern | Why It Fails | Correct Approach |
| ------------------------------------------ | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| Mixing platform branches in a single file | Cannot code-split by platform; all native APIs loaded on both platforms | Use .ios.ts and .android.ts files when platform-specific code exceeds 20 lines |
| Direct visual tree manipulation at runtime | Bypasses rendering pipeline; causes race conditions and layout flicker | Use data-binding and reactive state to drive layout updates |
| Unreferenced delegate instances | iOS GC collects them mid-execution; silent callback failures | Always retain delegates in class scope: this.delegate = MyDelegate.new() |
| Deeply nested layout containers | Each level adds layout passes; janky scrolling on mid-range devices | Use GridLayout for complex layouts; StackLayout only for simple linear arrangements |
| Leaking timers and event listeners | NativeScript does not GC native references; leaks accumulate across navigation | Always cancel timers and remove listeners in component teardown lifecycle |
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
tools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.