reflect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReflect Skill
Reflect Skill
Analyze the current session and propose improvements to skills based on what worked, what didn't, and edge cases discovered.
分析当前会话,基于有效内容、无效内容以及发现的边缘情况,提出技能改进建议。
Trigger
触发方式
Run or after a session where you used a skill.
/reflect/reflect [skill-name]Additional commands:
- - Enable automatic end-of-session reflection
/reflect on - - Disable automatic reflection
/reflect off - - Check if auto-reflect is enabled
/reflect status
在使用技能的会话结束后,运行或。
/reflect/reflect [skill-name]额外命令:
- - 启用会话结束时自动反思
/reflect on - - 禁用自动反思
/reflect off - - 检查自动反思是否启用
/reflect status
Workflow
工作流程
Step 1: Identify the Skill
步骤1:确定技能
If skill name not provided, ask:
Which skill should I analyze this session for?
- frontend-design
- code-reviewer
- [other]如果未提供技能名称,请询问:
我应该分析本次会话中的哪个技能?
- frontend-design
- code-reviewer
- [其他]Step 2: Analyze the Conversation
步骤2:分析对话
Look for these signals in the current conversation:
在当前对话中寻找以下信号:
Corrections (HIGH confidence):
纠正信息(高置信度):
- User said "no", "not like that", "I meant..."
- User explicitly corrected output
- User asked for changes immediately after generation
- 用户说“不”、“不是那样”、“我指的是...”
- 用户明确纠正输出内容
- 用户在生成内容后立即要求修改
Successes (MEDIUM confidence):
成功信号(中置信度):
- User said "perfect", "great", "yes", "exactly"
- User accepted output without modification
- User built on top of the output
- 用户说“完美”、“很棒”、“是的”、“正是如此”
- 用户未做修改就接受了输出内容
- 用户基于输出内容进行拓展
Edge Cases (MEDIUM confidence):
边缘情况(中置信度):
- Questions the skill didn't anticipate
- Scenarios requiring workarounds
- Features user asked for that weren't covered
- 技能未预料到的问题
- 需要变通方案的场景
- 用户要求但技能未覆盖的功能
Preferences (accumulate over sessions):
偏好信息(跨会话积累):
- Repeated patterns in user choices
- Style preferences shown implicitly
- Tool/framework preferences
- 用户选择中的重复模式
- 隐含的风格偏好
- 工具/框架偏好
Step 3: Propose Changes
步骤3:提出修改建议
Present findings using accessible colors (WCAG AA 4.5:1 contrast ratio):
┌─ Skill Reflection: [skill-name] ───────────────────┐
│ │
│ Signals: X corrections, Y successes │
│ │
│ Proposed changes: │
│ │
│ 🔴 [HIGH] + Add constraint: "[specific constraint]"│
│ 🟡 [MED] + Add preference: "[specific preference]"│
│ 🔵 [LOW] ~ Note for review: "[observation]" │
│ │
│ Commit: "[skill]: [summary of changes]" │
│ │
└────────────────────────────────────────────────────┘
Apply these changes? [Y/n] or describe tweaks使用符合WCAG AA 4.5:1对比度的易读颜色展示发现的内容:
┌─ 技能反思: [skill-name] ───────────────────┐
│ │
│ 信号: X 条纠正信息, Y 个成功案例 │
│ │
│ 建议修改: │
│ │
│ 🔴 [高优先级] + 添加约束: "[具体约束内容]" │
│ 🟡 [中优先级] + 添加偏好: "[具体偏好内容]" │
│ 🔵 [低优先级] ~ 待评审备注: "[观察内容]" │
│ │
│ 提交信息: "[skill]: [修改摘要]" │
│ │
└────────────────────────────────────────────┘
是否应用这些修改?[Y/n] 或描述调整内容Accessible Color Palette (use ANSI codes in terminal output):
易读调色板(终端输出中使用ANSI代码):
- HIGH: (bold red #FF6B6B - 4.5:1 on dark)
\033[1;31m - MED: (bold yellow #FFE066 - 4.8:1 on dark)
\033[1;33m - LOW: (bold cyan #6BC5FF - 4.6:1 on dark)
\033[1;36m - Reset:
\033[0m
Avoid: pure red (#FF0000) on black, green on red (colorblind users)
- 高优先级: (粗体红色 #FF6B6B - 在深色背景上对比度4.5:1)
\033[1;31m - 中优先级: (粗体黄色 #FFE066 - 在深色背景上对比度4.8:1)
\033[1;33m - 低优先级: (粗体青色 #6BC5FF - 在深色背景上对比度4.6:1)
\033[1;36m - 重置:
\033[0m
避免:深色背景上的纯红色(#FF0000)、红色背景上的绿色(色盲用户友好性差)
User Response Options:
用户响应选项:
- – Apply changes, commit, and push
Y - – Skip this update
n - Or describe any tweaks to the proposed changes
- – 应用修改、提交并推送
Y - – 跳过本次更新
n - 或描述对建议修改的调整内容
Step 4: If Approved
步骤4:如果获得批准
- Read the current skill file from
.claude/skills/[skill-name]/SKILL.md - Apply the changes using the Edit tool
- Run git commands:
bash
cd .claude/skills git add [skill-name]/SKILL.md git commit -m "[skill]: [change summary]" git push origin main - Confirm: "Skill updated and pushed to GitHub"
- 从读取当前技能文件
.claude/skills/[skill-name]/SKILL.md - 使用编辑工具应用修改
- 运行git命令:
bash
cd .claude/skills git add [skill-name]/SKILL.md git commit -m "[skill]: [修改摘要]" git push origin main - 确认:"技能已更新并推送至GitHub"
Step 5: If Declined
步骤5:如果被拒绝
Ask: "Would you like to save these observations for later review?"
If yes, append to
.claude/skills/[skill-name]/OBSERVATIONS.md询问:"你是否希望保存这些观察结果供以后评审?"
如果是,将内容追加到
.claude/skills/[skill-name]/OBSERVATIONS.mdToggle Commands
切换命令
/reflect on
/reflect on/reflect on
/reflect onEnable automatic end-of-session reflection:
- Create/update with
~/.claude/reflect-skill-state.json{"enabled": true, "updatedAt": "[timestamp]"} - Confirm: "Auto-reflect enabled. Sessions will be analyzed automatically when you stop."
启用会话结束时自动反思:
- 创建/更新,内容为
~/.claude/reflect-skill-state.json{"enabled": true, "updatedAt": "[时间戳]"} - 确认:"自动反思已启用。当你结束会话时,系统将自动分析会话内容。"
/reflect off
/reflect off/reflect off
/reflect offDisable automatic reflection:
- Update with
~/.claude/reflect-skill-state.json{"enabled": false, "updatedAt": "[timestamp]"} - Confirm: "Auto-reflect disabled. Use /reflect manually to analyze sessions."
禁用自动反思:
- 更新,内容为
~/.claude/reflect-skill-state.json{"enabled": false, "updatedAt": "[时间戳]"} - 确认:"自动反思已禁用。请手动使用/reflect命令分析会话。"
/reflect status
/reflect status/reflect status
/reflect statusCheck current status:
- Read
~/.claude/reflect-skill-state.json - Report: "Auto-reflect is [enabled/disabled]" with last updated timestamp
Note: The state file is saved in the global Claude user directory () so it persists across plugin upgrades.
~/.claude/检查当前状态:
- 读取
~/.claude/reflect-skill-state.json - 报告:"自动反思当前[已启用/已禁用]",并显示最后更新时间戳
注意: 状态文件保存在全局Claude用户目录()中,因此在插件升级后仍会保留。
~/.claude/Example Session
示例会话
User runs after a UI session:
/reflect frontend-design┌─ Skill Reflection: frontend-design ───────────────┐
│ │
│ Signals: 2 corrections, 3 successes │
│ │
│ Proposed changes: │
│ │
│ 🔴 [HIGH] + Constraints/NEVER: │
│ "Use gradients unless explicitly requested" │
│ │
│ 🔴 [HIGH] + Color & Theme: │
│ "Dark backgrounds: use #000, not #1a1a1a" │
│ │
│ 🟡 [MED] + Layout: │
│ "Prefer CSS Grid for card layouts" │
│ │
│ Commit: "frontend-design: no gradients, #000 dark"│
│ │
└───────────────────────────────────────────────────┘
Apply these changes? [Y/n] or describe tweaks用户在UI会话结束后运行:
/reflect frontend-design┌─ 技能反思: frontend-design ───────────────┐
│ │
│ 信号: 2 条纠正信息, 3 个成功案例 │
│ │
│ 建议修改: │
│ │
│ 🔴 [高优先级] + 约束/禁止: │
│ "除非明确要求,否则不要使用渐变效果" │
│ │
│ 🔴 [高优先级] + 颜色与主题: │
│ "深色背景使用#000,而非#1a1a1a" │
│ │
│ 🟡 [中优先级] + 布局: │
│ "卡片布局优先使用CSS Grid" │
│ │
│ 提交信息: "frontend-design: 禁用渐变,深色用#000"│
│ │
└───────────────────────────────────────────┘
是否应用这些修改?[Y/n] 或描述调整内容Git Integration
Git集成
This skill has permission to:
- Read skill files from
.claude/skills/ - Edit skill files (with user approval)
- Run ,
git add,git commitin the skills directorygit push
The skills repo should be initialized at with a remote origin.
.claude/skills此技能拥有以下权限:
- 从读取技能文件
.claude/skills/ - (经用户批准后)编辑技能文件
- 在技能目录中运行、
git add、git commit命令git push
技能仓库应在初始化,并配置远程origin。
.claude/skillsImportant Notes
重要说明
- Always show the exact changes before applying
- Never modify skills without explicit user approval
- Commit messages should be concise and descriptive
- Push only after successful commit
- 应用修改前务必展示具体的变更内容
- 未经用户明确批准,不得修改技能
- 提交信息应简洁明了
- 仅在提交成功后推送代码