Rule
0 installs · 0 said it worked
Cursor rules for Android Jetpack Compose project guidance
A .cursorrules file that guides Cursor's AI to follow Jetpack Compose best practices, clean architecture layers, folder structure, UI, testing, and performance guidelines for Android development.
People use this for
- jetpack compose cursor rules
- android compose project guidelines
- cursor ai rules for android
- compose clean architecture rules file
- how to guide cursor for android development
- Name
cursor-rules-for-android-jetpack-compose-project-guidance- Works with
- Cursor
- License
- CC0(as observed at the source)
- Version
- v1 · updated Nov 29, 2026
Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.
Are you the author?Claim this profileRequest removal
Use this rule
$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/cursor-rules-for-android-jetpack-compose-project-guidance-yck2/export/mdc" -o .cursor/rules/cursor-rules-for-android-jetpack-compose-project-guidance.mdcThen open a new session; Cursor picks it up from .cursor/rules/.
Manual install
Save cursor-rules-for-android-jetpack-compose-project-guidance.mdc as .cursor/rules/cursor-rules-for-android-jetpack-compose-project-guidance.mdc for this project or ~/.cursor/rules/cursor-rules-for-android-jetpack-compose-project-guidance.mdc for every project, then start a new session.
Rule
description: "Cursor rules for Android development with Jetpack Compose integration." globs: */ alwaysApply: false
// 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 = `
- Use remember and derivedStateOf appropriately
- Implement proper recomposition optimization
- Use proper Compose modifiers ordering
- Follow composable function naming conventions
- Implement proper preview annotations
- Use proper state management with MutableState
- Implement proper error handling and loading states
- Use proper theming with MaterialTheme
- Follow accessibility guidelines
- Implement proper animation patterns `;
// Testing Guidelines
const testingGuidelines = `
- Write unit tests for ViewModels and UseCases
- Implement UI tests using Compose testing framework
- Use fake repositories for testing
- Implement proper test coverage
- Use proper testing coroutine dispatchers `;
// Performance Guidelines
const performanceGuidelines = `
- Minimize recomposition using proper keys
- Use proper lazy loading with LazyColumn and LazyRow
- Implement efficient image loading
- Use proper state management to prevent unnecessary updates
- Follow proper lifecycle awareness
- Implement proper memory management
- Use proper background processing `;
No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.
Tried it
Reports from people who added this rule to their editor. They roll up into the badges above.
No one has filed a report yet. Try the prompt and be the first.
Related rules
- Quality engineering agent role for risk-based test strategy and CI quality gates
A senior quality engineering role prompt that guides an assistant through risk-based test strategy, test automation architecture, CI/CD quality gates, edge-case analysis, and defect management, writing results to a TODO checklist file.
Coding · @wkaandemir
- Scaffold a full production-ready project repository from a brief
A system-style prompt that makes the model act as an elite software engineer and product architect, filling a project brief to generate a complete, runnable repository with file tree, source files, setup commands, and an upgrade roadmap.
Coding · @handkllcservices
- Agent that writes, runs, and repairs tests after code changes
A system prompt defining a test-writer-fixer agent that writes unit, integration, and end-to-end tests, runs suites, analyzes failures, and repairs tests without weakening them.
Coding · @ersinyilmaz
- Flaky Test Detector: separate flaky CI tests from real failures
Agent skill that reads repeated CI run results (JUnit XML or CSV history), flags tests that pass and fail without code changes, ranks them by flip and failure rate, and recommends targeted fixes or quarantine plans instead of retries.
Coding · @f
- Cursor rules for writing and testing Xian smart contracts in Python
A Cursor rules file that guides the assistant through writing Xian blockchain smart contracts in Python, covering naming, state, context variables, events, error handling, and unittest-based testing with security checks.
Coding · @patrickjs
License: CC0v1 · published Nov 29, 2026
Comments
No comments yet. If you tried this prompt, say how it went.