analysis-only-mode

📁 rookiefishs/analysis-only-mode-skills 📅 11 days ago
1
总安装量
1
周安装量
#48149
全站排名
安装命令
npx skills add https://github.com/rookiefishs/analysis-only-mode-skills --skill analysis-only-mode

Agent 安装分布

mcpjam 1
command-code 1
junie 1
crush 1
pi 1

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:

  1. Rephrase the user’s question

    • Restate user requirements in your own words
    • Clarify the core objective of the problem
    • List key requirement points
  2. 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:

  1. 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
  2. Read code context

    • Use readFile or readMultipleFiles tools
    • Understand existing implementation logic
    • Identify related dependencies and call relationships
  3. 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:

  1. Identify potential issues

    • Logic errors or edge cases
    • Performance bottlenecks
    • State management issues
    • API call issues
    • User experience issues
  2. Analyze root causes

    • Don’t just look at surface symptoms
    • Trace back to the source of the problem
    • Consider multiple possibilities
  3. 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:

  1. Solution overview

    • Describe the solution approach in natural language
    • Explain which files need to be modified
    • Explain why to do it this way
  2. Implementation steps

    • List clear steps
    • Explain the purpose of each step
    • Mark key considerations
  3. 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:

  1. Uncertain technical details

    • “Which caching strategy would you prefer?”
    • “Does this feature need to support offline mode?”
  2. Multiple feasible solutions

    • “I have two implementation approaches, which one do you prefer?”
    • List solution comparisons and let user choose
  3. Potential impacts

    • “This modification may affect the XX function, is this acceptable?”
    • “Do we need to migrate existing data?”
  4. 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.