Agent skill
smith-analysis
Reasoning frameworks and problem decomposition techniques. Use when planning implementation, evaluating arguments, estimating scope, decomposing complex tasks, or applying first principles thinking.
Install this agent skill to your Project
npx add-skill https://github.com/tianjianjiang/smith/tree/main/smith-analysis
SKILL.md
Reasoning Frameworks
- Scope: Reasoning, problem decomposition, and analysis techniques
- Load if: Planning implementation, evaluating arguments, estimating scope, decomposing tasks
- Prerequisites: @smith-guidance/SKILL.md
Foundation: Based on OODA Loop's Orient phase (Boyd) - the "cognitive engine" that drives decision-making through mental models, prior experience, and analysis/synthesis.
When to use: Problem framing, solution design, risk assessment, logical validation.
MECE relationship:
- smith-analysis (this file) - Constructive thinking (how to reason)
@smith-clarity/SKILL.md- Defensive thinking (what to avoid)@smith-validation/SKILL.md- Proving/testing (verifying correctness)
Reasoning Patterns
Deductive Reasoning
General principles to specific conclusions (logically certain):
Pattern: If all A are B, and C is A, then C is B.
- Start with general premise (known to be true)
- Apply to specific case
- Derive guaranteed conclusion
Inductive Reasoning
Specific observations to general patterns (probabilistic):
Pattern: Observed A1, A2, A3... all have property B. Therefore all A probably have B.
- Gather specific observations
- Identify patterns
- Form general hypothesis (may be wrong)
Caution: Inductive conclusions can be wrong.
Abductive Reasoning
Best explanation from incomplete observations (inference to best explanation):
Pattern: B is observed. A would explain B. Therefore A is probably true.
- Observe surprising/unexpected result
- Generate candidate explanations
- Select most plausible explanation
- Test to confirm or falsify
Extended Thinking Guidance
Modern LLMs have built-in extended thinking for complex problem-solving.
When to use: Complex architectural decisions, multi-step refactoring, security analysis, performance optimization.
- NEVER use "think step-by-step" prompts (counterproductive for models with built-in reasoning)
- NEVER ask for visible reasoning steps (defeats efficiency purpose)
- NEVER use for simple, straightforward tasks
- NEVER provide explicit reasoning instructions (focus on outcome specification, not process)
Problem Decomposition
First Principles Thinking
Break down to fundamentals, reason up:
- Identify assumptions - What do we take for granted?
- Decompose - What are the fundamental truths?
- Reconstruct - Build solution from first principles only
Polya's 4-Step Method
Universally applicable problem-solving:
-
Understand the problem
- What is the unknown? What are the data? What is the condition?
- Can you restate in your own words?
-
Devise a plan
- Have you seen this before? Know a related problem?
- Can you solve a simpler problem first?
-
Carry out the plan
- Execute each step, check as you go
- Can you prove each step correct?
-
Look back
- Can you check the result differently?
- Can you use this for other problems?
Estimation
Fermi Estimation
Order-of-magnitude approximation with limited data:
- Break complex question into simpler sub-questions
- Make reasonable assumptions for each part
- Combine estimates (multiply/add as appropriate)
- Sanity check: Is result reasonable?
Constraint Thinking
TOC Five Focusing Steps
Systematic bottleneck elimination (Goldratt):
- Identify - Find the constraint limiting throughput
- Exploit - Maximize constraint output without additional investment
- Subordinate - Align everything else to support the constraint
- Elevate - Increase constraint capacity if still limiting
- Repeat - Find the new constraint (it will shift)
Three-Point Estimation (PERT)
Handle uncertainty with optimistic, likely, pessimistic:
- O: Best case (everything goes right)
- M: Most likely (typical scenario)
- P: Pessimistic (realistic worst case)
- Expected: (O + 4M + P) / 6
Current Reality Tree (CRT)
Trace symptoms to root cause:
- List Undesirable Effects (UDEs) - symptoms observed
- Connect with "if...then" cause-effect logic
- Trace backward to find common root cause
- Validate: Does root cause explain ALL symptoms?
Risk Assessment
Pre-Mortem Analysis
Before implementation, imagine failure has occurred:
- Assume failure - "The project failed. Why?"
- Generate causes - List reasons independently
- Categorize - Group failure modes
- Mitigate - Address highest-risk items in plan
Increases problem identification by 30%.
Inversion Thinking
Think backward to avoid failure:
- Instead of "How do I succeed?" ask "How could I fail?"
- Instead of "How to make this fast?" ask "What would make this slow?"
- Avoid stupidity rather than seeking brilliance
Comprehensive Review
Six Thinking Hats
Ensure coverage by examining from 6 perspectives:
- White (Facts): What data/evidence do we have?
- Red (Intuition): What does gut feeling say? Any concerns?
- Black (Caution): What could go wrong? What are the risks?
- Yellow (Optimism): What are the benefits? Best case?
- Green (Creativity): What alternatives exist? New approaches?
- Blue (Process): Are we on track? What's the next step?
ACTION (Recency Zone)
When reasoning or planning:
- Use First Principles to break down complex problems
- Apply Polya's 4-Step Method for systematic problem-solving
- Use Pre-Mortem Analysis before implementation
- Apply Six Thinking Hats for comprehensive review
- @smith-guidance/SKILL.md - Anti-sycophancy, HHH framework, exploration workflow
@smith-clarity/SKILL.md- Cognitive guards, logic fallacies@smith-validation/SKILL.md- Hypothesis testing, debugging
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
smith-style
File naming, path standards, and conventional commits. Use when naming files, creating branches, writing commit messages, or setting up new projects. Covers underscore vs hyphen conventions, commit format, and branch naming patterns.
smith-stacks
Stacked pull request workflows for large features. Use when creating stacked PRs, managing dependent PRs, or rebasing after parent merges. Covers stack creation, merge order, and squash merge handling.
smith-python
Python development with uv, pytest, ruff, and type hints. Use when writing Python code, running tests, managing Python packages, or working with virtual environments. Covers import organization, type hints, pytest patterns, and environment variables.
smith-principles
Fundamental coding principles (DRY, KISS, YAGNI, SOLID, HHH). Use when starting any development task, evaluating implementation approaches, or reviewing code quality. Always active as foundation for all development decisions.
smith-nuxt
Nuxt 3 development patterns including auto-import stubbing for tests, environment variable conventions, and middleware testing. Use when working with Nuxt projects, testing Nuxt components/middleware, or configuring Nuxt environment variables.
smith-plan
Plan tracking protocol (portable). Progress tracking with checkboxes, iteration workflow, completion/blocker signals. Use when executing multi-step plans, tracking task progress, or working from plan files. IMPORTANT - Always update the plan file after completing tasks.
Didn't find tool you were looking for?