Back to Workflow & Productivity

Sequential Thinking

reasoningplanningmcpdebugginglogic
⭐ 2.1kπŸ•’ 2026-04-03Source β†—

Install this skill

npx skills add mrgoonie/claudekit-skills

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

Sequential Thinking provides a formal framework for agents to decompose multifaceted problems into manageable, iterative reasoning steps. It enables the agent to track progress, backtrack upon identifying errors, and branch into parallel solution paths when initial assumptions prove insufficient. By maintaining a structured chain of thought, this skill prevents the agent from rushing toward premature conclusions, especially in scenarios where requirements shift or project scopes evolve mid-process. It is essential for developers performing tasks like complex bug isolation, architectural planning, or multi-step logic implementation where the final output relies on accurate intermediate transitions. Instead of guessing the next action, the agent explicitly defines its current reasoning step, estimates the remaining work, and updates its strategy based on the reality of the evolving task.
By mrgoonie

What this skill does

  • β€’Incremental step-by-step reasoning sequences
  • β€’Dynamic adjustment of total workload estimates
  • β€’Explicit revision tracking for previous thought errors
  • β€’Branching logic to test multiple architectural approaches
  • β€’Persistent state of the current reasoning chain

When to use it

  • βœ“Refactoring legacy code with unclear dependency impacts
  • βœ“Debugging complex race conditions across distributed services
  • βœ“Planning multi-stage feature implementations
  • βœ“Evaluating multiple technical strategies before commit

When not to use it

  • βœ•Simple one-line command executions
  • βœ•Retrieving static information or direct factual lookups
  • βœ•Tasks that are easily resolved in a single atomic action

How to invoke it

Example prompts that trigger this skill:

  • β€œAnalyze this bug report using sequential thinking to trace the root cause.”
  • β€œHelp me plan the database migration using the sequential thinking skill.”
  • β€œUse sequential thinking to evaluate these three refactoring paths for my API.”
  • β€œLet's break down this complex feature request into manageable reasoning steps.”
  • β€œTrace the logic errors in this function using a step-by-step reasoning approach.”

Example workflow

  1. Initialize the first thought step to define the primary problem objective.
  2. Formulate the initial reasoning and estimate the total steps required for completion.
  3. Execute subsequent reasoning steps while dynamically updating the total count as new info arises.
  4. Identify a flaw in logic and use the revision flag to correct a previous thought number.
  5. Signal the completion of the task by setting nextThoughtNeeded to false once the final conclusion is reached.

Prerequisites

  • –Claude Code or compatible MCP-enabled environment
  • –mcp__reasoning__sequentialthinking tool installed

Pitfalls & limitations

  • !Over-estimating the total steps can lead to unnecessary verbosity.
  • !Failing to update totalThoughts after a branch can cause confusion in the reasoning chain.
  • !Treating every minor interaction as a complex reasoning task adds excessive latency.

FAQ

How does this differ from standard chain-of-thought prompting?
Unlike standard prompting, this uses a formal MCP tool that tracks metadata like revision history and branching, allowing the agent to explicitly reference and modify previous logic steps.
Can I branch into multiple parallel paths?
Yes, you can use the branchFromThought parameter to spawn a new reasoning path from a specific prior step if an initial approach fails.
What happens if I finish earlier than my estimated total steps?
The tool allows you to stop by setting nextThoughtNeeded to false; the totalSteps is an estimation used for planning rather than a hard constraint.

How it compares

While manual prompting relies on the agent's memory, Sequential Thinking provides a persistent, trackable record that allows for precise mid-task course correction and auditability.

Source & trust

⭐ 2.1k starsπŸ•’ Updated 2026-04-03πŸ›‘ no risky patterns found

From the source: β€œ# Sequential Thinking Enables structured problem-solving through iterative reasoning with revision and branching capabilities. ## Core Capabilities - **Iterative reasoning**: Break complex problems into sequential thought steps - **Dynamic scope**: Adjust total thought count as understanding evolves…”

View the full SKILL.md source

# Sequential Thinking

Enables structured problem-solving through iterative reasoning with revision and branching capabilities.

## Core Capabilities

- **Iterative reasoning**: Break complex problems into sequential thought steps
- **Dynamic scope**: Adjust total thought count as understanding evolves
- **Revision tracking**: Reconsider and modify previous conclusions
- **Branch exploration**: Explore alternative reasoning paths from any point
- **Maintained context**: Keep track of reasoning chain throughout analysis

## When to Use

Use `mcp__reasoning__sequentialthinking` when:
- Problem requires multiple interconnected reasoning steps
- Initial scope or approach is uncertain
- Need to filter through complexity to find core issues
- May need to backtrack or revise earlier conclusions
- Want to explore alternative solution paths

**Don't use for**: Simple queries, direct facts, or single-step tasks.

## Basic Usage

The MCP tool `mcp__reasoning__sequentialthinking` accepts these parameters:

### Required Parameters

- `thought` (string): Current reasoning step
- `nextThoughtNeeded` (boolean): Whether more reasoning is needed
- `thoughtNumber` (integer): Current step number (starts at 1)
- `totalThoughts` (integer): Estimated total steps needed

### Optional Parameters

- `isRevision` (boolean): Indicates this revises previous thinking
- `revisesThought` (integer): Which thought number is being reconsidered
- `branchFromThought` (integer): Thought number to branch from
- `branchId` (string): Identifier for this reasoning branch

## Workflow Pattern

```
1. Start with initial thought (thoughtNumber: 1)
2. For each step:
   - Express current reasoning in `thought`
   - Estimate remaining work via `totalThoughts` (adjust dynamically)
   - Set `nextThoughtNeeded: true` to continue
3. When reaching conclusion, set `nextThoughtNeeded: false`
```

## Simple Example

```typescript
// First thought
{
  thought: "Problem involves optimizing database queries. Need to identify bottlenecks first.",
  thoughtNumber: 1,
  totalThoughts: 5,
  nextThoughtNeeded: true
}

// Second thought
{
  thought: "Analyzing query patterns reveals N+1 problem in user fetches.",
  thoughtNumber: 2,
  totalThoughts: 6, // Adjusted scope
  nextThoughtNeeded: true
}

// ... continue until done
```

## Advanced Features

For revision patterns, branching strategies, and complex workflows, see:
- [Advanced Usage](references/advanced.md) - Revision and branching patterns
- [Examples](references/examples.md) - Real-world use cases

## Tips

- Start with rough estimate for `totalThoughts`, refine as you progress
- Use revision when assumptions prove incorrect
- Branch when multiple approaches seem viable
- Express uncertainty explicitly in thoughts
- Adjust scope freely - accuracy matters less than progress visibility

Quoted from mrgoonie/claudekit-skills for reference β€” see the original for the authoritative, latest version.

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/sequential-thinking/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/mrgoonie/claudekit-skills/sequential-thinking/SKILL.md
  • Cursor: ~/.cursor/skills/mrgoonie/claudekit-skills/sequential-thinking/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/mrgoonie/claudekit-skills/sequential-thinking/SKILL.md

πŸš€ Install with CLI:
npx skills add mrgoonie/claudekit-skills

Read the Master Guide: Mastering Agent Skills β†’

Recommended Rules

View more rules β†’

Recommended Workflows

View more workflows β†’

Recommended MCP Servers

View more MCP servers β†’

Take It Further

Maximize your productivity with these powerful resources

πŸ“‹

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
πŸ“–

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid workflow & productivity issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Workflow & Productivity and is published by mrgoonie, maintained in mrgoonie/claudekit-skills.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.