mcpbeat Sign in

Simulation Skill

Run, monitor, and control simulations. Use when executing simulations, checking progress, or stopping running simulations. Supports foreground and background execution, progress monitoring, and process management.

20k tokens
context cost
the whole folder, loaded on every use
8
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
4138
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/NVIDIA/GenerativeAIExamples --skill simulation_skill

What comes with it

71 690 bytes besides the instruction
__init__.py
assets/README.md
references/TOOL_DECISION_TREE.md
scripts/__init__.py
scripts/self_heal_chain.py
scripts/simulation_tools.py
test.py

The instruction itself

12 sections, as written by the author

Simulation Skill

This skill provides tools for executing and managing simulations.

Overview

The Simulation skill enables agents to:

  • Run simulations from simulator input files
  • Run and heal run + auto-fix on failure, it will launch both run and monitor in one go from user input files
  • Monitor simulation progress and status
  • Stop running simulations when needed
  • Manage simulation processes and output directories

Tools

run_and_heal

Runs a simulation and, on failure, automatically parses PRT errors, optionally consults RAG (simulator_manual, simulator_examples), and produces a fixed DATA file. Implemented as a chain: run_simulation in parallel with PRT wait + error parsing; if errors are found, extract keyword, call RAG tools if config is available, then create a fixed DATA file (e.g. \*_FIXED.DATA).

Implementation: simulator_agent/tools/self_heal_chain.py

Usage (script):

python -m simulator_agent.tools.self_heal_chain \
  --prt-loc-dir /path/to/output/ \
  --data-file /path/to/CASE.DATA \
  [--config /path/to/config.yaml] \
  [--output-file /path/to/output/]

Parameters: data_file, output_dir (optional), num_mpi_processes (default: 1, for MPI parallel runs with np>1).

When to use:

  • When the user wants to run a case and automatically attempt to fix and re-run on simulation failure (run-and-heal flow).
  • Alternative to manual run_simulation → inspect failure → patch_simulation_input_keyword/modify_simulation_input_file → run_simulation.

run_simulation

Runs a simulation from a DATA file. Supports both foreground (wait for completion) and background (return immediately) execution.

Usage:

run_simulation(
    data_file: str,
    output_dir: Optional[str] = None,
    num_threads: int = 1,
    num_mpi_processes: int = 1,
    additional_args: Optional[str] = None,
    background: bool = True
) -> str

Parameters:

  • data_file: Path to the simulator input (DATA) file to run
  • output_dir: Optional output directory (default: same directory as DATA file)
  • num_threads: Number of threads for parallel simulation (default: 1)
  • num_mpi_processes: Number of MPI processes (np). When > 1, runs via mpirun -np N flow ... (default: 1). Set OPM_MPI_LAUNCHER=mpiexec to use mpiexec instead.
  • additional_args: Optional additional command-line arguments
  • background: If True, start and return immediately. If False, wait for completion and return full report including return code, stdout, stderr, and parsed PRT errors on failure.

Example:

run_simulation(
    data_file="SPE1CASE1_AGENT_GENERATED.DATA",
    output_dir="/path/to/output",
    num_threads=4,
    background=False
)

Returns:

  • Background mode: Simulation start confirmation with PID, output directory, and log paths
  • Foreground mode: Full completion report with return code, stdout, stderr, and PRT errors (if failed)

When to use:

  • Direct run (TOOL_DECISION_TREE.md Section 2.3) when user provides DATA file path + run intent
  • After scenario modifications (Section 2.4) to execute the modified case
  • HITL confirm run flow (Section 2.1) after user confirms
  • After auto-fix (Section 2.2) to re-run the fixed case

monitor_simulation

Monitors the progress of a running simulation by reading the PRT file.

Usage:

monitor_simulation(
    output_dir: str,
    tail_lines: int = 80,
    use_llm_summary: bool = False,
    llm_model: Optional[str] = None
) -> str

Parameters:

  • output_dir: Directory containing simulation output files (must contain .PRT file)
  • tail_lines: Number of lines to read from end of PRT file (default: 80)
  • use_llm_summary: If True, use LLM to summarize the PRT tail (default: False)
  • llm_model: Optional LLM model override for summary

Example:

monitor_simulation(
    output_dir="/path/to/output",
    tail_lines=100,
    use_llm_summary=True
)

Returns: Simulation status (running/completed/failed) and PRT tail content, optionally with LLM summary.

When to use:

  • When user asks to check simulation progress (Section 3.5, LLM choice)
  • For background runs to track completion
  • When debugging simulation issues

stop_simulation

Stops a running simulation by process ID.

Usage:

stop_simulation(
    pid: int,
    output_dir: Optional[str] = None,
    force: bool = False
) -> str

Parameters:

  • pid: Process ID of the simulation to stop
  • output_dir: Optional output directory with run metadata
  • force: If True, use SIGKILL (force kill). If False, use SIGTERM (graceful shutdown).

Example:

stop_simulation(
    pid=12345,
    output_dir="/path/to/output",
    force=False
)

Returns: Confirmation message with PID, signal used, and metadata update status.

When to use:

  • When user requests to stop a running simulation (Section 3.5, LLM choice)
  • For process management and cleanup

Workflow Integration

This skill integrates with the Simulator Agent's decision tree (TOOL_DECISION_TREE.md):

  • Direct Run (Section 2.3):
   run_and_heal (optionally after HITL confirm)
  • Scenario Test Chain (Section 2.4):
   parse_simulation_input_file → simulator_manual → simulator_examples → modify_simulation_input_file → run_and_heal
  • HITL Confirm Run (Section 2.1):
   User confirms → run_and_heal
  • After run_and_heal (Section 3.3):
   run_and_heal → (auto-fix if failed) → summarize
  • Monitoring (Section 3.5):
   monitor_simulation (via LLM choice)
   stop_simulation (via LLM choice)

Implementation Details

Tools are implemented as LangChain tools with Pydantic input schemas. The skill uses:

  • Subprocess management: For running Flow executables
  • Process tracking: PID and metadata stored in run.json
  • Output parsing: PRT file parsing for progress and errors
  • Error handling: Comprehensive error messages and failure reporting

Error Handling

All tools return descriptive error messages if:

  • DATA files are not found
  • Flow executable is not available
  • Output directories cannot be created
  • Processes cannot be stopped
  • PRT files cannot be read

Environment Variables

  • OPM_PROJECT_ROOT: Used to resolve paths in Docker environments
  • OPM_FLOW_EXTRA_ARGS: Additional arguments passed to Flow (e.g., --CheckSatfuncConsistency=0)

References

  • Tool Decision Tree - Routing logic
  • Simulation Tools README - Detailed tool documentation

Other skills for the same job

different authors, same section of the catalogue
MCP Deploy Manage Agents
by github
vendor ×1

Skill converted from mcp-deploy-manage-agents.prompt.md

2k tokens
Cloud Claw Launch Agent
by internet-court
×1

Use this skill when the user wants to launch a new AltClaw, OpenClaw, PicoClaw, or Ottie deployment through Cloud Claw. Covers the same user-facing fields and constraints exposed in the Cloud Claw UI, using the local altllm cloud-claw-* commands. Do NOT use for post-launch lifecycle tasks like start/stop/delete/logs; use cloud-claw-manage-vm.

1k tokens
Hosted Agents V2 Py
by lingxling
×1

Build hosted agents using Azure AI Projects SDK with ImageBasedHostedAgentDefinition. Use when creating container-based agents in Azure AI Foundry.

2k tokens
Cloudflare MCP Server
by ComeOnOliver
×1

Build MCP (Model Context Protocol) servers on Cloudflare Workers with tools, resources, and prompts.

49k tokens scripts
When Chaining Agent Pipelines Use Stream Chain
by ComeOnOliver
×1

Chain agent outputs as inputs in sequential or parallel pipelines for data flow orchestration

5k tokens
Clone Audit Mrlv3nl4
by nexu-io

Audit cloned or reimplemented websites for fidelity gaps, tracking scripts, source-brand and language residue, placeholders, and risky external dependencies. Use before handoff or deployment, or when asked to review a website clone for cleanup and readiness.

2k tokens
Hermes Tweet
by wshobson

> Install and operate Hermes Tweet, a Hermes Agent plugin for X/Twitter research, timeline reading, tweet analysis, and approval-gated tweet actions. Use this skill when installing Hermes Tweet, researching X/Twitter accounts, monitoring launch signals, investigating mentions, auditing giveaways, or preparing guarded tweet actions. Use proactively when a Hermes Agent workflow needs current X/Twitter context. Requires XQUIK_API_KEY for read and action tools.

2k tokens
Arize Evaluator
by github
vendor

Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and continuous monitoring. Use when the user mentions create evaluator, LLM judge, hallucination, faithfulness, correctness, relevance, run eval, score spans, score experiment, trigger-run, column mapping, continuous monitoring, or improve evaluator prompt.

10k tokens

How to use it

Copy the folder

Take nvidia/simulation_skill from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.