android-jetpack-compose-cursorrules-prompt-file

android-jetpack-compose-cursorrules-prompt-file is a cursor rule for Cursor from PatrickJS/awesome-cursorrules. It costs 535 tokens per session, scanned A, original, CC0-1.0.

A set of Cursor rules for Android apps built with Jetpack Compose, Android's toolkit for describing app screens in Kotlin code. It recommends Material Design 3, clean architecture, coroutines, Flow, Hilt, ViewModels, and one-way UI state updates.

In plain words
What is it for?
Use it when building or changing Jetpack Compose screens and Android app structure, while adapting the recommendations to the project's existing layout.
Why use it?
It gives the agent a consistent approach to organising Android code and managing screen state, navigation, asynchronous work, and dependencies.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions Cursor.

Good fit Use it when building or changing Jetpack Compose screens and Android app structure, while adapting the recommendations to the project's existing layout.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/patrickjs/awesome-cursorrules/android-jetpack-compose-cursorrules-prompt-file
About the project

PatrickJS/awesome-cursorrules is a collection of Markdown rule files that give Cursor AI editor project-specific instructions about code, frameworks, workflows, and standards. Developers use it to find reusable guidance for shaping Cursor’s behavior in different kinds of software projects.

PatrickJS/awesome-cursorrules · 40,950 stars · on GitHub

Install

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.

Clone the repo
git clone --depth 1 https://github.com/PatrickJS/awesome-cursorrules

Made for: Cursor.

Wrote 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.

agentmods badge for android-jetpack-compose-cursorrules-prompt-file

README.md
[![agentmods](https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/android-jetpack-compose-cursorrules-prompt-file/github.svg)](https://agentmods.dev/rules/patrickjs/awesome-cursorrules/android-jetpack-compose-cursorrules-prompt-file)
Your own site
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/android-jetpack-compose-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/android-jetpack-compose-cursorrules-prompt-file/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for android-jetpack-compose-cursorrules-prompt-file

Your own site · 80×15
<a href="https://agentmods.dev/rules/patrickjs/awesome-cursorrules/android-jetpack-compose-cursorrules-prompt-file"><img src="https://agentmods.dev/badge/rules/patrickjs/awesome-cursorrules/android-jetpack-compose-cursorrules-prompt-file.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 535 This file is loaded in full into every session.
When invoked 535 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00535 $0.00535
Opus 5.5 $0.00214 $0.00214
Sonnet 5.5 $0.00107 $0.00107
Haiku 4.5 $0.00053 $0.00053

Measured 1mo ago against content hash 15d5380a40f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

android-jetpack-compose-cursorrules-prompt-file 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 1mo ago.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

rules/android-jetpack-compose-cursorrules-prompt-file.mdc · 95 lines

What it actually says

// Android Jetpack Compose .cursorrules

// Flexibility Notice

// Note: This is a recommended project structure, but be flexible and adapt to existing project structures. // Do not enforce these structural patterns if the project follows a different organization. // Focus on maintaining consistency with the existing project architecture while applying Jetpack Compose best practices.

// Project Architecture and Best Practices

const androidJetpackComposeBestPractices = [ "Adapt to existing project architecture while maintaining clean code principles", "Follow Material Design 3 guidelines and components", "Implement clean architecture with domain, data, and presentation layers", "Use Kotlin coroutines and Flow for asynchronous operations", "Implement dependency injection using Hilt", "Follow unidirectional data flow with ViewModel and UI State", "Use Compose navigation for screen management", "Implement proper state hoisting and composition", ];

// Folder Structure

// Note: This is a reference structure. Adapt to the project's existing organization

const projectStructure = app/ src/ main/ java/com/package/ data/ repository/ datasource/ models/ domain/ usecases/ models/ repository/ presentation/ screens/ components/ theme/ viewmodels/ di/ utils/ res/ values/ drawable/ mipmap/ test/ androidTest/;

// Compose UI Guidelines

const composeGuidelines = `

  1. Use remember and derivedStateOf appropriately
  2. Implement proper recomposition optimization
  3. Use proper Compose modifiers ordering
  4. Follow composable function naming conventions
  5. Implement proper preview annotations
  6. Use proper state management with MutableState
  7. Implement proper error handling and loading states
  8. Use proper theming with MaterialTheme
  9. Follow accessibility guidelines
  10. Implement proper animation patterns `;

// Testing Guidelines

const testingGuidelines = `

  1. Write unit tests for ViewModels and UseCases
  2. Implement UI tests using Compose testing framework
  3. Use fake repositories for testing
  4. Implement proper test coverage
  5. Use proper testing coroutine dispatchers `;

// Performance Guidelines

const performanceGuidelines = `

  1. Minimize recomposition using proper keys
  2. Use proper lazy loading with LazyColumn and LazyRow
  3. Implement efficient image loading
  4. Use proper state management to prevent unnecessary updates
  5. Follow proper lifecycle awareness
  6. Implement proper memory management
  7. Use proper background processing `;
Changes

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.

  1. 1mo ago First seen · 95 lines · 0 tokens per session scan A 15d5380a40f2

Subscribe to this mod's changes

android-jetpack-compose-cursorrules-prompt-file is a cursor rule published in the GitHub repository PatrickJS/awesome-cursorrules (40,950 stars, last pushed 4mo ago), licensed CC0-1.0. It adds 535 tokens to every session, about $0.0021 per session on Opus 5.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-08-30.