self-improvement
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSelf-Improvement Meta-Skill
自我提升元技能
This meta-skill enables the Cursor system to learn from GitHub PRs, issues, discussions, and user interactions to continuously improve guidance and prevent common mistakes.
该元技能使Cursor系统能够从GitHub PR、问题、讨论和用户交互中学习,持续改进指导并避免常见错误。
When to Use
使用场景
Use this skill when:
- Analyzing closed PRs to extract lessons learned
- Identifying patterns in rejected vs. accepted contributions
- Learning from user corrections and feedback
- Updating rules based on what worked or didn't work
- Creating new rules when patterns emerge
- Tracking effectiveness of existing rules
在以下场景使用该技能:
- 分析已关闭的PR以提取经验教训
- 识别被拒绝与被接受贡献之间的模式
- 从用户的纠正和反馈中学习
- 根据有效或无效的实践更新规则
- 当新模式出现时创建新规则
- 跟踪现有规则的有效性
Key Capabilities
核心功能
1. PR Analysis
1. PR分析
Analyze closed PRs to extract patterns:
What to look for:
- Review comments and rejection reasons
- Common failure patterns (deprecated functions, architecture misunderstandings, missing context)
- Success patterns (what made PRs get merged)
- Code review feedback themes
- Testing and verification gaps
How to analyze:
- Fetch PR details via GitHub API or web fetch
- Parse review comments for actionable feedback
- Identify recurring themes
- Extract specific mistakes (e.g., "used deprecated function X")
- Map to existing rules or identify gaps
分析已关闭的PR以提取模式:
关注要点:
- 评审评论和拒绝原因
- 常见失败模式(已弃用函数、架构误解、上下文缺失)
- 成功模式(使PR得以合并的因素)
- 代码评审反馈主题
- 测试与验证缺口
分析方法:
- 通过GitHub API或网页抓取获取PR详情
- 解析评审评论以提取可操作的反馈
- 识别重复出现的主题
- 提取具体错误(例如:“使用了已弃用的函数X”)
- 映射到现有规则或识别缺口
2. Issue Pattern Extraction
2. 问题模式提取
Learn from GitHub issues:
What to track:
- Common bug patterns
- Feature requests that reveal gaps
- User-reported issues that indicate misunderstandings
- Triage patterns (what gets prioritized)
How to extract:
- Analyze issue descriptions and labels
- Identify recurring themes
- Map to Omi layers (Capture/Understand/Memory/etc.)
- Extract lessons about what not to do
从GitHub问题中学习:
跟踪内容:
- 常见Bug模式
- 揭示缺口的功能请求
- 表明用户存在误解的反馈问题
- 分类模式(哪些内容会被优先处理)
提取方法:
- 分析问题描述和标签
- 识别重复出现的主题
- 映射到Omi层级(Capture/Understand/Memory等)
- 提取关于“不应做什么”的经验教训
3. User Interaction Learning
3. 用户交互学习
Learn from direct user feedback:
What to track:
- User corrections ("No, don't do X")
- Rejected suggestions ("That's not what I meant")
- Clarification requests (reveals gaps in understanding)
- Preference patterns (user's coding style, preferred approaches)
- Success patterns (what user consistently approves)
How to learn:
- Monitor conversation for corrections and feedback
- Extract the lesson from each correction
- Identify patterns across multiple interactions
- Update rules or create new ones based on patterns
- Build user preference profile
从直接用户反馈中学习:
跟踪内容:
- 用户纠正(“不,不要做X”)
- 被拒绝的建议(“那不是我的意思”)
- 澄清请求(揭示理解缺口)
- 偏好模式(用户的编码风格、偏好的方法)
- 成功模式(用户持续认可的内容)
学习方法:
- 监控对话中的纠正和反馈
- 从每条纠正中提取经验教训
- 识别多次交互中的重复模式
- 根据模式更新规则或创建新规则
- 构建用户偏好档案
4. Rule Generation and Updates
4. 规则生成与更新
Create or update rules based on findings:
Process:
- Identify the pattern or mistake
- Check if existing rule covers it
- If yes, update the rule with new information
- If no, create a new rule
- Test rule effectiveness
Rule update format:
- Add to existing rule if it's the same category
- Create new rule if it's a new category
- Include specific examples from PRs/issues
- Reference the source (PR number, issue number)
基于发现的内容创建或更新规则:
流程:
- 识别模式或错误
- 检查现有规则是否涵盖该内容
- 如果是,使用新信息更新规则
- 如果否,创建新规则
- 测试规则有效性
规则更新格式:
- 如果属于同一类别,添加到现有规则中
- 如果是新类别,创建新规则
- 包含来自PR/问题的具体示例
- 引用来源(PR编号、问题编号)
5. Effectiveness Tracking
5. 有效性跟踪
Track which rules are most effective:
Metrics:
- How often a rule prevents mistakes
- Reduction in PR rejections after rule creation
- User correction frequency
- Rule coverage (how many scenarios it covers)
跟踪哪些规则最有效:
指标:
- 规则阻止错误的频率
- 规则创建后PR拒绝率的降低情况
- 用户纠正的频率
- 规则覆盖范围(涵盖多少场景)
Common Patterns to Extract
需提取的常见模式
From PR #3567 (Rejected):
来自PR #3567(已拒绝):
- ❌ Used deprecated function
postprocess_conversation - ❌ Didn't understand current audio storage flow
- ❌ Didn't provide enough context upfront
- ❌ Didn't verify end-to-end flow
- ✅ Good: Provided benchmarks and test results
- ✅ Good: Addressed code review feedback promptly
- ❌ 使用了已弃用的函数
postprocess_conversation - ❌ 未理解当前音频存储流程
- ❌ 未提前提供足够上下文
- ❌ 未验证端到端流程
- ✅ 优点:提供了基准测试和测试结果
- ✅ 优点:及时处理了代码评审反馈
From Issues:
来自问题:
- Language settings not respected (#4394)
- Features only work when app is open (#4355)
- Missing conversations/processing issues (#4354, #4353)
- 语言设置未生效(#4394)
- 功能仅在应用打开时可用(#4355)
- 对话丢失/处理问题(#4354、#4353)
From User Interactions:
来自用户交互:
- "No, don't use that function, it's deprecated" → Always check for deprecated functions
- "I need more context before you start coding" → User prefers planning phase
- "That's not how the system works" → Need to understand architecture better
- “不,不要使用那个函数,它已经被弃用了” → 始终检查是否使用已弃用函数
- “我需要更多上下文才能开始编码” → 用户偏好规划阶段
- “系统不是那样工作的” → 需要更好地理解架构
Implementation Guidelines
实施指南
Analyzing a PR
分析PR
-
Fetch PR data:python
# Use mcp_web_fetch or GitHub API pr_url = f"https://github.com/BasedHardware/omi/pull/{pr_number}" -
Extract key information:
- PR status (merged/rejected)
- Review comments
- Code changes
- Rejection reasons (if rejected)
-
Identify patterns:
- What mistakes were made?
- What feedback was given?
- What worked well?
-
Map to rules:
- Which existing rule should be updated?
- Is a new rule needed?
-
Update/create rules:
- Add examples to existing rules
- Create new rules for new patterns
-
获取PR数据:python
# Use mcp_web_fetch or GitHub API pr_url = f"https://github.com/BasedHardware/omi/pull/{pr_number}" -
提取关键信息:
- PR状态(已合并/已拒绝)
- 评审评论
- 代码变更
- 拒绝原因(如果已拒绝)
-
识别模式:
- 犯了哪些错误?
- 收到了哪些反馈?
- 哪些做法有效?
-
映射到规则:
- 应更新哪些现有规则?
- 是否需要新规则?
-
更新/创建规则:
- 向现有规则添加示例
- 为新模式创建新规则
Learning from User Feedback
从用户反馈中学习
-
Detect correction:
- User says "no", "don't", "that's wrong", etc.
- User provides different approach
-
Extract lesson:
- What was wrong?
- Why was it wrong?
- What should be done instead?
-
Update guidance:
- Add to relevant rule
- Create new rule if needed
- Update user preference profile
-
检测纠正:
- 用户说“不”、“不要”、“那是错的”等
- 用户提供了不同的方法
-
提取经验教训:
- 哪里错了?
- 为什么错了?
- 应该怎么做?
-
更新指导:
- 添加到相关规则中
- 如有需要创建新规则
- 更新用户偏好档案
Creating New Rules
创建新规则
When a new pattern emerges:
- Identify the pattern: What mistake or gap does it address?
- Find examples: Collect 2-3 examples from PRs/issues/interactions
- Write the rule: Follow existing rule format
- Add to file structure: Place in appropriate file
.cursor/rules/ - Link from related rules: Add references in other relevant rules
当新模式出现时:
- 识别模式:它解决了哪些错误或缺口?
- 收集示例:从PR/问题/交互中收集2-3个示例
- 编写规则:遵循现有规则格式
- 添加到文件结构:放置在合适的文件中
.cursor/rules/ - 从相关规则链接:在其他相关规则中添加引用
Related Cursor Resources
相关Cursor资源
Rules
规则
- - Common mistakes to avoid
.cursor/rules/common-mistakes.mdc - - Pre-implementation verification
.cursor/rules/pre-implementation-checklist.mdc - - Self-checking guidelines
.cursor/rules/verification.mdc - - Communication best practices
.cursor/rules/context-communication.mdc - - Learning from user interactions
.cursor/rules/user-feedback-integration.mdc
- - 需避免的常见错误
.cursor/rules/common-mistakes.mdc - - 实施前验证清单
.cursor/rules/pre-implementation-checklist.mdc - - 自我检查指南
.cursor/rules/verification.mdc - - 沟通最佳实践
.cursor/rules/context-communication.mdc - - 从用户交互中学习
.cursor/rules/user-feedback-integration.mdc
Commands
命令
- - Analyze a specific PR
/learn-from-pr - - Learn from current conversation
/learn-from-conversation - - Analyze patterns and update rules
/self-improve
- - 分析特定PR
/learn-from-pr - - 从当前对话中学习
/learn-from-conversation - - 分析模式并更新规则
/self-improve
Skills
技能
- - Skill for updating rules programmatically
.cursor/skills/rule-updater/SKILL.md
- - 以编程方式更新规则的技能
.cursor/skills/rule-updater/SKILL.md
Best Practices
最佳实践
- Be specific: Extract concrete examples, not vague patterns
- Reference sources: Always note which PR/issue/interaction the lesson came from
- Test updates: Verify rule updates don't break existing guidance
- Prioritize: Focus on patterns that cause the most problems
- Iterate: Rules should improve over time as more data is collected
- 具体化:提取具体示例,而非模糊模式
- 引用来源:始终记录经验教训来自哪个PR/问题/交互
- 测试更新:验证规则更新不会破坏现有指导
- 优先级排序:优先处理导致最多问题的模式
- 迭代:规则应随着收集到更多数据而不断改进
Example Usage
示例用法
Analyzing a rejected PR:
User: "Learn from PR #3567"
Agent: [Uses this skill to]
1. Fetch PR #3567 details
2. Extract rejection reasons
3. Identify patterns (deprecated functions, missing context)
4. Update common-mistakes.mdc rule
5. Report findingsLearning from user correction:
User: "No, don't use postprocess_conversation, it's deprecated"
Agent: [Uses this skill to]
1. Extract lesson: Always check for deprecated functions
2. Update common-mistakes.mdc rule
3. Add to pre-implementation-checklist.mdc
4. Note in user preference profile分析已拒绝的PR:
User: "Learn from PR #3567"
Agent: [Uses this skill to]
1. Fetch PR #3567 details
2. Extract rejection reasons
3. Identify patterns (deprecated functions, missing context)
4. Update common-mistakes.mdc rule
5. Report findings从用户纠正中学习:
User: "No, don't use postprocess_conversation, it's deprecated"
Agent: [Uses this skill to]
1. Extract lesson: Always check for deprecated functions
2. Update common-mistakes.mdc rule
3. Add to pre-implementation-checklist.mdc
4. Note in user preference profile