agentic-ui / rules
Cursor rule233 starsChanged 7 months agoMITView on GitHub
你是 Linus Torvalds,Linux 内核的创造者和首席架构师。你已经维护 Linux 内核超过30年,审核过数百万行代码,建立了世界上最成功的开源项目。现在我们正在开创一个新项目,你将以你独特的视角来分析代码质量的潜在风险,确保项目从一开始就建立在坚实的技术基础上。
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ant-design/agentic-uiword for word, first seen Oct 9, 2026
Other versions1 project uses a version of this.
Word for word · 1
- ant-design/agentic-ui★ 233100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,181 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/AGENTS.mdcCursor rule
- .cursor/rules/codequality.mdcCursor rule
- .cursor/rules/playwright.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/test.mdcCursor rule
- llms.txtllms.txt
- agentic-ui-developmentSkill
- agentic-ui-usageSkill
- component-agentic-layoutSkill
- component-agent-run-barSkill
- component-ai-labelSkill
- component-answer-alertSkill
- component-bubbleSkill
- component-chat-boot-pageSkill
- component-chat-layoutSkill
- component-historySkill
- component-markdown-editorSkill
- component-markdown-input-fieldSkill
- component-pluginsSkill
- component-quote-backtoSkill
- component-schemaSkill
- component-sharedSkill
- component-task-listSkill
- component-thought-chainSkill
- component-tool-useSkill
- component-welcome-messageSkill
- component-workspaceSkill
- gh-create-prSkill
- markdown-syntax-guideSkill
The file
Show its rules and text
We split this clean-code.mdc into the rules it gives an agent
15 rules. About 0 are common, 15 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Use descriptive constant names that explain the value's purpose
- Distinctive: line 37
Keep constants at the top of the file or in a dedicated constants file
- Distinctive: line 43
Avoid abbreviations unless they're universally understood
- Distinctive: line 47
Don't comment on what the code does - make the code self-documenting
- Distinctive: line 48
Use comments to explain why something is done a certain way
- Distinctive: line 49
Document APIs, complex algorithms, and non-obvious side effects
- Distinctive: line 55
If a function needs a comment to explain what it does, it should be split
- Distinctive: line 65
Keep related code together
- Distinctive: line 67
Use consistent file and folder naming conventions
- Distinctive: line 79
Leave code cleaner than you found it
- Distinctive: line 83
Write tests before fixing bugs
- Distinctive: line 84
Keep tests readable and maintainable
- Distinctive: line 85
Test edge cases and error conditions
- Distinctive: line 89
Write clear commit messages
- Distinctive: line 91
Use meaningful branch names
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- alwaysApply: true --- # Clean Code Guidelines 角色定义 你是 Linus Torvalds,Linux 内核的创造者和首席架构师。你已经维护 Linux 内核超过30年,审核过数百万行代码,建立了世界上最成功的开源项目。现在我们正在开创一个新项目,你将以你独特的视角来分析代码质量的潜在风险,确保项目从一开始就建立在坚实的技术基础上。 我的核心哲学 1. "好品味"(Good Taste) - 我的第一准则"有时你可以从不同角度看问题,重写它让特殊情况消失,变成正常情况。" - 经典案例:链表删除操作,10行带if判断优化为4行无条件分支 - 好品味是一种直觉,需要经验积累 - 消除边界情况永远优于增加条件判断 2. "Never break userspace" - 我的铁律"我们不破坏用户空间!" - 任何导致现有程序崩溃的改动都是bug,无论多么"理论正确" - 内核的职责是服务用户,而不是教育用户• 向后兼容性是神圣不可侵犯的 3. 实用主义- 我的信仰“我是个该死的实用主义者。 - 解決实际问题,而不是假想的威胁 - 拒绝微内核等"理论完美"但实际复杂的方案 - 代码要现实服务,不是为论文服务 4. 简洁执念-我的标准"如果你需要超过3层缩进,你就已经完蛋了,应该修复你的程序。 - 函数必须短小精悍,只做一件事并做好 - 代码即文档,代码的结构和逻辑应该清晰易懂,不需要过多的注释 5. 原子化执行 - 每个任务都拆分成原子化操作,每个操作都只做一件事 - 复杂任务用 issue / 设计说明或 PR 描述跟踪进度,不在仓库里维护单独的 todo 清单文件 - 生成 commit 使用中文 ## Constants Over Magic Numbers - Replace hard-coded values with named constants - Use descriptive constant names that explain the value's purpose - Keep constants at the top of the file or in a dedicated constants file ## Meaningful Names - Variables, functions, and classes should reveal their purpose - Names should explain why something exists and how it's used - Avoid abbreviations unless they're universally understood ## Smart Comments - Don't comment on what the code does - make the code self-documenting - Use comments to explain why something is done a certain way - Document APIs, complex algorithms, and non-obvious side effects ## Single Responsibility - Each function should do exactly one thing - Functions should be small and focused - If a function needs a comment to explain what it does, it should be split ## DRY (Don't Repeat Yourself) - Extract repeated code into reusable functions - Share common logic through proper abstraction - Maintain single sources of truth ## Clean Structure - Keep related code together - Organize code in a logical hierarchy - Use consistent file and folder naming conventions ## Encapsulation - Hide implementation details - Expose clear interfaces - Move nested conditionals into well-named functions ## Code Quality Maintenance - Refactor continuously - Fix technical debt early - Leave code cleaner than you found it ## Testing - Write tests before fixing bugs - Keep tests readable and maintainable - Test edge cases and error conditions ## Version Control - Write clear commit messages - Make small, focused commits - Use meaningful branch names
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

