All skills
dianel555 avatar

/sequential-think

@d2409d5
by dianeldianel555/dskills65 stars
8

Multi-step reasoning engine for complex analysis and systematic problem solving. Use when: (1) Complex debugging scenarios with multiple layers, (2) Architectural analysis and system design, (3) Problems requiring hypothesis testing and validation, (4) Multi-component failure investigation, (5) Performance bottleneck identification. Triggers: "--think", "--think-hard", "--ultrathink", "analyze step by step", "break down this problem", "systematic analysis". IMPORTANT: Do NOT use for simple single-step tasks.

Use this Skill: https://skilld.dev/gh/dianel555/dskills/sequential-think

This session only. Nothing lands on disk.

README.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Sequential Think CLI

Standalone iterative thinking engine for complex problem-solving. No MCP dependency required.

Installation

No external dependencies required - uses Python standard library only.

# Verify Python 3.7+
python --version

Quick Start

# Start a thinking chain
python sequential_think_cli.py think -t "Analyzing the problem..." -n 1 -T 5

# Continue thinking
python sequential_think_cli.py think -t "Based on analysis, I hypothesize..." -n 2 -T 5

# Complete the chain
python sequential_think_cli.py think -t "Conclusion: the solution is..." -n 5 -T 5 --no-next

# View history
python sequential_think_cli.py history

# Clear history
python sequential_think_cli.py clear

Commands

think - Process a Thought

python sequential_think_cli.py think [options]

Required:
  -t, --thought          Current thinking step content
  -n, --thought-number   Current position in sequence (1-based)
  -T, --total-thoughts   Estimated total thoughts needed

Optional:
  --no-next              Mark as final thought (no more thinking needed)
  --is-revision          This thought revises previous thinking
  --revises-thought N    Which thought number is being reconsidered
  --branch-from N        Branching point thought number
  --branch-id ID         Identifier for current branch
  --needs-more           Signal more thoughts needed beyond estimate
  -q, --quiet            Suppress formatted output to stderr

history - View Thought History

python sequential_think_cli.py history [options]

Options:
  -f, --format           Output format: json or text (default: text)

clear - Clear History

python sequential_think_cli.py clear

Examples

Basic Thinking Chain

# Step 1: Problem identification
python sequential_think_cli.py think \
  -t "The API is returning 500 errors. Need to identify root cause." \
  -n 1 -T 4

# Step 2: Hypothesis
python sequential_think_cli.py think \
  -t "Hypothesis: Database connection pool exhaustion based on error logs." \
  -n 2 -T 4

# Step 3: Verification
python sequential_think_cli.py think \
  -t "Verified: Connection pool max=10, active=10, waiting=50. Pool exhausted." \
  -n 3 -T 4

# Step 4: Conclusion
python sequential_think_cli.py think \
  -t "Solution: Increase pool size to 50 and add connection timeout." \
  -n 4 -T 4 --no-next

Revision Example

# Initial thought
python sequential_think_cli.py think \
  -t "The bug is in the authentication module." \
  -n 1 -T 3

# Revise after new evidence
python sequential_think_cli.py think \
  -t "Correction: Bug is in session management, not auth." \
  -n 2 -T 3 --is-revision --revises-thought 1

Branching Example

# Main path
python sequential_think_cli.py think -t "Approach A: Refactor the service" -n 1 -T 3
python sequential_think_cli.py think -t "Approach A requires 3 weeks" -n 2 -T 3

# Branch to explore alternative
python sequential_think_cli.py think \
  -t "Alternative: Use existing library instead" \
  -n 3 -T 4 --branch-from 1 --branch-id "lib-approach"

Output Format

think command

{
  "thoughtNumber": 2,
  "totalThoughts": 5,
  "nextThoughtNeeded": true,
  "branches": [],
  "thoughtHistoryLength": 2
}

history command (JSON)

{
  "history": [
    {
      "thought": "...",
      "thought_number": 1,
      "total_thoughts": 5,
      "next_thought_needed": true,
      "is_revision": false,
      "timestamp": "2024-01-15T10:30:00"
    }
  ],
  "branches": {},
  "totalThoughts": 1
}

Data Storage

Thought history is persisted to:

  • Location: ~/.config/sequential-think/thought_history.json
  • Format: JSON
  • Persistence: Survives across sessions until cleared

When to Use

Scenario Recommended
Complex debugging (3+ components) ✅ Yes
Architectural analysis ✅ Yes
Root cause investigation ✅ Yes
Multi-step problem solving ✅ Yes
Simple bug fix ❌ No
Single-file change ❌ No
Quick explanation ❌ No

Best Practices

  1. Start with reasonable estimate - Adjust totalThoughts as you learn more
  2. Use revisions explicitly - Mark --is-revision when reconsidering
  3. Branch for alternatives - Explore different approaches with --branch-from
  4. Don't rush completion - Only use --no-next when truly done
  5. Clear between sessions - Run clear when starting new problem

Source: SKILL.md on GitHub

1 warning7mo4 checks · Risk SAFE
  • Gen Agent Trust Hub7mo

    The skill provides a local command-line interface for managing iterative thinking steps during complex problem-solving. It uses only the Python standard library, stores history in a local JSON file within the user's home directory, and contains no network or dangerous command execution capabilities.

  • Socket7mo

    No alerts

  • Snyk7mo

    Risk: LOW · No issues

  • Runlayer7mo

    4/4 files flagged

Signed by skilld at d2409d5. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 8 months ago

README badge

README badge for dianel555/dskills/sequential-think