with one click
sequentialthinking
// Use this skill for systematic problem-solving through structured, iterative thinking. Break down complex problems, iterate on understanding, catch edge cases, and validate solutions comprehensively.
// Use this skill for systematic problem-solving through structured, iterative thinking. Break down complex problems, iterate on understanding, catch edge cases, and validate solutions comprehensively.
| name | sequentialthinking |
| description | Use this skill for systematic problem-solving through structured, iterative thinking. Break down complex problems, iterate on understanding, catch edge cases, and validate solutions comprehensively. |
This skill guides you through structured, reflective problem-solving using iterative thinking. It's essential for tackling complex problems, multi-step tasks, and scenarios where thorough analysis prevents costly mistakes.
Sequential thinking is a deliberate, non-linear problem-solving process:
✅ Use for:
❌ Skip for:
thought (string)
thoughtNumber (integer)
totalThoughts (integer)
nextThoughtNeeded (boolean)
true: Continue thinking; more analysis neededfalse: Stop; you've reached a confident conclusionisRevision (boolean)
true: This thought revises or questions a previous thoughtfalse: This is a new forward-moving steprevisesThought (integer)
isRevision: true, reference the thought number being reconsideredbranchFromThought (integer)
branchId (string)
needsMoreThoughts (boolean)
true if you reach the estimated total but realize more thinking is neededThought 1: Understand the problem
↓
Thought 2: Identify root causes or constraints
↓
Thought 3: Outline solution approach
↓
Thought 4: Verify solution handles edge cases
↓
[nextThoughtNeeded: false]
Example Use Case: Fixing a bug with a clear stack trace.
Thought 1: Initial understanding
↓
Thought 2: Question assumption → [isRevision: true, revisesThought: 1]
↓
Thought 3: Revised approach based on new insight
↓
Thought 4: Check for edge cases
↓
[nextThoughtNeeded: false]
Example Use Case: Designing an API with unclear requirements.
Thought 1: Understand problem
↓
Thought 2: Outline Approach A
↓
Thought 3: Branch to Approach B [branchFromThought: 1, branchId: "alt-approach"]
↓
Thought 4: Compare approaches
↓
Thought 5: Choose best approach
↓
[nextThoughtNeeded: false]
Example Use Case: Choosing between architectural patterns.
Thought 1: Initial scope assessment (totalThoughts: 4)
↓
Thought 2: First insight reveals complexity
↓
Thought 3: Realize more analysis needed [needsMoreThoughts: true]
↓
Thought 4: Additional analysis
↓
Thought 5: More thinking...
↓
[nextThoughtNeeded: false]
Example Use Case: Uncovering hidden dependencies in a large refactor.
isRevision: true when an assumption breaks.totalThoughts when discovering new complexities.nextThoughtNeeded: false only when:
Thought 1: Symptom is slow queries. Possible causes: missing index, inefficient join, N+1 query.
Thought 2: Let me think through the data model. The join involves 3 tables...
The query runs in O(n²) because we're not indexed on the foreign key.
Thought 3: Solution: Add an index. But wait—are there writes on this table?
If so, indexing might slow writes. Trade-off check needed.
Thought 4: [isRevision: true, revisesThought: 3] Actually, the table is read-heavy.
Adding an index is safe. Also consider query caching for frequently-fetched data.
Thought 5: Verify edge case: What if index creation locks the table in production?
Use `CONCURRENTLY` option in PostgreSQL. Plan for maintenance window.
[nextThoughtNeeded: false]
Thought 1: Feature request: user profiles. Questions: Should profiles be public or private?
No clear spec. I'll assume private by default with optional sharing.
Thought 2: Database schema: users → profiles (1:1 relation). Privacy stored as boolean or enum?
Enum is more scalable (public, private, friends-only). Revised approach.
Thought 3: [isRevision: true, revisesThought: 1] Reconsidering sharing model.
If users can share with friends, we need to store relationships. This adds complexity.
Keep it simple for v1: public or private only.
Thought 4: API design. GET /users/:id/profile should check permissions. POST with auth.
Edge case: What if user has no profile yet? Return 404 or empty object?
Return empty object with a 200 for consistency.
Thought 5: Edge cases to handle:
- Deleted user: cascade delete profile or soft-delete?
- Concurrent updates: Use optimistic locking with version field.
- Performance: Profile fetches are common. Cache with 1-hour TTL.
[nextThoughtNeeded: false]
Thought 1: Need to refactor module A. Three possible approaches:
A) Incremental: Refactor one function at a time.
B) Big-bang: Rewrite the entire module.
C) Extract-and-replace: Extract logic into new module, then replace gradually.
Thought 2: [branchFromThought: 1, branchId: "approach-A"] Approach A is low-risk
but could take weeks. Good for small teams.
Thought 3: [branchFromThought: 1, branchId: "approach-B"] Approach B is fast but risky.
High chance of bugs. Needs extensive testing.
Thought 4: [branchFromThought: 1, branchId: "approach-C"] Approach C balances risk and speed.
Requires careful API design between old and new modules.
Thought 5: Comparing branches:
- A: Safe, slow, low effort
- B: Fast, risky, high effort
- C: Balanced, moderate effort
Our codebase is large and in production. Risk mitigation is critical.
Choose Approach C. Invest in API clarity.
[nextThoughtNeeded: false]
isRevision: true.nextThoughtNeeded: false before considering edge cases.Sequential thinking is essential for autonomous agents tackling complex tasks:
nextThoughtNeeded: false only when ready.Sequential thinking transforms scattered problem-solving into a methodical, documented process that leads to better designs, fewer bugs, and faster implementations.
Master SOTA data prep for Kaggle comps: automated EDA (Sweetviz), cleaning (Pyjanitor), and feature selection (Polars + XGBoost) for medium datasets (100MB–5GB) in Colab.
Use this skill to create new Agent Skills for GitHub Copilot. It guides you through the process of setting up the directory structure and the SKILL.md file.
Guide for using and supporting the AGENTS.md standard in VS Code. Use this when asked about AGENTS.md, custom instructions, or repo-level AI agent configuration.