Skip to main content
rule

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.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/nativescript-cursorrules-prompt-file.mdc
Open on GitHub

What 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.mdc

Frontmatter: description, globs, alwaysApply

Step 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

Similar IDE rules

Everything for Mobile →

From the same set68

nextjs-tailwind-typescript-apps-cursorrules-prompt A Cursor rule that points the assistant at Next.js, Tailwind CSS and TypeScript. It sets the working order: plan in pseudocode first, code after. ★ 41,011repo stars nextjs-react-typescript-cursorrules-prompt-file A Cursor rule that tells the agent how to write code in Next.js 14 App Router, React and TypeScript projects. ★ 41,011repo stars nextjs-app-router-cursorrules-prompt-file A Cursor rule that hands the agent a set of Next.js App Router habits: server components by default, file-based routing, separate files for loading and errors. ★ 41,011repo stars netlify-official-cursorrules-prompt-file A Cursor rule that hands the agent Netlify's official conventions: function types, environment access, and no stray CORS headers. ★ 41,011repo stars manifest-yaml-cursorrules-prompt-file A Cursor rule that tells the agent how to scaffold a small Manifest backend: project setup, the manifest/backend.yml file and limits on entities. ★ 41,011repo stars laravel-php-83-cursorrules-prompt-file A Cursor rule that walks the agent through building Laravel packages: plan, directory layout, naming standards, tests and docs. ★ 41,011repo stars kubernetes-mkdocs-documentation-cursorrules-prompt A Cursor rule that turns the agent into a technical writer for Kubernetes and cloud native docs built with Markdown and MkDocs. ★ 41,011repo stars knative-istio-typesense-gpu-cursorrules-prompt-fil A Cursor rule that turns the assistant into a helper for serverless projects built on Knative with Istio, Typesense and HTMX. Useful when your search app runs on that stack. ★ 41,011repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor