nativescript-cursorrules-prompt-file — Cursor rule: NativeScript setup
A Cursor rule that tells the agent how to structure a NativeScript project and which libraries to reach for.
.cursor/rules/nativescript-cursorrules-prompt-file.mdcWhat nativescript-cursorrules-prompt-file does
The file lays out how a NativeScript codebase should be built. The agent gets a short list of practices: use @nativescript/core features and common web APIs where they fit, wire navigation through NativeScript Navigation, keep images, sounds and video in the assets folder and custom fonts in fonts. Error handling is expected too.
Folder structure is fixed: src/ with assets, components, services and utils inside. Then come four dependency rules — TypeScript for type safety, @nativescript/secure-storage for sensitive data, @nativescript/biometrics for anything biometric, and nativescript-fonticon for font icons. If your app already stores tokens its own way, the rule will push the agent toward secure-storage, so watch whether it starts rewriting working auth code.
The header sets alwaysApply: false with a **/* glob. The rule does not switch itself on; you attach it to a prompt or to specific files, otherwise it just sits in the repo.
What it helps with
- give the agent one folder layout for a NativeScript app
- move navigation onto NativeScript Navigation
- keep images and fonts in the right directories
- wire biometrics and secure storage the NativeScript way
- write typed TypeScript instead of plain JS
Example prompts for the agent
- Create a new screen in src/components and route to it with NativeScript Navigation
- Put the icons in fonts and load them with nativescript-fonticon
- Add fingerprint login using @nativescript/biometrics
How to install nativescript-cursorrules-prompt-file
Manually: put the files in place
.cursor/rules/nativescript-cursorrules-prompt-file.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/nativescript-cursorrules-prompt-file.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/nativescript-cursorrules-prompt-file.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/nativescript-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/nativescript-cursorrules-prompt-file.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about nativescript-cursorrules-prompt-file
How do I install nativescript-cursorrules-prompt-file in Cursor?
Create .cursor/rules/nativescript-cursorrules-prompt-file.mdc in your project root and paste the rule contents into it.
What does nativescript-cursorrules-prompt-file do?
It gives the Cursor agent NativeScript conventions: @nativescript/core usage, navigation, the src/ layout, and libraries for storage, biometrics and font icons.
Does the rule apply to every file automatically?
No. The header marks it alwaysApply: false, so you attach it to a prompt or to specific files even though the glob is **/*.
Source text
nativescript-cursorrules-prompt-file.mdc · CC0-1.0
--- description: "Cursor rules for NativeScript development." globs: **/* alwaysApply: false --- // NativeScript .cursorrules // NativeScript best practices const nativeScriptBestPractices = [ "Utilize @nativescript/core features and APIs where applicable", "Utilize common web APIs where applicable", "Implement proper navigation using NativeScript Navigation", "Use NativeScript's assets folder for images, sounds or videos and use the fonts folder for custom fonts", "Implement proper error handling where possible" ]; // Folder structure const folderStructure = ` src/ assets/ components/ services/ utils/ `; // Additional instructions const additionalInstructions = ` 1. Use TypeScript for type safety 2. Use @nativescript/secure-storage for sensitive data 3. Use @nativescript/biometrics for anything related to biometrics 4. Always use nativescript-fonticon for font icons 5. Follow NativeScript best practices for performance `;
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules