src/execute/SKILL.md
GNN simulation script execution with result capture. Use when running generated simulation scripts, managing execution environments, handling framework dependencies, or capturing simulation outputs and metrics.
npx skillsauth add activeinferenceinstitute/generalizednotationnotation gnn-simulation-executionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Executes rendered simulation scripts across all supported frameworks with robust error handling, circuit breaker patterns, retry logic, and comprehensive result capture.
# Execute all frameworks
python src/12_execute.py --target-dir input/gnn_files --output-dir output --verbose
# Specific frameworks only
python src/12_execute.py --frameworks "pymdp,jax" --verbose
# Lite preset (PyMDP, JAX, DisCoPy)
python src/12_execute.py --frameworks "lite" --verbose
from execute import (
ExecutionEngine, GNNExecutor, execute_gnn_model, run_simulation,
execute_pymdp_simulation_from_gnn, execute_pymdp_simulation,
validate_execution_environment, process_execute,
execute_script_safely
)
# Process execution step (used by pipeline)
process_execute(target_dir, output_dir, verbose=True)
# Execute a GNN model directly
result = execute_gnn_model(gnn_spec, framework="pymdp")
# Run a simulation configuration
result = run_simulation(config)
# Validate execution environment before running
env_report = validate_execution_environment()
# Use the ExecutionEngine class
engine = ExecutionEngine()
process_execute — main pipeline processing functionExecutionEngine / GNNExecutor — execution engine classesexecute_gnn_model / run_simulation — model execution functionsexecute_pymdp_simulation_from_gnn / execute_pymdp_simulation — PyMDP-specificvalidate_execution_environment — pre-execution validationexecute_script_safely — safe script execution with error handlingThe execute processor follows this pipeline:
output/11_render_output/ for .py and .jl files--frameworks parameter (presets or explicit list)| Preset | Frameworks | Use Case |
| ------ | ---------- | -------- |
| all | PyMDP, RxInfer, ActiveInference.jl, JAX, DisCoPy | Full execution (default) |
| lite | PyMDP, JAX, DisCoPy | Python-only, no Julia required |
| pymdp,jax | PyMDP, JAX | Fast Python subset |
# Core execution (PyMDP)
uv sync --extra active-inference
# For Julia frameworks
# Requires Julia installed + packages
julia -e 'using Pkg; Pkg.add(["RxInfer", "ActiveInference"])'
# For DisCoPy
uv sync --extra graphs
output/12_execute_output/This module registers tools with the GNN MCP server (see mcp.py):
process_executeexecute_gnn_modelexecute_pymdp_simulationdevelopment
GNN static HTML website generation from pipeline artifacts. Use when generating browsable documentation websites, creating HTML galleries of model visualizations, or publishing pipeline results as a static site.
data-ai
GNN graph and matrix visualization generation. Use when creating network graph plots, matrix heatmaps, state space diagrams, or other visual representations of GNN models.
testing
GNN advanced validation and consistency checking. Use when performing deep validation of GNN models, checking cross-model consistency, verifying structural integrity, or running validation reports.
tools
GNN shared utility functions and helper modules. Use when working with common pipeline utilities, logging helpers, file I/O wrappers, path management, or pipeline template infrastructure.