openfoam-sim

openfoam-sim is a skill for Claude Code, Codex from svd-ai-lab/sim-plugin-openfoam. It costs 58 tokens per session (1,952 once invoked), scanned A, original, Apache-2.0.

A guide for using sim-cli to run, inspect, and debug OpenFOAM computational fluid dynamics cases. It covers case setup, solver runs, logs, results, and repeatable workflows.

In plain words
What is it for?
Running simulations, checking case files, diagnosing solver logs, reviewing result files, and handling benchmark or replayable CFD tasks.
Why use it?
It gives a coding agent a structured way to work with OpenFOAM cases instead of relying on ad hoc commands or guesswork.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions Codex.

Good fit Running simulations, checking case files, diagnosing solver logs, reviewing result files, and…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/svd-ai-lab/sim-plugin-openfoam/openfoam
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add svd-ai-lab/sim-plugin-openfoam --skill openfoam
Clone the repo
git clone --depth 1 https://github.com/svd-ai-lab/sim-plugin-openfoam

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openfoam-sim

README.md
[![agentmods](https://agentmods.dev/badge/skills/svd-ai-lab/sim-plugin-openfoam/openfoam.svg)](https://agentmods.dev/skills/svd-ai-lab/sim-plugin-openfoam/openfoam)
Your own site
<a href="https://agentmods.dev/skills/svd-ai-lab/sim-plugin-openfoam/openfoam"><img src="https://agentmods.dev/badge/skills/svd-ai-lab/sim-plugin-openfoam/openfoam.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.01952
Opus 5 $0.00029 $0.00976
Sonnet 5 $0.00012 $0.00390
Haiku 4.5 $0.00006 $0.00195

Measured 6d ago against content hash 679e92b1aa5c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

openfoam-sim scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (tests/fixtures/cavity_setup.sh, tests/fixtures/hello_foam.py, tests/test_driver.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/sim_plugin_openfoam/_skills/openfoam/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

openfoam-sim

You are driving OpenFOAM through sim-cli. This file is the index. Detail lives in references/ — load progressively, only what the task needs.


How to load this skill

Don't read every reference up front — context is precious. Walk this list:

  1. Always read references/case-setup.md before authoring any case.
  2. Pick a solver via references/solver-selection.md.
  3. Look up the fields & dictionaries you'll need in references/field-and-dictionary-matrix.md.
  4. For boundary conditions: references/boundary-conditions.md.
  5. If the case has turbulence: references/turbulence-setup.md.
  6. If the case is multiphase / VOF: references/multiphase-vof.md.
  7. If the case has heat or buoyancy: references/heat-transfer.md (and references/conjugate-heat-transfer.md for solid+fluid).
  8. For mesh generation: references/mesh-and-blockmesh.md.
  9. For schemes / solvers / relaxation: references/numerics-and-schemes.md.
  10. For runtime monitors / probes / forces: references/function-objects.md.
  11. For parallel execution and decomposition: references/parallel-execution.md.
  12. For runtime log diagnosis: references/log-parsing-and-residuals.md.
  13. For post-processing (sample lines, point queries, integrals): references/post-processing.md.
  14. For complete case skeletons by scenario: references/case-recipes.md.
  15. When something fails: references/error-recovery.md — decision tree + fix sequences.

sim-cli integration (one-shot mode)

Most benchmark/single-shot use is one-shot:

# 1. Write your driver script. Conventionally `solve.py`.
#    The script invokes blockMesh / solver / postProcess via subprocess,
#    parses the result, and writes the answer to disk.

# 2. Run via sim-cli:
uv run sim run solve.py --solver openfoam

# sim wraps the script in a RunResult (exit_code, stdout, stderr, duration,
# errors) and stores it under `.sim/runs/`. Browse with:
uv run sim logs                     # list runs
uv run sim logs last                # full last RunResult
uv run sim logs last --field exit_code

Read the full file on GitHub · 162 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 162 lines · 58 tokens per session scan A 679e92b1aa5c

Subscribe to this mod's changes

openfoam-sim is a skill published in the GitHub repository svd-ai-lab/sim-plugin-openfoam (5 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 58 tokens to every session and 1,952 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.