Token导航 LogoToken导航

Agent Skill · 研究检索

chain-of-thought(思想链)

chain-of-thought 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

chain-of-thought 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 55,945。

总安装 466周安装 20GitHub Stars 公开资料未说明下载 163核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:chain-of-thought(思想链)
来源仓库:https://github.com/wesley1600/claudecodeframework
仓库路径:skills/chain-of-thought
安装命令:
npx skills add https://github.com/wesley1600/claudecodeframework --skill chain-of-thought
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wesley1600/claudecodeframework --skill chain-of-thought

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

增强 AI 推理透明度与可靠性,支持逐步分析与错误调试。适用于复杂问题拆解、计划更新与自适应学习场景。chain-of-thought 属于研究检索类 Skill,可作为该场景下的辅助能力补充。通过 github 安装并使用 npx skills add 命令集成。需确认宿主平台兼容性,注意部分环境可能存在依赖冲突。

建议结合来源仓库和 README 了解触发条件与输出格式规范。

来源仓库内路径:skills/chain-of-thought

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wesley1600/claudecodeframework --skill chain-o…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

chain-of-thought 怎么安装?

在终端执行 npx skills add https://github.com/wesley1600/claudecodeframework --skill chain-of-thought。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

chain-of-thought 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

chain-of-thought 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

chain-of-thought 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

chain-of-thought 用的人多吗?

公开数据是累计安装 466 次,近一周安装 20 次,下载 163 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

chain-of-thought 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
chain-of-thought

思想链 · 本页

466—需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Chain of Thought Reasoning

Purpose

This skill enables structured, transparent reasoning by injecting chain of thought (CoT) blocks into prompts. It encourages the model to think step-by-step, explicitly show reasoning processes, and separate thinking from final outputs.

Chain of thought reasoning improves:

  • Problem-solving accuracy - Breaking down complex problems into manageable steps
  • Transparency - Making reasoning visible and auditable
  • Self-correction - Allowing the model to catch and fix errors during reasoning
  • Planning - Enabling reflection and iterative plan refinement
  • Debugging - Understanding how conclusions were reached

When to Use

Activate this skill for tasks that benefit from explicit reasoning:

  • Complex problem-solving - Multi-step mathematical, logical, or analytical problems
  • Code analysis - Understanding unfamiliar codebases, debugging, or architecture decisions
  • Planning and design - Breaking down features, designing systems, or creating implementation plans
  • Research tasks - Synthesizing information from multiple sources
  • Decision-making - Evaluating trade-offs between multiple approaches
  • Error diagnosis - Investigating bugs or unexpected behavior
  • Refactoring - Reasoning about code improvements and their implications
  • Any task where "showing your work" leads to better outcomes

How It Works

Chain of thought uses XML tags to demarcate reasoning and output sections:

Primary Structure

<thinking>
Step 1: [Analyze the problem]
- What are we trying to accomplish?
- What information do we have?
- What's missing?

Step 2: [Break down the approach]
- What are the main steps?
- What are potential challenges?

Step 3: [Evaluate options]
- Option A: pros and cons
- Option B: pros and cons
- Decision: [chosen approach and why]

Step 4: [Verify reasoning]
- Does this make sense?
- Are there edge cases?
- What could go wrong?
</thinking>

<answer>
[Clear, concise final output based on the reasoning above]
</answer>

Advanced Structure for Multi-Agent Systems

Inspired by the Manus AI multi-agent system, use nested thinking for complex workflows:

<thinking>
## Initial Analysis
[First pass understanding]

## Plan Formation
Current plan:
1. [Step 1]
2. [Step 2]
3. [Step 3]

## Reflection
Is this plan optimal?
- Consideration 1: [reflection]
- Consideration 2: [reflection]

## Plan Update
Revised plan:
1. [Updated step 1]
2. [Updated step 2]
3. [New step 3]

Rationale for changes: [explanation]

## Execution Strategy
How to implement step 1:
- [Details]
- [Considerations]
</thinking>

<answer>
[Final output incorporating refined thinking]
</answer>

Prompt Injection Patterns

Pattern 1: Problem-Solving Template

<thinking>
1. Problem understanding:
   - Given: [what we know]
   - Goal: [what we need to find/do]
   - Constraints: [limitations]

2. Approach:
   - Strategy: [chosen method]
   - Why: [rationale]

3. Step-by-step execution:
   - [Step 1 with reasoning]
   - [Step 2 with reasoning]
   - [Step 3 with reasoning]

4. Verification:
   - Does the solution meet requirements?
   - Are there edge cases?
</thinking>

<answer>
[Solution]
</answer>

Pattern 2: Code Analysis Template

<thinking>
1. Code structure overview:
   - Main components: [list]
   - Data flow: [description]

2. Key observations:
   - Pattern 1: [what and why]
   - Pattern 2: [what and why]

3. Analysis:
   - [Detailed reasoning about the code]

4. Conclusion:
   - [Synthesis of findings]
</thinking>

<answer>
[Clear explanation or recommendation]
</answer>

Pattern 3: Planning Template

<thinking>
1. Requirements analysis:
   - Must have: [core requirements]
   - Nice to have: [optional features]

2. Initial plan:
   [List of steps]

3. Risk assessment:
   - Risk 1: [description and mitigation]
   - Risk 2: [description and mitigation]

4. Plan refinement:
   [Updated plan based on risks]

5. Validation:
   - Does this plan address all requirements?
   - Is it feasible?
   - What assumptions are we making?
</thinking>

<answer>
[Final plan with clear action items]
</answer>

Guidelines

1. Structure Your Thinking

  • Start with understanding - State what you know and what you need to find out
  • Break down complex tasks - Divide into smaller, manageable pieces
  • Show your work - Write out intermediate steps, not just conclusions
  • Be explicit - State assumptions, trade-offs, and reasoning clearly

2. Use Reflection

  • Question your approach - "Is this the best way?"
  • Check your logic - "Does this reasoning hold up?"
  • Consider alternatives - "What other approaches exist?"
  • Update your plan - Don't be afraid to revise based on new insights

3. Separate Thinking from Output

  • Thinking block - For exploration, reasoning, and working through problems
  • Answer block - For the polished, final response
  • Keep thinking raw - Don't over-polish; show genuine reasoning
  • Keep answers concise - User sees the answer; thinking is internal

4. When to Use Each Block

Use <thinking> for:

  • Analyzing requirements
  • Breaking down problems
  • Evaluating options
  • Working through logic
  • Planning implementation
  • Reflecting on decisions
  • Catching errors
  • Exploring trade-offs

Use <answer> for:

  • Final recommendations
  • Implemented solutions
  • Clear explanations
  • Action items
  • Conclusions

5. Best Practices

  • Be honest in thinking - If uncertain, say so
  • Show error correction - If you notice a mistake, correct it in the thinking block
  • Use markdown - Format thinking blocks for readability
  • Number your steps - Makes reasoning easier to follow
  • Summarize in answer - Don't make users read all thinking to get the point

Examples

Example 1: Debugging a Problem

Prompt: "This function is returning incorrect results for negative numbers. Can you fix it?"

<thinking>
1. Understanding the problem:
   - Function works for positive numbers
   - Fails for negative numbers
   - Need to identify why negatives cause issues

2. Code analysis:
   - [Read through the function]
   - Line 15: Uses Math.abs() - converts negative to positive
   - Line 20: Returns result without sign restoration
   - Aha! The absolute value removes the sign, but we never restore it

3. Solution approach:
   - Option A: Track sign separately and reapply
   - Option B: Handle negative numbers differently
   - Choosing A: cleaner and preserves existing logic

4. Implementation plan:
   - Store original sign
   - Apply absolute value for calculation
   - Multiply result by original sign
</thinking>

<answer>
The bug is on lines 15-20. The function uses `Math.abs()` but never restores the original sign. Here's the fix:

const sign = num < 0 ? -1 : 1; const absNum = Math.abs(num); // ... existing calculation ... return result * sign;


### Example 2: Choosing Between Architectures

**Prompt:** "Should we use microservices or a monolith for this project?"

<thinking>

  1. Context gathering:

- Team size: small (3 developers) - Project scope: MVP with planned growth - Timeline: 3 months to launch - Infrastructure: cloud-based

  1. Microservices analysis:

Pros: - Scalability per service - Independent deployment - Technology flexibility

Cons: - Operational complexity (DevOps overhead) - Network latency - Distributed debugging challenges - Over-engineering for small team

  1. Monolith analysis:

Pros: - Simpler deployment - Easier debugging - Faster initial development - Single codebase

Cons: - Scaling requires scaling entire app - Potential coupling issues - May need to break apart later

  1. Decision reasoning:

- Small team → simpler is better - MVP timeline → need speed - Planned growth → can refactor later - Monolith-first approach is lower risk

  1. Recommendation:

Start with modular monolith, design for eventual extraction </thinking>

<answer> For your project, I recommend starting with a modular monolith:

Why:

  • Your small team will move faster without microservices overhead
  • 3-month MVP timeline needs simplicity
  • You can refactor to microservices later if needed

Key principle: Design modules with clear boundaries (separate folders, interfaces) so future extraction is easier.

Action items:

  1. Structure code in domain modules (auth, payments, users)
  2. Use dependency injection for loose coupling
  3. Plan data models to avoid cross-module dependencies

</answer>


### Example 3: Multi-Step Implementation Planning

**Prompt:** "Add user authentication with OAuth to our app"

<thinking>

Initial Analysis

Requirements:

  • OAuth integration (which providers? assuming Google/GitHub)
  • User session management
  • Protected routes
  • Existing app: appears to be Express.js based

Plan Formation v1

  1. Choose OAuth library
  2. Set up OAuth credentials
  3. Implement login/logout routes
  4. Add session middleware
  5. Protect existing routes

Reflection

Issues with v1:

  • Didn't consider token storage
  • No user database integration mentioned
  • Missing error handling strategy
  • Should address CSRF protection

Plan Formation v2

  1. Research codebase for existing auth patterns
  2. Choose OAuth library (passport.js likely best for Express)
  3. Set up database schema for users
  4. Configure OAuth providers (Google, GitHub)
  5. Implement authentication routes
  6. Add session management with secure tokens
  7. Create auth middleware for protected routes
  8. Add CSRF protection
  9. Implement logout and session cleanup
  10. Add error handling for auth failures

Execution Strategy for Step 1

Need to:

  • Check if passport.js already installed
  • Look for existing user models
  • Identify protected routes
  • Check current session handling

</thinking>

<answer> I'll implement OAuth authentication. Let me start by researching your current codebase to understand existing patterns, then proceed with the implementation plan:

  1. Audit current auth patterns
  2. Set up passport.js with OAuth strategies
  3. Create user database schema
  4. Implement login/logout flows
  5. Add session management
  6. Protect routes with auth middleware
  7. Add security measures (CSRF, secure tokens)

Starting with codebase research... </answer>


## Integration with Multi-Agent Systems

In multi-agent architectures like Manus AI, chain of thought enables:

- **Agent reflection** - Agents explicitly reason about their actions before executing
- **Plan updating** - Agents revise strategies based on intermediate results
- **Inter-agent communication** - Thinking blocks provide transparency for coordination
- **Error recovery** - Agents can detect issues during reasoning and adapt

Agents can maintain persistent thinking across multiple turns:

<thinking>

Turn 1 Reflection

Previous attempt: [what was tried] Result: [what happened] Learning: [what we discovered]

Updated Strategy

Based on the failure, trying new approach: [revised plan] </thinking>

<answer> [Action based on updated thinking] </answer>


## References

For detailed examples and advanced patterns, see:

- [REFERENCE.md](https://github.com/wesley1600/claudecodeframework/blob/HEAD/.claude/skills/chain-of-thought/references/REFERENCE.md) - Extended examples and patterns
- [XML Guide Conventions](https://github.com/wesley1600/claudecodeframework/blob/HEAD/.claude/skills/chain-of-thought/references/XML-GUIDE.md) - Proper XML tag usage

## Summary

Chain of thought reasoning makes AI behavior more:

- **Transparent** - You can see how conclusions were reached
- **Reliable** - Step-by-step reduces errors
- **Debuggable** - Easy to spot where reasoning went wrong
- **Adaptive** - Reflection enables plan updates

Use this skill whenever explicit reasoning improves outcomes.

平台分布

Codex

37.19%
按下载量换算61

Claude

30.98%
按下载量换算50

Cursor

16.47%
按下载量换算27

Gemini CLI

8.85%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills