happy-sim-diagnose

Diagnose Python happy-simulator code for fatal errors, silent failures, and performance bottlenecks.

11|Updated Mar 16, 2024
One-click install
npx skills add https://github.com/adamfilli/happy-simulator --skill happy-sim-diagnose
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: happy-sim-diagnose
Source: https://github.com/adamfilli/happy-simulator/tree/main/.claude/skills/happy-sim-diagnose
Command: npx skills add https://github.com/adamfilli/happy-simulator --skill happy-sim-diagnose

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps users identify and resolve common issues in their happysimulator Python code, ensuring simulations run correctly and efficiently.

Core Features & Use Cases

  • Error Identification: Detects and explains fatal errors that prevent simulations from running.
  • Behavioral Debugging: Pinpoints silent failures and unexpected simulation outcomes.
  • Performance Tuning: Offers suggestions for optimizing slow or memory-intensive simulations.
  • Use Case: If your simulation stops unexpectedly or a queue grows indefinitely, this Skill can analyze your code, identify the root cause (e.g., missing event targets, incorrect yield statements), and provide a clear fix.

Quick Start

Use the happy-sim-diagnose skill to troubleshoot the simulation script located at /path/to/my_simulation.py, which is experiencing an unbounded queue growth.

Frequently Asked Questions about happy-sim-diagnose

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix an unbounded queue growth in my Python discrete-event simulation?

To fix unbounded queue growth in a Python discrete-event simulation, you must analyze your code for unbalanced arrival and service rates. Correcting yield statements and ensuring event targets are properly mapped resolves the bottleneck.

Why does my happy-simulator script stop running unexpectedly without an error message?

A happy-simulator script may stop unexpectedly due to silent failures like incorrect generator usage or missing event targets. Static code analysis can pinpoint these behavioral issues and identify the root cause of the unexpected termination.

How do I debug silent failures in Python discrete-event simulations?

Debugging silent failures in Python discrete-event simulations requires static code analysis and optional runtime execution. This process identifies incorrect yield statements and missing event targets to resolve unexpected simulation outcomes.

What is the best way to optimize slow performance in a Python simulation script?

The best way to optimize slow performance in a Python simulation script is to analyze the code for memory-intensive operations and unbalanced arrival or service rates. Targeted tuning suggestions resolve the performance bottlenecks.

Can static code analysis identify incorrect generator usage in discrete-event simulations?

Yes, static code analysis can identify incorrect generator usage in discrete-event simulations. By examining the Python code structure, it detects missing event targets and faulty yield statements that cause fatal errors or silent failures.

Do I need runtime execution to troubleshoot fatal errors in my Python simulation code?

Runtime execution is optional for troubleshooting fatal errors in Python simulation code. Static code analysis alone can often identify missing event targets and incorrect generator usage, but runtime execution helps confirm behavioral issues.