
Sequential Thinking
- 81 installs
- 36 repo stars
- Updated July 14, 2026
- oimiragieo/agent-studio
Helps with ai & agent building tasks.
About
sequential-thinking is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- sequential-thinking
- AI & Agent Building
- AI-coding skill
Sequential Thinking by the numbers
- 81 all-time installs (skills.sh)
- +1 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #5,216 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oimiragieo/agent-studio --skill sequential-thinkingAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 81 |
|---|---|
| repo stars | ★ 36 |
| Last updated | July 14, 2026 |
| Repository | oimiragieo/agent-studio ↗ |
What it does
Helps with ai & agent building tasks.
Files
Sequential Thinking Skill
Installation
Optional standalone executor: The skill can run .claude/tools/optimization/sequential-thinking/executor.py. Requirements:
- Python 3.10+: python.org or
winget install Python.Python.3.12(Windows),brew install python@3.12(macOS). - MCP Python package:
pip install mcp - If the executor is not present or MCP is not installed, the skill still provides in-context guidance and exits successfully.
Full functionality: The Python script .claude/tools/optimization/sequential-thinking/executor.py must exist for standalone executor runs. Run node .claude/tools/cli/doctor.mjs to verify; doctor warns if the executor is missing.
Cheat Sheet & Best Practices
Frameworks: Polya: (1) Understand the problem (2) Devise a plan (3) Carry out the plan (4) Look back. IDEAL: Identify → Define context → Explore strategies → Act on best → Look back and learn.
Process: Be systematic: preview outcomes, sustain effort, examine from multiple angles, pace and self-monitor. Use diagrams, tables, patterns; break into subgoals; work backwards when useful.
Hacks: Number thoughts (thoughtNumber, totalThoughts); allow revision and branching. Start with an initial step count and refine. Use the MCP sequential-thinking tool for multi-step analysis and hypothesis verification when the full scope is unclear.
Certifications & Training
No cert. Problem-solving frameworks: Polya (Understand → Plan → Execute → Look back), IDEAL (Identify → Define → Explore → Act → Look back). Skill data: Systematic steps; preview outcomes; sustain effort; revise and branch; use diagrams/tables/patterns.
Hooks & Workflows
Suggested hooks: Optional: pre-plan or pre-complex-task hook to suggest sequential-thinking for multi-step tasks. Use with planner (primary) for planning and master-orchestrator when decomposing work.
Workflows: Use with planner (primary). Flow: complex task → load sequential-thinking → emit thoughts (MCP or executor) → revise → act. See core/router-decision for when router assigns planner.
Overview
This skill provides structured problem-solving through a flexible thinking process that can adapt and evolve. Each thought can build on, question, or revise previous insights.
Context Savings: ~97% reduction
- MCP Mode: ~15,000 tokens always loaded
- Skill Mode: ~500 tokens metadata + on-demand loading
When to Use
- Breaking down complex problems into steps
- Planning and design with room for revision
- Analysis that might need course correction
- Problems where the full scope isn't clear initially
- Multi-step solutions requiring maintained context
- Filtering irrelevant information
- Hypothesis generation and verification
Quick Reference
Use the MCP sequential thinking tool directly:
// Via MCP tool
mcp__sequential -
thinking__sequentialthinking({
thought: 'First, let me analyze the problem...',
thoughtNumber: 1,
totalThoughts: 5,
nextThoughtNeeded: true,
});Tool: sequentialthinking
A detailed tool for dynamic and reflective problem-solving through thoughts.
Parameters
| Parameter | Type | Description |
|---|---|---|
thought | string | Your current thinking step |
thoughtNumber | integer | Current thought number (1, 2, 3...) |
totalThoughts | integer | Estimated total thoughts needed |
nextThoughtNeeded | boolean | Whether another thought step is needed |
isRevision | boolean | If this thought revises previous thinking |
revisesThought | integer | Which thought number is being reconsidered |
branchFromThought | integer | Branching point thought number |
branchId | string | Identifier for current branch |
needsMoreThoughts | boolean | If more thoughts needed at the "end" |
Key Features
- Adjust
totalThoughtsup or down as you progress - Question or revise previous thoughts
- Add more thoughts even after reaching what seemed like the end
- Express uncertainty and explore alternatives
- Branch or backtrack (non-linear thinking)
- Generate and verify solution hypotheses
Process
1. Start with initial estimate of needed thoughts 2. Feel free to question/revise previous thoughts 3. Add more thoughts if needed, even at the "end" 4. Mark thoughts that revise or branch 5. Generate solution hypothesis when appropriate 6. Verify hypothesis based on Chain of Thought 7. Repeat until satisfied 8. Set nextThoughtNeeded: false only when truly done
Tool Execution
The sequential thinking tool is available via MCP. Use it directly in your responses:
// Execute a thinking step
mcp__sequential -
thinking__sequentialthinking({
thought: 'Your analysis here...',
thoughtNumber: 1,
totalThoughts: 5,
nextThoughtNeeded: true,
});Configuration
MCP server configuration stored in config.json:
- Command:
npx -y @modelcontextprotocol/server-sequential-thinking
Related
- Original MCP server:
@modelcontextprotocol/server-sequential-thinking - MCP Converter Skill:
.claude/skills/mcp-converter/
Iron Laws
1. NEVER set nextThoughtNeeded: false before the solution hypothesis has been verified 2. ALWAYS adjust totalThoughts dynamically as problem complexity becomes clear 3. NEVER commit to the first approach without exploring at least one alternative via branching 4. ALWAYS mark corrections explicitly with isRevision: true and revisesThought: N 5. NEVER stop at the estimated thought count if the hypothesis remains unverified
Anti-Patterns
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Fixed thought count | Thinking stops at an arbitrary estimate regardless of solution confidence | Set needsMoreThoughts: true and increase totalThoughts when complexity grows |
| No branching | Commits to the first approach without considering alternatives | Use branchFromThought to explore multiple solution paths before choosing |
| Skipping revisions | Incorrect assumptions propagate uncorrected through downstream thoughts | Mark all corrections with isRevision: true and revisesThought: N |
| Premature termination | Unverified hypothesis leads to incorrect or incomplete solutions | Verify the hypothesis explicitly before setting nextThoughtNeeded: false |
| No uncertainty markers | Overconfident conclusions mislead execution agents | Mark tentative thoughts explicitly; distinguish confident vs uncertain reasoning |
Memory Protocol (MANDATORY)
Before starting: Read .claude/context/memory/learnings.md
After completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
Invoke the sequential-thinking skill and follow it exactly as presented to you
#!/usr/bin/env node
/**
* sequential-thinking - Post-Execute Hook
* Runs after the skill executes for cleanup, logging, or follow-up actions.
*/
const fs = require('fs');
const path = require('path');
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// Parse hook input
const result = safeParseJSON(process.argv[2] || '{}');
console.log('📝 [SEQUENTIAL-THINKING] Post-execute processing...');
/**
* Process execution result
*/
function processResult(_result) {
// TODO: Add your post-processing logic here
return { success: true };
}
// Run post-processing
const outcome = processResult(result);
if (outcome.success) {
console.log('✅ [SEQUENTIAL-THINKING] Post-processing complete');
process.exit(0);
} else {
console.error('⚠️ [SEQUENTIAL-THINKING] Post-processing had issues');
process.exit(0);
}
#!/usr/bin/env node
/**
* sequential-thinking - Pre-Execute Hook
* Runs before the skill executes to validate input or prepare context.
*/
const fs = require('fs');
const path = require('path');
const { safeParseJSON } = require('../../../lib/utils/safe-json.cjs');
// Parse hook input
const input = safeParseJSON(process.argv[2] || '{}');
console.log('🔍 [SEQUENTIAL-THINKING] Pre-execute validation...');
/**
* Validate input before execution
*/
function validateInput(_input) {
const errors = [];
// TODO: Add your validation logic here
return errors;
}
// Run validation
const errors = validateInput(input);
if (errors.length > 0) {
console.error('❌ Validation failed:');
errors.forEach(e => console.error(' - ' + e));
process.exit(1);
}
console.log('✅ [SEQUENTIAL-THINKING] Validation passed');
process.exit(0);
sequential-thinking Research Requirements
Generated: 2026-02-28
Skill Description
Sequential thinking and structured problem solving. Break down complex problems into steps with revision and branching capabilities. Use for multi-step analysis, planning, and hypothesis verification.
Research Areas
- Current best practices for sequential-thinking
- Industry standards and tooling
- Integration patterns
Source References
- To be populated by skill-updater research phase
sequential-thinking Rules
Purpose
Sequential thinking and structured problem solving. Break down complex problems into steps with revision and branching capabilities. Use for multi-step analysis, planning, and hypothesis verification.
Best Practices
- Start with initial estimate of needed steps
- Revise and branch as needed
- Generate and verify hypotheses
Integration Points
See SKILL.md for complete documentation.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "sequential-thinking Input Schema",
"description": "Input validation schema for sequential-thinking skill",
"type": "object",
"required": [],
"properties": {},
"additionalProperties": true
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "sequential-thinking Output Schema",
"description": "Output validation schema for sequential-thinking skill",
"type": "object",
"required": ["success"],
"properties": {
"success": {
"type": "boolean",
"description": "Whether the skill executed successfully"
},
"result": {
"type": "object",
"description": "The skill execution result",
"additionalProperties": true
},
"error": {
"type": "string",
"description": "Error message if execution failed"
}
},
"additionalProperties": true
}
#!/usr/bin/env node
/**
* Sequential Thinking - Main Script
* Sequential thinking and structured problem solving. Break down complex problems into steps with revision and branching capabilities. Use for multi-step analysis, planning, and hypothesis verification.
*
* Usage:
* node main.cjs [options]
*
* Options:
* --help Show this help message
*/
const fs = require('fs');
const path = require('path');
// Find project root
function findProjectRoot() {
let dir = __dirname;
while (dir !== path.parse(dir).root) {
if (fs.existsSync(path.join(dir, '.claude'))) {
return dir;
}
dir = path.dirname(dir);
}
return process.cwd();
}
const PROJECT_ROOT = findProjectRoot();
// Parse command line arguments
const args = process.argv.slice(2);
const options = {};
for (let i = 0; i < args.length; i++) {
if (args[i].startsWith('--')) {
const key = args[i].slice(2);
const value = args[i + 1] && !args[i + 1].startsWith('--') ? args[++i] : true;
options[key] = value;
}
}
/**
* Main execution
*/
function main() {
if (options.help) {
console.log(`
Sequential Thinking - Main Script
Usage:
node main.cjs [options]
Options:
--help Show this help message
`);
process.exit(0);
}
const { spawn } = require('child_process');
const executorPath = path.join(
PROJECT_ROOT,
'.claude',
'tools',
'optimization',
'sequential-thinking',
'executor.py'
);
if (fs.existsSync(executorPath)) {
const child = spawn('python', [executorPath, ...args.filter(a => a !== '--help')], {
stdio: 'inherit',
cwd: path.dirname(executorPath),
shell: false,
windowsHide: true,
});
child.on('close', code => process.exit(code !== null && code !== undefined ? code : 1));
} else {
console.log(
'Sequential Thinking skill provides structured thinking guidance. Invoke via the agent; executor not found.'
);
process.exit(0);
}
}
main();
sequential-thinking Implementation Template
Goal
- Define target outcome and acceptance criteria.
TDD
1. Red 2. Green 3. Refactor
Verification
- lint
- format
- targeted tests