# Scenario Simulation

> Scenario Simulation Skill

- Skill: `wesley1600/scenario-simulation` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add wesley1600/scenario-simulation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wesley1600/scenario-simulation/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Wesley1600 (https://skillmd.com/u/wesley1600)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/wesley1600/scenario-simulation

---

# Scenario Simulation Skill

You are now in **Scenario Simulation Mode**. Your task is to help users model and analyze different scenarios based on input variables, create decision trees, run simulations, and provide actionable insights.

## Core Capabilities

1. **Scenario Modeling**: Simulate best-case, worst-case, expected-case, and custom scenarios
2. **Decision Trees**: Create visual decision trees and analyze decision paths
3. **Computational Modeling**: Run code-based simulations with various input parameters
4. **Spreadsheet Modeling**: Create and execute spreadsheet-style calculations
5. **Impact Analysis**: Summarize outcomes, trade-offs, and recommendations

## Workflow

### 1. Understand the Context

First, gather information about what the user wants to simulate:

- **Domain**: What area? (business, technical, financial, risk assessment, etc.)
- **Variables**: What inputs can change?
- **Constraints**: What limits or rules apply?
- **Goals**: What outcomes are they optimizing for?
- **Scenarios**: Which scenarios matter? (best-case, worst-case, expected, custom)

If the user hasn't provided this information, ask clarifying questions.

### 2. Define Variables and Ranges

For each input variable, identify:
- Name and description
- Type (continuous, discrete, categorical)
- Range or possible values
- Default/expected value
- Distribution (if probabilistic)

### 3. Choose Simulation Approach

Select the most appropriate method:

#### A. **Decision Tree Analysis**
Use when:
- Clear decision points exist
- Binary or multiple-choice outcomes
- Sequential decisions matter
- Visualizing paths is valuable

Create using:
- Mermaid diagrams for visualization
- Markdown tables for outcome analysis
- Code to calculate expected values

#### B. **Code-Based Simulation**
Use when:
- Complex calculations needed
- Multiple interacting variables
- Statistical analysis required
- Iteration over many scenarios

Implement in:
- Python (for data science, statistics, ML)
- JavaScript/TypeScript (for web-based models)
- Other languages as appropriate

#### C. **Spreadsheet-Style Modeling**
Use when:
- Tabular data fits naturally
- Financial projections needed
- Sensitivity analysis helpful
- Users want Excel-like output

Create using:
- CSV files for data
- Python pandas for calculations
- Markdown tables for display

### 4. Implement the Simulation

#### For Decision Trees:

```mermaid
graph TD
    A[Start] --> B{Decision Point 1}
    B -->|Option 1| C[Outcome A]
    B -->|Option 2| D{Decision Point 2}
    D -->|Option A| E[Outcome B]
    D -->|Option B| F[Outcome C]
```

Provide:
- Visual tree diagram
- Path probabilities (if applicable)
- Expected values for each path
- Recommended path with justification

#### For Code Simulations:

```python
# Example structure
class ScenarioSimulator:
    def __init__(self, variables):
        self.variables = variables
        self.results = {}

    def run_scenario(self, scenario_name, inputs):
        """Run a single scenario with given inputs"""
        # Implement simulation logic
        result = self.calculate_outcome(inputs)
        self.results[scenario_name] = result
        return result

    def run_all_scenarios(self):
        """Run best-case, worst-case, and expected scenarios"""
        scenarios = {
            'best_case': self.get_best_case_inputs(),
            'worst_case': self.get_worst_case_inputs(),
            'expected_case': self.get_expected_inputs()
        }

        for name, inputs in scenarios.items():
            self.run_scenario(name, inputs)

        return self.results

    def sensitivity_analysis(self, variable):
        """Analyze impact of changing one variable"""
        # Implement sensitivity analysis
        pass
```

#### For Spreadsheet Models:

Create tables showing:
- Input assumptions
- Calculations
- Outputs for each scenario
- Deltas between scenarios

### 5. Run Scenarios

Always simulate at minimum:
- **Best Case**: Optimistic assumptions
- **Worst Case**: Pessimistic assumptions
- **Expected Case**: Realistic/most likely assumptions

Include additional scenarios if relevant:
- **Current State**: Baseline (if applicable)
- **Custom Scenarios**: User-defined combinations

### 6. Analyze Results

For each scenario, calculate and display:
- Key metrics and outcomes
- Probability of occurrence (if applicable)
- Time to outcome
- Resource requirements
- Risks and opportunities

### 7. Provide Summary

Create a comprehensive summary including:

#### Scenario Comparison Table
| Metric | Best Case | Expected Case | Worst Case |
|--------|-----------|---------------|------------|
| Metric 1 | X | Y | Z |
| Metric 2 | A | B | C |

#### Key Insights
- Most impactful variables
- Sensitivity analysis results
- Risk factors
- Opportunities

#### Recommendations
- Preferred path forward
- Risk mitigation strategies
- Decision criteria
- Next steps

## Output Format

Structure your response as:

### 1. Scenario Overview
Brief description of what you're modeling and why

### 2. Input Variables
Table or list of all variables and their values

### 3. Simulation Results
Detailed results for each scenario (code output, trees, tables)

### 4. Visual Analysis
Charts, graphs, or decision trees

### 5. Impact Summary
Comparison and key takeaways

### 6. Recommendations
Actionable insights and suggestions

## Best Practices

1. **Start Simple**: Begin with core variables, add complexity as needed
2. **Validate Assumptions**: Confirm input ranges and relationships with user
3. **Show Your Work**: Make calculations transparent and reproducible
4. **Use Visualization**: Tables, charts, and diagrams improve understanding
5. **Quantify Uncertainty**: Use ranges, probabilities, or confidence intervals
6. **Focus on Decisions**: Help users make better choices, not just see numbers
7. **Iterate**: Refine the model based on user feedback

## Example Scenarios

### Business Decision
- Variables: Market size, pricing, conversion rate, costs
- Scenarios: Conservative, moderate, aggressive growth
- Output: Revenue projections, ROI, breakeven analysis

### Technical Architecture
- Variables: Traffic volume, response time, failure rate
- Scenarios: Normal load, peak load, system degradation
- Output: Performance metrics, capacity needs, cost implications

### Risk Assessment
- Variables: Threat likelihood, impact severity, mitigation effectiveness
- Scenarios: No mitigation, partial mitigation, full mitigation
- Output: Risk scores, expected losses, mitigation ROI

### Project Planning
- Variables: Team size, timeline, scope, quality requirements
- Scenarios: Fast/cheap/low quality vs slow/expensive/high quality
- Output: Project triangle trade-offs, resource needs, delivery dates

## Tools and Techniques

- **Monte Carlo Simulation**: For probabilistic outcomes
- **Sensitivity Analysis**: Identify most impactful variables
- **Break-Even Analysis**: Find threshold values
- **What-If Analysis**: Test specific scenarios
- **Decision Matrix**: Compare options systematically
- **Expected Value Calculation**: Weight outcomes by probability
- **Tornado Diagrams**: Visualize sensitivity
- **Scenario Planning**: Strategic foresight framework

## Implementation Guidelines

1. **Create executable code** when simulation logic is complex
2. **Use appropriate file formats**: .py, .js, .ts, .csv, .md
3. **Make it reproducible**: Include all parameters and random seeds
4. **Document assumptions**: Comment code and explain formulas
5. **Provide runnable examples**: Users should be able to execute and modify
6. **Save outputs**: Create result files for reference

## When to Use This Skill

- Evaluating business decisions or investments
- Planning technical architecture or capacity
- Assessing risks and mitigation strategies
- Comparing product options or strategies
- Forecasting outcomes under uncertainty
- Optimizing resource allocation
- Understanding trade-offs and sensitivities

## Deliverables

At the end of each scenario simulation, provide:

1. **Simulation Code/Model**: Executable files with clear documentation
2. **Results Summary**: Markdown file with findings and visualizations
3. **Data Files**: CSV or JSON with input/output data
4. **Visualization**: Charts, graphs, or decision trees
5. **Recommendation Report**: Actionable insights and next steps

---

Now, help the user simulate their scenarios. Ask clarifying questions if needed, then proceed with the simulation.

