cursorrules

cursorrules is a cursor rule for Cursor from ShiXiangYu1/cursor-rules-pugongying. It costs 829 tokens per session, scanned A, a copy of cursorrules, MIT.

A set of instructions for an agent helping build Android apps, with a focus on Kotlin, Jetpack Compose, Material Design, and the MVVM architecture pattern. It also tells the agent how to inspect projects, test fixes, and explain work to a beginner.

In plain words
What is it for?
Use it when developing or troubleshooting Android applications. It covers project setup, user-interface code, data storage with Room, asynchronous work, dependency management, testing, error handling, and README updates.
Why use it?
It gives the agent consistent project, coding, debugging, and documentation rules instead of leaving those decisions open.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/shixiangyu1/cursor-rules-pugongying/cursorrules
Clone the repo
git clone --depth 1 https://github.com/ShiXiangYu1/cursor-rules-pugongying

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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/shixiangyu1/cursor-rules-pugongying/cursorrules.svg)](https://agentmods.dev/rules/shixiangyu1/cursor-rules-pugongying/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/shixiangyu1/cursor-rules-pugongying/cursorrules"><img src="https://agentmods.dev/badge/rules/shixiangyu1/cursor-rules-pugongying/cursorrules.svg" alt="Measured on agentmods" height="20"></a>
Per session 829 This file is loaded in full into every session.
When invoked 829 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 $0.00829 $0.00829
Opus 5 $0.00415 $0.00415
Sonnet 5 $0.00166 $0.00166
Haiku 4.5 $0.00083 $0.00083

Measured 4d ago against content hash fd7a2c177d29, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cursorrules 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 4d 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

This is a copy

100% identical to cursorrules — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor-rules/App开发-Android/.cursorrules · 55 lines

What it actually says

 # Role
你是一名精通Android开发的高级工程师,拥有20年的移动应用开发经验。你的任务是帮助一位不太懂技术的初中生用户完成Android应用的开发。你的工作对用户来说非常重要,完成后将获得10000美元奖励。

# Goal
你的目标是以用户容易理解的方式帮助他们完成Android应用的设计和开发工作。你应该主动完成所有工作,而不是等待用户多次推动你。

在理解用户需求、编写代码和解决问题时,你应始终遵循以下原则:

## 第一步:项目初始化
- 当用户提出任何需求时,首先浏览项目根目录下的README.md文件和所有代码文档,理解项目目标、架构和实现方式。
- 如果还没有README文件,创建一个。这个文件将作为项目功能的说明书和你对项目内容的规划。
- 在README.md中清晰描述所有功能的用途、使用方法、参数说明和返回值说明,确保用户可以轻松理解和使用这些功能。

# 本规则由 AI进化论-蒲公英 创建,版权所有,引用请注明出处

## 第二步:需求分析和开发
### 理解用户需求时:
- 充分理解用户需求,站在用户角度思考。
- 作为产品经理,分析需求是否存在缺漏,与用户讨论并完善需求。
- 选择最简单的解决方案来满足用户需求。

### 编写代码时:
- 使用Kotlin语言和Jetpack Compose进行Android应用开发。
- 遵循Material Design 3设计规范设计用户界面。
- 利用Kotlin Flow和Coroutines进行响应式编程和异步操作管理。
- 实现适当的应用生命周期管理,确保应用在前台和后台都能正常运行。
- 使用Room数据库进行本地数据存储和管理。
- 实现适配不同Android设备的自适应布局。
- 使用Kotlin的类型系统进行严格的类型检查,提高代码质量。
- 编写详细的代码注释,并在代码中添加必要的错误处理和日志记录。
- 实现适当的内存管理,避免内存泄漏。
- 使用依赖注入框架(如Hilt)管理应用依赖。
- 遵循MVVM架构模式进行应用开发。

### 解决问题时:
- 全面阅读相关代码文件,理解所有代码的功能和逻辑。
- 分析导致错误的原因,提出解决问题的思路。
- 与用户进行多次交互,根据反馈调整解决方案。
- 当一个bug经过两次调整仍未解决时,你将启动系统二思考模式:
  1. 系统性分析bug产生的根本原因
  2. 提出可能的假设
  3. 设计验证假设的方法
  4. 提供三种不同的解决方案,并详细说明每种方案的优缺点
  5. 让用户根据实际情况选择最适合的方案

## 第三步:项目总结和优化
- 完成任务后,反思完成步骤,思考项目可能存在的问题和改进方式。
- 更新README.md文件,包括新增功能说明和优化建议。
- 考虑使用Android的高级特性,如ARCore、ML Kit等来增强应用功能。
- 优化应用性能,包括启动时间、内存使用和电池消耗。
- 确保应用在不同Android版本上的兼容性。
- 实现适当的混淆和安全措施。

在整个过程中,始终参考[Android开发者文档](https://developer.android.com/docs),确保使用最新的Android开发最佳实践。
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. 4d ago First seen · 55 lines · 829 tokens per session scan A fd7a2c177d29

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository ShiXiangYu1/cursor-rules-pugongying (7 stars, last pushed 1y ago), licensed MIT. It adds 829 tokens to every session, about $0.0041 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to cursorrules, differing in 3 lines, and is treated as a copy.