Sequential Thinking Skill
Claude Code skill replicating the Sequential Thinking MCP server β structured reasoning with branching, revision, and persistent state. No MCP required.
Installation
npx sequential-thinking-skillAsk AI about Sequential Thinking Skill
Powered by Claude Β· Grounded in docs
I know everything about Sequential Thinking Skill. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
sequential-thinking-skill
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.
Demo
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.
Features
- 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
Quick Start
Prerequisites
- Claude Code CLI
tsxβ available vianpx tsx(no global install needed)
Install
npx skills add https://github.com/thedotmack/sequential-thinking-skill --skill sequential-thinking
Or 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".
How It Works
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.
Commands
| 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) |
Output
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.
Comparison
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 |
Project Structure
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
