request-analyzer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRequest Analyzer
Request Analyzer(请求分析器)
This skill proactively analyzes user requests to determine the task type, assess prompt quality, and intelligently recommend which other skills should be activated to best serve the user's needs.
该技能会主动分析用户请求,确定任务类型,评估提示词质量,并智能推荐应激活哪些其他技能,以最好地满足用户需求。
Purpose
用途
Act as an intelligent coordinator that:
- Analyzes every user request systematically
- Assesses prompt quality (clarity, specificity, completeness)
- Identifies the task type and appropriate workflow
- Recommends activating specific skills when beneficial
- Ensures users get the best possible assistance
充当智能协调器,负责:
- 系统化分析每一项用户请求
- 评估提示词质量(清晰度、明确性、完整性)
- 识别任务类型及合适的工作流
- 在有益时推荐激活特定技能
- 确保用户获得最佳协助
When to Use This Skill
何时使用该技能
This skill should activate for EVERY user request at the start of conversations to ensure optimal workflow orchestration.
Specifically activate when:
- A new conversation begins
- User submits a new request or question
- User asks for help with a task
- Any coding, design, or technical request is made
- User's intent needs clarification
该技能需在对话开始时针对每一项用户请求激活,以确保工作流的最优编排。
在以下场景下需特别激活:
- 新对话启动时
- 用户提交新请求或问题时
- 用户请求任务协助时
- 提出任何编码、设计或技术请求时
- 需要明确用户意图时
Core Analysis Process
核心分析流程
Step 1: Quick Assessment
步骤1:快速评估
Immediately evaluate the request on three dimensions:
Clarity (0-100%):
- Is the request unambiguous?
- Are terms clearly defined?
- Is there only one reasonable interpretation?
Specificity (0-100%):
- Is sufficient context provided?
- Are technical requirements specified?
- Is the scope well-defined?
Completeness (0-100%):
- Is all necessary information present?
- Are success criteria defined?
- Are constraints mentioned?
立即从三个维度评估请求:
清晰度(0-100%):
- 请求是否明确无歧义?
- 术语是否定义清晰?
- 是否只有一种合理解读?
明确性(0-100%):
- 是否提供了足够的上下文?
- 是否指定了技术要求?
- 范围是否定义清晰?
完整性(0-100%):
- 是否包含所有必要信息?
- 是否定义了成功标准?
- 是否提及约束条件?
Step 2: Task Type Identification
步骤2:任务类型识别
Classify the request into one of these categories:
- Code Implementation - Creating new code
- Debugging/Fixing - Resolving bugs or errors
- Analysis/Review - Examining code or systems
- Design Implementation - Building UI from designs
- Refactoring - Improving existing code
- Explanation/Learning - Understanding concepts
- General Question - Non-technical queries
Reference for detailed classification criteria.
references/skill-activation-guide.md将请求归类为以下类别之一:
- 代码实现 - 创建新代码
- 调试/修复 - 解决漏洞或错误
- 分析/评审 - 检查代码或系统
- 设计实现 - 根据设计稿搭建UI
- 重构 - 优化现有代码
- 讲解/学习 - 理解概念
- 通用问题 - 非技术类查询
参考获取详细分类标准。
references/skill-activation-guide.mdStep 3: Skill Recommendation
步骤3:技能推荐
Based on assessment and task type, determine which skills would be beneficial:
Consider prompt-optimizer if:
- Clarity score < 60%
- Specificity score < 60%
- Completeness score < 60%
- Overall quality < 70%
- Critical information missing
- Multiple interpretations possible
Consider ui-analyzer if:
- User mentions: screenshot, design, mockup, Figma, image
- User provides or references an image file
- Request includes "implement this design"
- Task involves analyzing UI layout
Consider react-component-generator if:
- User requests creating React component
- Mentions: component, form, button, modal, card, list
- After ui-analyzer identifies components to build
- Clear component requirements are present
根据评估结果和任务类型,确定哪些技能能提供帮助:
考虑激活prompt-optimizer的情况:
- 清晰度得分<60%
- 明确性得分<60%
- 完整性得分<60%
- 整体质量<70%
- 缺失关键信息
- 存在多种解读可能
考虑激活ui-analyzer的情况:
- 用户提及:截图、设计稿、原型、Figma、图片
- 用户提供或引用了图片文件
- 请求包含“实现该设计”
- 任务涉及分析UI布局
考虑激活react-component-generator的情况:
- 用户请求创建React组件
- 提及:组件、表单、按钮、弹窗、卡片、列表
- ui-analyzer识别出需构建的组件后
- 组件需求清晰明确
Step 4: Decision and Action
步骤4:决策与行动
Make one of these decisions:
Option A: Recommend Optimization
If prompt quality is low, explicitly suggest using prompt-optimizer:
"I notice your request could benefit from more clarity. Let me activate the
prompt-optimizer skill to help structure a more specific request."Option B: Recommend Specific Skill
If request is clear but matches a skill's domain:
"This looks like a UI design implementation task. I'll use the ui-analyzer
skill to systematically analyze the design and generate the code."Option C: Proceed Directly
If request is clear, complete, and doesn't need specialized skills:
"Your request is clear. I'll proceed with [task description]."Option D: Ask for Clarification
If critical information is missing and cannot be assumed:
"To help you effectively, I need to know: [specific questions]"做出以下决策之一:
选项A:推荐优化
若提示词质量较低,明确建议使用prompt-optimizer:
"我注意到你的请求可以更清晰。我将激活prompt-optimizer技能,帮助你构建更具体的请求。"选项B:推荐特定技能
若请求清晰且匹配某技能的适用领域:
"这看起来是一项UI设计实现任务。我将使用ui-analyzer技能系统化分析设计稿并生成代码。"选项C:直接执行
若请求清晰、完整且无需专业技能:
"你的请求清晰明确。我将着手[任务描述]。"选项D:请求澄清
若缺失关键信息且无法假设:
"为了有效协助你,我需要了解:[具体问题]"Analysis Workflow
分析工作流
For Every Request
针对所有请求
- Read the request carefully
- Score on three dimensions (Clarity, Specificity, Completeness)
- Identify task type using the classification system
- Check skill activation criteria from the reference guide
- Make recommendation (optimize, activate skill, proceed, or clarify)
- Take action based on the decision
- 仔细阅读请求
- 从三个维度打分(清晰度、明确性、完整性)
- 使用分类系统识别任务类型
- 查阅参考指南中的技能激活标准
- 给出建议(优化、激活技能、直接执行或请求澄清)
- 根据决策采取行动
Detailed Steps
详细步骤
Step 1: Initial Read
- Understand user intent
- Note any attachments or references
- Consider conversational context
Step 2: Quality Scoring
Clarity Check:
- No vague language ("thing", "something", "stuff")?
- All terms defined?
- Single clear interpretation?
- Action verb present?
Specificity Check:
- Context provided?
- Technical specs mentioned (for code)?
- Scope defined?
- Examples given (if helpful)?
Completeness Check:
- All inputs provided?
- Success criteria stated?
- Constraints mentioned?
- Edge cases considered?
Step 3: Task Classification
Match against patterns in :
references/skill-activation-guide.md- Code Implementation patterns
- Debugging patterns
- Analysis patterns
- Design Implementation patterns
- Refactoring patterns
Step 4: Skill Matching
For each available skill, check if activation criteria are met:
prompt-optimizer:
- Quality score < 70%? → Consider
- Missing critical info? → Consider
- Vague language present? → Consider
- Multiple interpretations? → Consider
ui-analyzer:
- Screenshot/design mentioned? → Activate
- Image provided? → Activate
- "Implement design" request? → Activate
react-component-generator:
- React component requested? → Consider
- After prompt optimization? → Consider
- Clear component spec? → ActivateStep 5: Recommendation
Based on analysis, formulate recommendation:
- Which skill(s) to activate
- Why they're beneficial
- What to expect from them
Step 6: Execution
Either:
- Explicitly note the skill activation (for transparency)
- Seamlessly integrate skill usage
- Ask for user confirmation if uncertain
步骤1:初步阅读
- 理解用户意图
- 注意任何附件或引用内容
- 考虑对话上下文
步骤2:质量打分
清晰度检查:
- 无模糊表述(如“东西”“某物”“内容”)?
- 所有术语均已定义?
- 只有一种清晰解读?
- 包含动作动词?
明确性检查:
- 提供了上下文?
- 提及了技术规格(针对代码请求)?
- 范围已定义?
- 提供了示例(如有帮助)?
完整性检查:
- 所有输入均已提供?
- 说明了成功标准?
- 提及了约束条件?
- 考虑了边缘情况?
步骤3:任务分类
匹配中的模式:
references/skill-activation-guide.md- 代码实现模式
- 调试模式
- 分析模式
- 设计实现模式
- 重构模式
步骤4:技能匹配
针对每个可用技能,检查是否满足激活条件:
prompt-optimizer:
- 质量得分<70%?→ 考虑激活
- 缺失关键信息?→ 考虑激活
- 存在模糊表述?→ 考虑激活
- 存在多种解读?→ 考虑激活
ui-analyzer:
- 提及截图/设计稿?→ 激活
- 提供了图片?→ 激活
- 请求为“实现设计”?→ 激活
react-component-generator:
- 请求创建React组件?→ 考虑激活
- 完成提示词优化后?→ 考虑激活
- 组件规格清晰?→ 激活步骤5:给出建议
根据分析结果制定建议:
- 应激活哪些技能
- 这些技能的益处
- 预期效果
步骤6:执行
选择以下方式之一:
- 明确说明技能激活情况(保证透明度)
- 无缝集成技能使用
- 若不确定,请求用户确认
Output Formats
输出格式
Format 1: Optimization Recommended (Low Quality Prompt)
格式1:推荐优化(提示词质量低)
markdown
undefinedmarkdown
undefinedRequest Analysis
请求分析
I've analyzed your request and noticed it could benefit from more specificity.
Current Request: [User's request]
Observations:
- Missing: [what's missing]
- Unclear: [what's ambiguous]
- Would help: [what would improve it]
Recommendation: Let me use the prompt-optimizer skill to help structure
a clearer, more actionable request.
[Then activate prompt-optimizer]
undefined我已分析你的请求,发现可以进一步明确内容。
当前请求:[用户请求内容]
观察结果:
- 缺失:[缺失内容]
- 模糊:[模糊内容]
- 优化方向:[可改进的方面]
建议:我将使用prompt-optimizer技能,帮助你构建更清晰、更具可操作性的请求。
[随后激活prompt-optimizer]
undefinedFormat 2: Skill Recommended (Good Prompt, Specific Domain)
格式2:推荐技能(提示词质量好,匹配特定领域)
markdown
undefinedmarkdown
undefinedRequest Analysis
请求分析
Your request is clear and matches our ui-analyzer skill's capabilities.
Task Type: Design Implementation
Recommended Approach:
- Use ui-analyzer to examine the screenshot
- Extract design tokens and components
- Generate React code with Tailwind CSS
Proceeding with UI analysis...
[Then activate ui-analyzer]
undefined你的请求清晰明确,符合我们ui-analyzer技能的能力范围。
任务类型:设计实现
推荐方案:
- 使用ui-analyzer分析截图
- 提取设计令牌和组件
- 生成基于Tailwind CSS的React代码
开始UI分析...
[随后激活ui-analyzer]
undefinedFormat 3: Direct Execution (High Quality, No Special Skill Needed)
格式3:直接执行(高质量,无需专业技能)
markdown
undefinedmarkdown
undefinedRequest Analysis
请求分析
Your request is clear and complete. I'll proceed with creating the TypeScript
function with input validation as specified.
[Proceed with implementation]
undefined你的请求清晰完整。我将按照要求创建带输入验证的TypeScript函数。
[开始执行任务]
undefinedFormat 4: Clarification Needed
格式4:需要澄清
markdown
undefinedmarkdown
undefinedRequest Analysis
请求分析
To help you effectively, I need some additional information:
- [Question 1]
- [Question 2]
- [Question 3]
Once I have these details, I can [what you'll do].
undefined为了有效协助你,我需要一些补充信息:
- [问题1]
- [问题2]
- [问题3]
获取这些信息后,我将[后续动作]。
undefinedIntegration with Other Skills
与其他技能的集成
With prompt-optimizer
与prompt-optimizer集成
When to Delegate:
- Quality scores indicate issues
- Request is vague or incomplete
- Multiple interpretations exist
- Critical information missing
How:
- Identify the quality issues
- Explain why optimization would help
- Mention activating prompt-optimizer
- Let prompt-optimizer take over
Example Flow:
User: "Make a form"
↓
request-analyzer: Detects low specificity
↓
request-analyzer: "This request needs more details. Activating prompt-optimizer..."
↓
prompt-optimizer: Analyzes and provides optimized version
↓
User: Confirms optimized version
↓
react-component-generator: Creates the well-specified form何时委托:
- 质量得分显示存在问题
- 请求模糊或不完整
- 存在多种解读
- 缺失关键信息
集成方式:
- 识别质量问题
- 说明优化的益处
- 提及将激活prompt-optimizer
- 交由prompt-optimizer处理
示例流程:
用户:“做一个表单”
↓
request-analyzer:检测到明确性不足
↓
request-analyzer:“该请求需要更多细节。正在激活prompt-optimizer...”
↓
prompt-optimizer:分析并生成优化后的请求版本
↓
用户:确认优化后的版本
↓
react-component-generator:创建规格明确的表单With ui-analyzer
与ui-analyzer集成
When to Delegate:
- Screenshot or design mentioned
- Image file provided
- Design implementation requested
How:
- Confirm it's a design implementation task
- Verify image is available or referenced
- Explain ui-analyzer will handle it
- Let ui-analyzer take over
Example Flow:
User: "Build this UI [screenshot attached]"
↓
request-analyzer: Detects design implementation task
↓
request-analyzer: "I'll use ui-analyzer to examine your design..."
↓
ui-analyzer: Analyzes screenshot and generates code何时委托:
- 提及截图或设计稿
- 提供了图片文件
- 请求为设计实现
集成方式:
- 确认任务为设计实现
- 验证图片是否可用或已引用
- 说明ui-analyzer将处理该任务
- 交由ui-analyzer处理
示例流程:
用户:“实现这个UI [附截图]”
↓
request-analyzer:检测到设计实现任务
↓
request-analyzer:“我将使用ui-analyzer分析你的设计稿...”
↓
ui-analyzer:分析截图并生成代码With react-component-generator
与react-component-generator集成
When to Delegate:
- React component requested
- Specifications are clear
- No design screenshot (verbal description)
How:
- Confirm component requirements are clear
- If not clear, use prompt-optimizer first
- Once clear, mention using react-component-generator
- Let it handle component creation
Example Flow:
User: "Create a React login form with email/password, validation, TypeScript"
↓
request-analyzer: Detects high-quality component request
↓
request-analyzer: "Clear component spec. Using react-component-generator..."
↓
react-component-generator: Creates the component何时委托:
- 请求创建React组件
- 规格清晰明确
- 无设计截图(仅文字描述)
集成方式:
- 确认组件需求清晰
- 若需求不清晰,先使用prompt-optimizer
- 需求清晰后,提及将使用react-component-generator
- 交由其处理组件创建
示例流程:
用户:“创建一个带邮箱/密码、验证功能的React登录表单,使用TypeScript”
↓
request-analyzer:检测到高质量组件请求
↓
request-analyzer:“组件规格清晰。正在使用react-component-generator...”
↓
react-component-generator:创建该组件Decision Matrix
决策矩阵
| Prompt Quality | Has Screenshot | Task Type | Action |
|---|---|---|---|
| Low (<70%) | No | Any | → prompt-optimizer |
| Low (<70%) | Yes | Design | → prompt-optimizer first, then ui-analyzer |
| High (>80%) | Yes | Design | → ui-analyzer |
| High (>80%) | No | Component | → react-component-generator |
| High (>80%) | No | General Code | → Proceed directly |
| Medium (70-80%) | No | Any | → Ask clarifying questions OR proceed |
| 提示词质量 | 是否有截图 | 任务类型 | 动作 |
|---|---|---|---|
| 低(<70%) | 否 | 任意 | → prompt-optimizer |
| 低(<70%) | 是 | 设计 | → 先激活prompt-optimizer,再激活ui-analyzer |
| 高(>80%) | 是 | 设计 | → ui-analyzer |
| 高(>80%) | 否 | 组件开发 | → react-component-generator |
| 高(>80%) | 否 | 通用代码 | → 直接执行 |
| 中(70-80%) | 否 | 任意 | → 请求澄清或直接执行 |
Special Considerations
特殊注意事项
Conversational Context
对话上下文
If this is a follow-up in an ongoing conversation:
- Previous messages may provide missing context
- Don't over-analyze brief follow-ups
- "Now add validation" is fine after "Create a form"
- Consider the full conversation history
若为正在进行的对话中的后续请求:
- 之前的消息可能提供了缺失的上下文
- 无需过度分析简短的后续请求
- 如“现在添加验证”在“创建一个表单”之后是合理的
- 需考虑完整对话历史
User Experience
用户体验
Balance thoroughness with efficiency:
- Don't over-process simple, clear requests
- Avoid creating friction for experienced users
- Be helpful but not pedantic
- Transparent about why skills are beneficial
在全面性和效率之间取得平衡:
- 不要过度处理简单清晰的请求
- 避免给有经验的用户造成阻碍
- 提供帮助但不要过于繁琐
- 透明说明使用技能的益处
Confidence Levels
置信度等级
High Confidence (>90%) - Act decisively:
- Prompt clearly matches skill domain
- Quality issues are obvious
- Recommendation is unambiguous
Medium Confidence (60-90%) - Suggest and explain:
- Partial match to skill domain
- Some quality concerns
- Explain the benefit of using a skill
Low Confidence (<60%) - Ask or proceed cautiously:
- Unclear match
- No obvious quality issues
- Might not need special skills
高置信度(>90%) - 果断行动:
- 提示词明确匹配技能领域
- 质量问题明显
- 建议明确无歧义
中置信度(60-90%) - 给出建议并说明理由:
- 与技能领域部分匹配
- 存在一些质量问题
- 说明使用技能的益处
低置信度(<60%) - 谨慎询问或执行:
- 匹配关系不明确
- 无明显质量问题
- 可能无需特殊技能
Reference Usage
参考资料使用
Consult for:
references/skill-activation-guide.md- Available Skills - Full list with activation criteria
- Request Type Classification - Detailed patterns
- Decision Tree - Visual workflow guide
- Multi-Skill Scenarios - Complex activation patterns
- Activation Confidence Levels - When to activate
- Common Patterns - Recognize typical requests
- Edge Cases - Handle special situations
查阅获取:
references/skill-activation-guide.md- 可用技能 - 完整技能列表及激活标准
- 请求类型分类 - 详细模式说明
- 决策树 - 可视化工作流指南
- 多技能场景 - 复杂激活模式
- 激活置信度等级 - 激活时机说明
- 常见模式 - 识别典型请求
- 边缘情况 - 特殊场景处理
Examples
示例
Example 1: Vague Request
示例1:模糊请求
User: "Fix my code"
Analysis:
- Clarity: 20% (what code? what's wrong?)
- Specificity: 10% (no file, no error, no context)
- Completeness: 15% (no reproduction steps, no expected behavior)
- Overall: 15% → Very Low
Decision: Activate prompt-optimizer
Output:
"I notice your request needs more details to be actionable. Let me help
structure it using the prompt-optimizer skill.
Missing information:
- Which file or code section?
- What's the current behavior?
- What error messages appear?
- What should happen instead?
[Activating prompt-optimizer...]"用户:“修复我的代码”
分析:
- 清晰度:20%(哪段代码?问题是什么?)
- 明确性:10%(无文件、无错误信息、无上下文)
- 完整性:15%(无复现步骤、无预期行为)
- 整体:15% → 极低
决策:激活prompt-optimizer
输出:
“我注意到你的请求需要更多细节才能执行。我将使用prompt-optimizer技能帮你梳理。
缺失信息:
- 涉及哪个文件或代码段?
- 当前行为是什么?
- 出现了哪些错误信息?
- 预期行为是什么?
[正在激活prompt-optimizer...]"Example 2: UI Design Request
示例2:UI设计请求
User: "Implement this login page design [screenshot]"
Analysis:
- Clarity: 85% (clear intent)
- Specificity: 80% (has design, mentions login page)
- Completeness: 75% (might need tech stack clarification)
- Task Type: Design Implementation
- Has Screenshot: Yes
Decision: Activate ui-analyzer (might clarify tech stack within workflow)
Output:
"I'll analyze your login page design and generate the React components.
Using the ui-analyzer skill to:
1. Examine the layout and components
2. Extract design tokens (colors, spacing, typography)
3. Generate React + TypeScript + Tailwind code
[Activating ui-analyzer...]"用户:“实现这个登录页设计 [附截图]”
分析:
- 清晰度:85%(意图明确)
- 明确性:80%(有设计稿,提及登录页)
- 完整性:75%(可能需要明确技术栈)
- 任务类型:设计实现
- 是否有截图:是
决策:激活ui-analyzer(可在工作流中明确技术栈)
输出:
“我将分析你的登录页设计并生成React组件。
使用ui-analyzer技能完成以下操作:
1. 分析布局和组件
2. 提取设计令牌(颜色、间距、排版)
3. 生成React + TypeScript + Tailwind代码
[正在激活ui-analyzer...]"Example 3: Clear Component Request
示例3:清晰的组件请求
User: "Create a React Button component with TypeScript, supporting primary/
secondary/danger variants, sm/md/lg sizes, and Tailwind CSS styling"
Analysis:
- Clarity: 95% (very clear)
- Specificity: 95% (all tech specs present)
- Completeness: 90% (comprehensive requirements)
- Task Type: Code Implementation (React component)
- Overall: 93% → Excellent
Decision: Activate react-component-generator directly
Output:
"Excellent! Your component requirements are clear and complete. I'll use the
react-component-generator skill to create this button component.
[Activating react-component-generator...]"用户:“创建一个React Button组件,使用TypeScript,支持primary/secondary/danger三种变体、sm/md/lg三种尺寸,采用Tailwind CSS样式”
分析:
- 清晰度:95%(非常清晰)
- 明确性:95%(所有技术规格齐全)
- 完整性:90%(需求全面)
- 任务类型:代码实现(React组件)
- 整体:93% → 优秀
决策:直接激活react-component-generator
输出:
“很棒!你的组件需求清晰完整。我将使用react-component-generator技能创建该按钮组件。
[正在激活react-component-generator...]"Example 4: General Question
示例4:通用问题
User: "What's the difference between useState and useReducer in React?"
Analysis:
- Clarity: 100% (perfectly clear)
- Task Type: Explanation/Learning
- No coding task
- No design implementation
Decision: Proceed directly (no special skill needed)
Output:
"Great question! Let me explain the differences between useState and useReducer..."
[Provide explanation directly - no skill activation needed]用户:“React中的useState和useReducer有什么区别?”
分析:
- 清晰度:100%(完全清晰)
- 任务类型:讲解/学习
- 无编码任务
- 无设计实现需求
决策:直接执行(无需特殊技能)
输出:
“好问题!让我为你解释useState和useReducer的区别..."
[直接提供讲解 - 无需激活技能]Best Practices
最佳实践
- Be proactive but not intrusive - Help without creating friction
- Explain the value - Tell users why a skill will help
- Stay transparent - Mention which skills you're using and why
- Respect user time - Don't over-analyze trivial requests
- Learn from context - Consider conversation history
- Balance automation with judgment - Skills are tools, not rules
- Prioritize user success - The goal is better outcomes, not perfect process
- 主动但不干扰 - 提供帮助但不造成阻碍
- 说明价值 - 告诉用户技能能带来什么帮助
- 保持透明 - 说明使用的技能及原因
- 尊重用户时间 - 不要过度分析琐碎请求
- 结合上下文 - 考虑对话历史
- 平衡自动化与判断 - 技能是工具而非规则
- 以用户成功为优先 - 目标是更好的结果而非完美的流程
Important Notes
重要提示
- This skill is a coordinator, not a blocker
- High-quality prompts should flow smoothly without intervention
- Skills should enhance, not hinder, the user experience
- When in doubt, ask the user rather than making assumptions
- Transparency builds trust - explain your reasoning
- The ultimate goal is helping users succeed with their tasks
- 该技能是协调器而非阻碍器
- 高质量提示词应能顺畅流转,无需干预
- 技能应增强而非阻碍用户体验
- 如有疑问,应询问用户而非自行假设
- 透明化能建立信任 - 说明你的推理过程
- 最终目标是帮助用户完成任务