Sequential thinking for Claude Code — no MCP server required.
Branch. Revise. Adapt. Think deeper.
Quick Start · Features · How It Works · MCP vs sequential-thinking-skill
A Claude Code skill that replicates the Sequential Thinking MCP server with full feature parity. No MCP infrastructure needed — just copy a folder and go.
Claude gains structured, multi-step reasoning with branching, revision, and dynamic depth adjustment, all tracked by a lightweight TypeScript state machine that persists to disk.
Here's what structured thinking looks like in action:
💭 Thought 1/5
First, I need to clarify what type of auction we're dealing with.
I'll assume sealed-bid first-price unless told otherwise.
[1/5] history=1 next=true
🔄 Revision 3/5 (revising thought 1)
Wait — I assumed one format, but the question is generic.
I should cover multiple auction types. Changing approach.
[3/5] history=3 next=true
🌿 Branch 4/7 (from thought 2, ID: vickrey)
In a Vickrey auction, the dominant strategy is to bid your true
valuation regardless of the number of players. Exploring this path.
[4/7] history=4 branches=vickrey next=true
Each thought is a deliberate step — Claude can revise when assumptions are wrong, branch to explore alternatives, and extend when problems are deeper than expected.
- Sequential numbered thoughts — structured chain-of-thought with formatted output
- Revisions — reconsider and correct previous thoughts without losing the original
- Branching — explore alternative paths from any thought, tracked by branch ID
- Dynamic depth — adjust
totalThoughtsup or down as the problem unfolds - Hypothesis/verification loops — generate and verify solutions iteratively
- Persistent state — history survives across invocations via JSON on disk
- Full state inspection — dump complete thought history and branch details at any point
- Claude Code CLI
tsx— available vianpx tsx(no global install needed)
npx skills add https://github.com/thedotmack/sequential-thinking-skill --skill sequential-thinkingOr manually:
git clone https://github.com/thedotmack/sequential-thinking-skill.git
cp -r sequential-thinking-skill/sequential-thinking ~/.claude/skills/That's it. The skill auto-activates when Claude detects problems that benefit from structured reasoning.
You can also trigger it explicitly with phrases like: "think through this step by step", "break this down", "use sequential thinking".
The skill is powered by think.ts, a TypeScript state machine that:
- Maintains an append-only thought history on disk (
.think_state.json) - Tracks branches as named collections of thoughts forking from any point
- Returns a compact status line to stdout after each thought (
[3/7] history=3 next=true) - Renders formatted thought headers to stderr for visual feedback
Claude invokes it via tsx scripts/think.ts with CLI flags for each thought. The SKILL.md file instructs Claude on the protocol — when to branch, revise, extend, and terminate.
| Command | Description |
|---|---|
--reset |
Clear state for a new thinking session |
--thought "..." --thoughtNumber N --totalThoughts M --nextThoughtNeeded true/false |
Submit a thought |
--isRevision --revisesThought N |
Mark as revision of thought N |
--branchFromThought N --branchId "label" |
Branch from thought N |
--needsMoreThoughts |
Signal that more thoughts are needed |
--status |
Dump full state (history + branches) |
Every thought prints a header and content to stderr, plus a compact status line to stdout:
💭 Thought 4/7
In a Vickrey auction, the dominant strategy is...
[4/7] history=4 branches=vickrey,english next=true
The --status command returns full JSON with fullHistory and branchDetails.
How does sequential-thinking-skill compare to the official MCP server?
| Sequential Thinking MCP | sequential-thinking-skill | |
|---|---|---|
| Setup | Configure MCP server in claude_desktop_config.json |
Copy a folder to ~/.claude/skills/ |
| Runtime | Requires running MCP server process | Standalone TypeScript script |
| Dependencies | @modelcontextprotocol/sdk, zod |
tsx only |
| State persistence | In-memory (lost on restart) | JSON on disk (survives restarts) |
| Features | Thoughts, branches, revisions | Identical feature set |
| State inspection | Via MCP tool call | --status flag |
| Integration | MCP protocol | Claude Code skill protocol |
sequential-thinking-skill/
├── sequential-thinking/
│ ├── SKILL.md # Skill definition and protocol
│ ├── scripts/
│ │ └── think.ts # TypeScript state machine
│ └── references/
│ └── example-session.md # Worked example with all features
├── README.md
├── LICENSE
└── .gitignore