Loading...
Loading...
Chain-of-thought reasoning, self-reflection, and systematic problem-solving patterns for AI agents. Use before any complex task to ensure logical and accurate solutions.
npx skill4agent add alicoder001/agent-skills reasoningSystematic thinking for accurate problem solving.
PROBLEM → ANALYZE → DECOMPOSE → SOLVE STEPS → VERIFY → SYNTHESIZE## Thinking Process
1. **Understand**: What is being asked?
2. **Identify**: What information do I have?
3. **Plan**: What steps will solve this?
4. **Execute**: Work through each step
5. **Verify**: Is the solution correct?## Reflection Checklist
- [ ] Does this answer the actual question?
- [ ] Are there any logical errors?
- [ ] Did I miss edge cases?
- [ ] Is this the simplest solution?
- [ ] Would a senior developer approve this?// ❌ Bad: Trying to solve everything at once
function solveComplexProblem() {
// 500 lines of tangled logic
}
// ✅ Good: Decomposed into clear steps
function solveComplexProblem() {
const parsed = parseInput();
const validated = validateData(parsed);
const processed = processData(validated);
return formatOutput(processed);
}| Strategy | When to Use |
|---|---|
| Trace Through | Algorithm logic |
| Edge Cases | Input validation |
| Type Check | TypeScript code |
| Unit Test | Critical functions |
| Dry Run | Complex flows |
## Common Reasoning Errors
1. **Assumption Error**: Assuming facts not stated
2. **Logic Gap**: Missing intermediate steps
3. **Scope Creep**: Solving wrong problem
4. **Premature Optimization**: Overcomplicating
5. **Confirmation Bias**: Ignoring alternatives## Task: [Description]
### Understanding
- Goal: [What we need to achieve]
- Constraints: [Limitations]
- Inputs: [Available data]
### Approach
1. Step 1: [Description]
2. Step 2: [Description]
3. Step 3: [Description]
### Execution
[Work through each step]
### Verification
- [ ] Goal achieved
- [ ] Constraints satisfied
- [ ] No side effects
### Reflection
- What worked: [...]
- What could improve: [...]