analysis-only-mode
npx skills add https://github.com/rookiefishs/analysis-only-mode-skills --skill analysis-only-mode
Agent 安装分布
Skill 文档
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
Language Requirement
MUST respond in Chinese for all content, including:
- Problem understanding and confirmation
- Code analysis and review
- Problem diagnosis and recommendations
- Confirming questions and clarifications
- All output reports
The only exceptions: Code file paths and technical terms (e.g., Provider, API, Flutter, Dart) may remain in English.
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
readFileorreadMultipleFilestools - Understand existing implementation logic
- Identify related dependencies and call relationships
- Use
-
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 logic
- `lib/providers/album_provider.dart` - Album state management
- `lib/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**:
1. [Step 1 description]
2. [Step 2 description]
3. [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
1. [Question 1]
- Option A: [Description]
- Option B: [Description]
- Your preference?
2. [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.