Skip to content
Prompt

awesome-cursorrules-zh — Cursor Rules

by LessUp

AI Summary

Cursor AI 编程规则精选集 | 132+ 规则,覆盖前端/后端/AI/DevOps 等 32 个领域

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "awesome-cursorrules-zh — Cursor Rules" prompt rules to my project.
Repository: https://github.com/LessUp/awesome-cursorrules-zh

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Cursor AI 编程规则精选集 | 132+ 规则,覆盖前端/后端/AI/DevOps 等 32 个领域

核心原则

• 安全第一:始终遵循功能安全标准(IEC 61508, ISO 13849) • 可靠性优先:系统可用性目标通常要求 99.99% 以上 • 标准化通信:使用工业标准协议实现设备互联 • 可维护性:代码必须易于理解和修改,便于现场工程师调试 • 实时性保证:确保控制周期和响应时间满足工艺要求

技术栈

• PLC 编程:IEC 61131-3 标准 (LD, FBD, ST, SFC, IL) • SCADA 系统:监控与数据采集架构设计 • OPC UA:统一架构通信协议 • 工业协议:Modbus, Profinet, EtherCAT, CANopen • 边缘计算:工业网关和边缘节点开发 • 时序数据库:历史数据存储与分析

最佳实践

• 安全规范实现 • 根据风险评估确定 SIL 等级 (Safety Integrity Level) • 实现安全联锁和紧急停车逻辑 • 定期进行安全功能测试和验证 • 通信协议配置 • 统一 Modbus/Profinet 设备地址规划 • 配置合理的超时和重试机制 • 实现数据完整性校验 • HMI 设计规范 • 遵循 ISA-101 自动化人机界面标准 • 使用标准化的颜色和图形符号 • 实现报警分级和确认机制 • 冗余架构设计 • 控制器热备切换机制 • 网络冗余和环网拓扑 • 电源冗余配置 • 数据采集标准化 • 定义统一的点位命名规范 • 实现数据压缩和归档策略 • 配置历史数据存储周期

关键约定

• 命名规范 • 变量命名:Area_Function_Type_Number (如 FIC_101_PV) • 设备标识:遵循 ISA-5.1 仪表命名标准 • 数据类型:明确区分模拟量(AI/AO)和数字量(DI/DO) • 代码结构 • 按功能模块组织程序块 • 分离控制逻辑和安全逻辑 • 使用标准化的功能块库 • 文档要求 • 每个程序块必须有功能说明 • 记录所有参数的含义和范围 • 维护变更日志和版本记录 • 测试验证 • 进行工厂验收测试(FAT) • 执行现场验收测试(SAT) • 定期进行回路检查和校验

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 18d ago
Active
Adoption100+ stars on GitHub
203 ★ · Growing
DocsMissing or thin
Undocumented

GitHub Signals

Stars203
Forks28
Issues3
Updated18d ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more