AI SummaryA Cursor IDE rule set that enforces component development standards for a Vue3 UI library, ensuring consistent documentation practices and API updates across component modifications.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "lew-ui — Cursor Rules" prompt rules to my project. Repository: https://github.com/lewkamtao/lew-ui 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
A beautiful component library based on vue3
1. 组件修改后的文档更新要求
每次修改完组件内容后,必须同步更新以下内容: • 组件根目录的 MDC 文档:如果组件目录下存在 {componentName}.mdc 文件,需要更新文档中相关的 API 说明、注意事项、常见问题等内容 • 变更日志:在 MDC 文档的「变更日志」章节中添加本次修改的记录,包括版本号、变更内容、日期 示例: `markdown
6. 变更日志
| 版本 | 变更内容 | 日期 | |------|----------|------| | 1.1.0 | 新增 statusPlacement 属性,支持自定义状态指示器位置 | 2024-01-15 | | 1.0.0 | 初始版本 | 2024-01-01 | `
2. 文档生成规范
• ❌ 不需要生成总结文档:修改组件时,不要生成额外的总结性文档或变更说明文档 • ✅ 直接更新现有文档:在组件目录下的 MDC 文件中直接更新相关内容
3. 缺失文档的处理
如果当前组件目录下没有 MDC 文档(即不存在 {componentName}.mdc 文件),需要: • 按照 @.cursor/create-component-mdc.mdc 的规范生成完整的组件文档 • 将生成的 MDC 文档保存到组件根目录,命名为 {componentName}.mdc • 文档应包含:组件基础信息、快速开始、详细 API 说明、注意事项、常见问题与修复方案、变更日志等完整模块 组件目录结构示例: ` lib/components/general/avatar/ ├── index.ts ├── avatar.mdc # 组件文档(如不存在需创建) └── src/ ├── LewAvatar.vue └── props.ts `
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts