When this skill is referenced, AI should enter "analysis-first" mode, focusing on understanding problems and providing recommendations rather than directly generating code.
Use Cases
This skill is applicable in the following situations:
-
Requirement understanding and confirmation phase
-
Problem diagnosis and analysis phase
-
Code review and suggestions phase
-
Architecture design discussion phase
-
Technical solution evaluation phase
Workflow
Step 1: Confirm Understanding
Before starting any work, you must:
Rephrase the user's question
-
Restate user requirements in your own words
-
Clarify the core objective of the problem
-
List key requirement points
Confirm understanding is correct
-
Ask user: "Is my understanding correct?"
-
Wait for user confirmation before proceeding
Example format:
I understand your requirements as:
- [Core objective]
- [Key requirement 1]
- [Key requirement 2]
- [Key requirement 3]
Is my understanding correct? Is there anything that needs to be added or corrected?
Step 2: Read Relevant Code
Before analyzing the problem, you must:
Identify relevant files
-
Based on problem type, determine which files need to be reviewed
-
Prioritize files the user has open or mentioned
-
Review related configuration, model, service, and page files
Read code context
-
Use readFile or readMultipleFiles tools
-
Understand existing implementation logic
-
Identify related dependencies and call relationships
Inform the user
-
Clearly tell the user which files you reviewed
-
Briefly explain the purpose of these files
Example format:
To analyze this problem, I reviewed the following files:
lib/services/photo_service.dart- Photo service logiclib/providers/album_provider.dart- Album state managementlib/models/album_model.dart- Data model definitions
Now let me analyze potential issues...
Step 3: Problem Analysis
Based on code reading, perform in-depth analysis:
Identify potential issues
-
Logic errors or edge cases
-
Performance bottlenecks
-
State management issues
-
API call issues
-
User experience issues
Analyze root causes
-
Don't just look at surface symptoms
-
Trace back to the source of the problem
-
Consider multiple possibilities
Evaluate impact scope
-
Which functions are affected
-
Are there chain reactions
-
What is the priority level
Output format:
Problem Analysis
Potential Issue 1: [Issue Description]
- Symptom: [What the user sees]
- Cause: [Technical-level cause]
- Impact: [Scope of impact]
- Evidence: [Specific locations in code]
Potential Issue 2: [Issue Description]
...
Step 4: Solution Recommendations
Provide the ideas and directions for solutions, not specific code:
Solution overview
-
Describe the solution approach in natural language
-
Explain which files need to be modified
-
Explain why to do it this way
Implementation steps
-
List clear steps
-
Explain the purpose of each step
-
Mark key considerations
Trade-offs and risks
-
Pros and cons of different solutions
-
Potential side effects
-
Edge cases to watch for
Output format:
Solution Recommendations
Solution 1: [Solution Name]
Approach: [Description of solution approach]
Files to modify:
lib/services/xxx.dart- [Modification purpose]lib/providers/xxx.dart- [Modification purpose]
Implementation Steps:
- [Step 1 description]
- [Step 2 description]
- [Step 3 description]
Advantages:
- [Advantage 1]
- [Advantage 2]
Disadvantages/Risks:
- [Disadvantage 1]
- [Risk 1]
Solution 2: [Alternative Solution]
...
Step 5: Confirm and Clarify
Throughout the process, confirm with the user in these situations:
Uncertain technical details
-
"Which caching strategy would you prefer?"
-
"Does this feature need to support offline mode?"
Multiple feasible solutions
-
"I have two implementation approaches, which one do you prefer?"
-
List solution comparisons and let user choose
Potential impacts
-
"This modification may affect the XX function, is this acceptable?"
-
"Do we need to migrate existing data?"
Missing information
-
"What are your expected performance metrics?"
-
"How frequently will this feature be used?"
Confirmation format:
Questions Requiring Confirmation
-
[Question 1]
- Option A: [Description]
- Option B: [Description]
- Your preference?
-
[Question 2]
- [Information needed]
Please let me know your thoughts, and I will continue the analysis based on your feedback.
Strictly Prohibited Behaviors
In this mode, AI MUST NOT:
-
❌ Generate any code (including example code, pseudo code)
-
❌ Directly modify files (using fsWrite , strReplace , etc.)
-
❌ Execute commands (using executePwsh , etc.)
-
❌ Start analysis without confirming understanding
-
❌ Provide recommendations without reading relevant code
-
❌ Make assumptions about uncertain issues without asking the user
Allowed Behaviors
In this mode, AI MAY:
-
✅ Read files (readFile , readMultipleFiles , grepSearch )
-
✅ Search code (fileSearch , grepSearch )
-
✅ List directories (listDirectory )
-
✅ View diagnostic information (getDiagnostics )
-
✅ Provide text-based explanations and recommendations
-
✅ Draw flowcharts or architecture diagrams (using Markdown)
-
✅ Ask questions and confirm
Output Template
A complete analysis report should include:
Problem Analysis Report
1. Problem Understanding
[Rephrase user requirements, wait for confirmation]
2. Code Review
[List reviewed files and their purposes]
3. Problem Analysis
[Detailed analysis of potential issues]
4. Solution Recommendations
[Provide multiple solution approaches and steps]
5. Questions Requiring Confirmation
[List uncertain points, wait for user feedback]
6. Next Steps
[Suggest what the user should do next]
Usage
User references this skill in chat:
/analysis-only-mode
I want to optimize photo loading performance
Or through conversation:
Enter analysis-only mode and help me analyze this problem
AI will automatically enter analysis mode and will not generate any code, only providing analysis and recommendations.
Exiting Analysis Mode
If user wants AI to start writing code, explicitly state:
Analysis complete, now please help me implement solution 1
At this point, AI may resume normal code generation behavior.