大数跨境
0
0

【И°Tools】技巧!Claude Code 扩展思考模式详解

【И°Tools】技巧!Claude Code 扩展思考模式详解 NA AI Studio
2025-08-23
1
导读:什么是Claude Code扩展思考模式(Extended Thinking Mode)扩展思考模式(Ext

 

什么是Claude Code扩展思考模式(Extended Thinking Mode)

扩展思考模式(Extended Thinking Mode)是 Claude的一个特殊功能,让模型在回答问题之前进行更深入、更系统的思考和推理。这对于复杂的分析任务特别有用。

如何在自定义 Slash Commands 中使用

1. 基本触发方式

通过在命令提示中包含扩展思考关键词来触发:

---
  description: Complex analysis requiring deep thinking
---

  Think carefully about this complex problem step by step.

  Analyze the following architecture decision thoroughly:
  - Consider all trade-offs
  - Evaluate long-term implications
  - Think through edge cases
  - Provide detailed reasoning

  [Your specific task here]

2. 关键词触发模式

以下是一些能触发扩展思考的关键词:

分析类关键词

"Think carefully"
"Analyze thoroughly"
"Consider deeply"
"Think step by step"
"Reason through this"

计划类关键词

  "Plan this carefully"
  "Think through the approach"
  "Consider all options"
  "Evaluate alternatives"

问题解决类关键词

"Solve this systematically"
"Break down the problem"
"Think through edge cases"
"Consider implications"

3. 实际应用示例

架构决策分析命令

---
  description: Deep architectural analysis and decision making
  argument-hint: [component-name] [decision-type]
---

  Think carefully through this architectural decision step by step.

  You are a senior software architect. When analyzing architectural decisions:

  1. **Current State Analysis**
     - Examine existing system constraints
     - Identify performance bottlenecks
     - Review scalability requirements

  2. **Option Evaluation**
     - Consider multiple approaches
     - Analyze trade-offs for each option
     - Think through long-term maintenance implications

  3. **Decision Framework**
     - Apply architectural principles
     - Consider team capabilities
     - Evaluate cost and complexity

  4. **Implementation Planning**
     - Break down into phases
     - Identify risks and mitigation strategies
     - Plan testing and validation approach

  Provide a comprehensive analysis with clear reasoning for your recommendations.

性能优化分析命令

---
  description: Systematic performance analysis and optimization
  allowed-tools: Bash(npm:*), Read, Grep
---

  Think through this performance problem systematically and carefully.

  You are a performance optimization expert. Approach this methodically:

  1. **Profiling and Measurement**
     - Identify bottlenecks through careful analysis
     - Consider both client and server performance
     - Think about memory usage patterns

  2. **Root Cause Analysis**
     - Examine code paths step by step
     - Consider database query patterns
     - Analyze network and I/O operations

  3. **Optimization Strategy**
     - Evaluate multiple optimization approaches
     - Consider trade-offs between performance and maintainability
     - Think through caching strategies

  4. **Validation Planning**
     - Design performance tests
     - Plan before/after measurements
     - Consider regression testing

  Take time to think through each aspect thoroughly before providing recommendations.

4. 扩展思考的好处

更深入的分析

---
  description: Complex debugging with systematic analysis
---

  Think carefully through this debugging challenge step by step.

  Instead of jumping to conclusions, systematically analyze:
  - Symptoms and error patterns
  - Potential root causes (consider multiple possibilities)
  - Testing strategies to isolate the issue
  - Step-by-step debugging approach
  - Prevention strategies for the future

  Take your time to consider all angles before suggesting solutions.

更好的推理过程

---
  description: Strategic technical decision making
---

  Reason through this technical decision carefully and thoroughly.

  Consider the full context:
  - Business requirements and constraints
  - Technical debt implications
  - Team skill sets and capacity
  - Long-term maintenance burden
  - Integration with existing systems
  - Risk assessment and mitigation

  Think through each factor systematically before making recommendations.

5. 何时使用扩展思考模式

✅ 适合使用的场景

  1. 1. 复杂的架构决策
  2. 2. 性能优化分析
  3. 3. 安全风险评估
  4. 4. 技术债务重构规划
  5. 5. 系统故障根因分析
  6. 6. 跨团队技术策略制定

❌ 不适合的场景

  1. 1. 简单的CRUD操作
  2. 2. 标准的代码格式化
  3. 3. 基本的测试运行
  4. 4. 日常的构建部署

6. 高级用法示例

多层次思考命令

---
  description: Multi-layered analysis with systematic thinking
---

  Think through this problem at multiple levels, carefully considering each layer:

  **Layer 1: Immediate Problem**
  - What is the surface-level issue?
  - What are the obvious symptoms?

  **Layer 2: System Context**
  - How does this fit into the larger system?
  - What are the interconnections and dependencies?

  **Layer 3: Strategic Implications**
  - What are the long-term consequences?
  - How does this align with business goals?

  **Layer 4: Implementation Reality**
  - What are the practical constraints?
  - How do we balance idealism with pragmatism?

  Work through each layer systematically before synthesizing your recommendations.

风险评估命令

---
  description: Comprehensive risk analysis and mitigation planning
---

  Think carefully through all potential risks and their implications.

  Risk Assessment Framework:
  1. **Identify Risks**: Consider technical, operational, and business risks
  2. **Probability Assessment**: Think through likelihood of each risk
  3. **Impact Analysis**: Evaluate potential consequences systematically
  4. **Mitigation Strategies**: Develop multiple contingency approaches
  5. **Monitoring Plan**: Design early warning indicators

  Take time to consider both obvious and subtle risks before finalizing your analysis.

关键要点

1. 明确触发: 使用明确的扩展思考关键词
2. 系统化提示: 提供结构化的思考框架
3. 多角度分析: 引导模型从多个维度考虑问题
4. 深度优先: 鼓励深入分析而非快速回答
5. 验证推理: 要求模型验证其推理过程

扩展思考模式让 Claude 能够处理更复杂的技术决策和分析任务,提供更深入、更全面的见解。

EOF

#claude code

 

【声明】内容源于网络
0
0
NA AI Studio
我们是您的人工智能前沿观察站。在这里,我们致力于分享最新、最深度的AI技术解读、产业洞见与应用实例。无论您是技术开发者、产品经理,还是对AI充满好奇的探索者,NA AI Studio都将为您提供最有价值的参考。
内容 113
粉丝 0
NA AI Studio 我们是您的人工智能前沿观察站。在这里,我们致力于分享最新、最深度的AI技术解读、产业洞见与应用实例。无论您是技术开发者、产品经理,还是对AI充满好奇的探索者,NA AI Studio都将为您提供最有价值的参考。
总阅读45
粉丝0
内容113