sequential-thinking
当复杂问题需要系统性逐步推理时使用。适用于多阶段分析、设计规划、问题分解,或初始范围不明确且需要受控收敛的任务。
Profile →npx skills add majiayu000/claude-skill-registry --skill sequential-thinking-skill --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Sequential Thinking 这个 skill 的核心不是“多写几段 thought”,而是让 AI 在复杂问题里**持续推进、允许修正,并最终收敛成结论**。CLI 只是执行载体;skill 本身负责定义什么时候该进入这种思考方式,以及如何避免把顺序思考退化成松散输出。 ## Mission 这个 skill 用来把复杂问题处理成一个**有边界、可修正、可复核的推理过程**: - 先澄清问题,而不是急着给答案 - 在推进过程中允许修正和调整判断 - 在复杂度上升时比较替代路径,而不是单线硬推 - 在有限步数内收敛成结论与建议 - 最后保留可回放的推理轨迹 它解决的不是“不会想”,而是“想得太散、太早下结论、太难复核”。 ## Core Capabilities - **迭代推进**: 把复杂问题拆成连续步骤,而不是试图一口气得到完整答案 - **动态修正**: 当新证据出现时,允许回看并修正前面的判断 - **分支比较**: 当存在替代路径时,允许先比较再收敛 - **上下文保持**: 在多步推理中维持清晰的问题边界与目标 - **结论收束**: 最终必须形成判断,而不是无限发散 ## When to Use 在以下场景调用: - 问题需要多个相互关联的推理步骤 - 初始范围或方法不明确,需要先拆问题、再形成方法 - 需要在有限候选方案之间做比较,而不是无限发散 - 需要回看已有判断、识别漏洞、证据不足与隐含假设 - 需要留下可回放、可导出的推理轨迹 **不适用场景**: - 简单事实查询 - 单步即可完成的任务 - 路径已经非常明确、无需多步推演的问题 - 纯头脑风暴且暂时不要求收敛的场景 ## Working Philosophy - **先找主问题,再找答案**:不要把现象描述误当作根因定位 - **允许修正,而不是硬撑前提**:前面想错了,就回头修,不要带着错误前提继续推进 - **先消除复杂度,再堆解决方案**:优先识别主矛盾,而不是抢着给补丁 - **每一步只推进一步**:当前步只表达当前判断,不重复整套背景 - **最终必须落到结论**:不能把“我还能继续想”当作默认出口 ## Installation & Runtime Model 这个 skill 面向 agent 交付思考方式与调用约束;CLI 通过 npm 分发。 在使用前,应先确保本地已安装对应 CLI: ```bash npm install -g sequential-thinking-cli # 或 pnpm add -g sequential-thinking-cli ``` 安装后,使用 `sthink` 作为命令入口。 ## CLI Contract 本 skill 不再要求 AI 手写 thought JSON。执行层通过 CLI 主路径动作完成: -
- Mission
- Core Capabilities
- When to Use
- Working Philosophy
- Installation & Runtime Model
- CLI Contract
- start
- step
- replay
- Recommended Workflow
- Examples
- Example 1: 基础推演
- Example 2: 修正前提
- Example 3: 复杂变更拆解
npm install -g sequential-thinking-cli pnpm add -g sequential-thinking-cli sthink start --name "query-diagnosis" --goal "定位查询性能下降的主因" --mode explore --totalSteps 5 sthink step --sessionPath "<session-path>" --content "先不要急着选优化手段。需要先把问题拆成几层:是单条 SQL 退化、接口级 N+1,还是更上层的调用放大。若根因没分清,后面的缓存、索引、重写都可能只是补丁。" sthink step --sessionPath "<session-path>" --content "结论可以收敛了:主因是列表页批量加载时触发的 N+1,次因是关联字段缺少索引放大了单次查询成本。优化顺序应该先消除 N+1,再补索引验证尾延迟;这样既先打掉主矛盾,也避免一上来引入缓存复杂度。" sthink step --sessionPath "<session-path>" --content "回看 profiling 结果后,前面的判断需要修正:真正拖垮接口的不是 N+1 本身,而是关联列缺少索引,导致每次关联查询都在放大全表扫描成本。也就是说,N+1 仍然存在,但它不是第一性瓶颈,优先级应该后移。" sthink start --name "change-impact-analysis" --goal "拆解复杂变更的影响与优先级" --mode explore --totalSteps 5 sthink start --name "performance-tradeoff" --goal "比较缓存止血与查询优化的优先级" --mode branch --totalSteps 5
What does the sequential-thinking skill do?
当复杂问题需要系统性逐步推理时使用。适用于多阶段分析、设计规划、问题分解,或初始范围不明确且需要受控收敛的任务。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill sequential-thinking-skill --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.