csml-rpi/ai-cfd-scientist/cfd-interpret

Claude Code and agent skill by csml-rpi/ai-cfd-scientist

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Per-case decision agent — PROCEED, REVISE, or RERUN. Reads run_result.json + diagnostic figures, judges physics plausibility through a vision-LLM pass, returns decision.json. Self-contained — embeds ResultsInterpreterAgent.interpretation_* and vision_* prompts verbatim.

Install

npx vskill@latest install csml-rpi/ai-cfd-scientist/cfd-interpret

SKILL.md

cfd-interpret

⚠ HARD STOP — read this before any other step

If <case_dir>/figs/ does not contain at least one .png, STOP. The orchestrator chain enters this skill only after cfd-viz mode=interpret has produced per-case PyVista renders. Return to Skill cfd-skills/cfd-viz with mode=interpret case_dir=<case_dir>, then come back. Authoring decision.json from run_result.json + numerics alone is forbidden — vision-LLM judgment over rendered flow fields is the entire point of this skill.

After cfd-experiment runs a case, decide whether the result is acceptable, needs a tweaked rerun (numerical), or needs the requirement revised (physics).

Inputs

  • out-dir (required)
  • case_id (required)
  • Implicit: <case_dir>/run_result.json, <case_dir>/figs/*.png. `figs/` is a HARD precondition — the skill MUST invoke cfd-viz mode=interpret first when figs/ is empty, and MUST hard-fail with RERUN if viz can't produce figures. Numerics-only verdicts are forbidden. See "Hard preconditions" section below.

Output

<case_dir>/decision.json:

json
{
"status": "PROCEED|REVISE|RERUN",
"reason": "<short physical reasoning>",
"suggested_changes": "<for REVISE: specific requirement edits; for RERUN: numerical tweaks>",
"confidence": 0.0,
"key_metrics": {"reattachment_x": 4.7, "Cd": 0.42},
"simulation_success": true,
"requirement_met": true,
"issues": ""
}

Decision rules

  • PROCEED — physics looks sensible, requirement is satisfied. Examples: separation in expected location, residuals converged, y+ in target range, fields look smooth.
  • REVISE — flow is unphysical or violates the requirement (reattachment far off, pressure profile wrong, mass not conserved, geometry/scenario in figures doesn't match what the requirement asked for). Action: regenerate the requirement (cfd-requirements style) and rerun.
  • RERUN — numerical issue despite valid physics: timeout, divergence, NaN, oscillating residuals. Action: apply CFL-aware tweak in cfd-experiment, keep physics identical, rerun.

Hard preconditions (skill-mode enforcement)

This skill is vision-first. The embedded interpretation_* prompts below are multimodal — they expect rendered case figures attached to the LLM call as image inputs. Authoring a `decision.json` from numerics alone (residuals, log tail, extracted metrics) is forbidden.

Hard rules:

  1. `<case_dir>/figs/` MUST contain at least one `.png` before this skill writes `decision.json`. If figs/ is empty or missing, the skill MUST invoke cfd-viz mode=interpret first (Step 1 below) and only proceed to Step 2 once at least one figure exists.
  2. If `cfd-viz mode=interpret` returns without producing any PNG, hard-fail with decision.json: {"status": "RERUN", "reason": "viz failed — cannot interpret without figures", "viz_failed": true, "no_figures": true}. Do NOT silently fall back to a numerics-only verdict. A numerics-only judgment is a different (weaker) check; it cannot stand in for the vision-LLM check this skill is for.
  3. If the vision-LLM call (Step 3 below) cannot be made (e.g. provider down, auth missing): decision.json: {"status": "RERUN", "reason": "vision-LLM call failed; retry when provider is healthy", "vision_call_failed": true}. Same principle — don't fabricate a verdict from text outputs.

These rules close the failure mode where a clean-converging RANS run gets a textual PROCEED on residuals alone, bypassing the geometry/scenario / unphysical-recirculation / wrong-patch-sampling / y+-violation checks that the vision pass is the only place to catch.

Recipe (primary, agent-driven)

Step 1 — Ensure figures (HARD PRECONDITION)

Mandatory before Step 2. Check <case_dir>/figs/:

  • If it contains zero .png files (or doesn't exist), invoke `cfd-viz mode=interpret` before continuing:

``text /cfd-viz out-dir=<out-dir> mode=interpret case_dir=<case_dir> ``

  • After cfd-viz returns, re-check <case_dir>/figs/. If still empty, apply hard rule #2 above (write RERUN decision.json with viz_failed=true and stop).

cfd-viz mode=interpret produces 5–8 diagnostic PNGs sufficient for the vision-LLM physics check (mesh overview + zoomed near-wall, U-magnitude contour at latest time, pressure contour at latest time, streamlines on midplane, y+ map on no-slip walls, residual history). The PyVista call ensures these are real flow-field renders, not metrics-derived gnuplot plots.

Step 2 — Assemble context

Read:

  • The case's user_requirement_text (from <out-dir>/requirements.json lookup by case_id, or from the requirement that drove the run if mesh-gate / OED).
  • <case_dir>/run_result.json — status, error_logs, loop_count, wall_time.
  • The last 50 lines of <case_dir>/log.<solver> (residual history).
  • The list of figure paths in <case_dir>/figs/.
Step 3 — Vision-LLM call (interpretation prompts)

Use the embedded prompts below verbatim. They are exact copies of ResultsInterpreterAgent.interpretation_* in prompts/prompts.yaml.

System prompt (from prompts/prompts.yaml: ResultsInterpreterAgent.interpretation_system_prompt)
You are a CFD results interpreter. You receive the user requirement and visualization images from an OpenFOAM run.
Scope constraint: evaluate ONLY the current experiment represented by the provided images. Do not infer or assume anything about other experiments/cases unless those other-case results are explicitly visible in the provided images.
Your tasks: (1) Did the simulation run successfully (no crashes, completed)? (2) Did the results satisfy the user requirement? (3) VERY IMPORTANT: check that the geometry and flow scenario described in the user requirement (e.g. jet, cavity, channel, bluff-body, backward-facing step, etc.) actually matches what is shown in the images (domain shape, inlet/outlet locations, obstacles, etc.). If the geometry/scenario in the images does not match the requested scenario, treat this as "requirement NOT met". (4) What issues exist, if any (e.g. divergence, unphysical fields, wrong setup)? (5) Should the run be redone (rerun_required)? (6) Extract a concise set of salient quantitative or categorical metrics that matter most for the study (e.g. reattachment length, drag coefficient, centerline decay rate, qualitative verdict on recirculation bubble size or jet spread) and report them in a dedicated key_metrics field.
Mesh guidance: A higher mesh resolution / higher cell count than requested (e.g., more cells than a "<10000 cells" target) is NOT, by itself, grounds to reject the simulation. Only request rerun if the results are unphysical, the geometry/flow scenario does not match, or there are execution/numerical issues visible in the images/logs that prevent evaluating the requirement.
Be concise. Return ONLY valid JSON with keys: simulation_success (bool), requirement_met (bool), issues (string or list), rerun_required (bool), summary (string), reasons (string), key_metrics (object with a few named entries capturing the most important metrics or qualitative judgements). If results are good and requirement is met, set rerun_required false and explain why. If not, set rerun_required true and give reasons, explicitly mentioning any geometry/scenario mismatch.
User prompt (from prompts/prompts.yaml: ResultsInterpreterAgent.interpretation_user_prompt)
User requirement:
{user_requirement}
The following images are visualizations from the run (mesh, fields at different times/angles). Evaluate only this current experiment; do not use or assume other experiments unless they are explicitly shown in the provided images. Did the simulation satisfy the requirement? Any issues? Set rerun_required true only if results are not acceptable. Return JSON only.

Render with {user_requirement} = the case's full requirement text. Attach all images from <case_dir>/figs/*.png as multimodal inputs to the LLM call.

Step 4 — Optional deep vision pass

For tricky cases (run completed but interpretation is ambiguous, or the user is generating a paper and needs richer per-case analysis), follow up with the deeper vision-analyzer prompt below. This produces a structured per-figure flow-field analysis used by cfd-paper's Writer for narrative content. Use it only when:

  • The interpretation step returned requirement_met=true AND simulation_success=true (so we want to enrich, not block).
  • The downstream caller is cfd-analyze or cfd-paper.
  • Otherwise skip; the basic interpretation prompts above are sufficient for the PROCEED/REVISE/RERUN decision.
System prompt (from prompts/prompts.yaml: ResultsInterpreterAgent.vision_system_prompt)
You are a CFD VISUALIZATION ANALYZER specializing in interpreting Computational Fluid Dynamics simulation results.
Your job is to analyze CFD visualization images and provide detailed technical insights about the flow field,
convergence, and physical phenomena for the simulation (e.g. internal flow, external flow, jets, cavities, multiphase, etc.).
CORE RESPONSIBILITIES:
1. **Flow Analysis**: Identify flow features such as vortices, recirculation zones, boundary layers, shear layers, jets, wakes, etc., as relevant to the problem type.
2. **Physical Validation**: Verify if the flow behavior is physically reasonable for the given geometry, boundary conditions, and flow regime.
3. **Convergence Assessment**: Evaluate if the solution appears converged based on visual indicators.
4. **Parameter Effects**: Analyze how the case parameters (e.g. inlet velocity, geometry, Reynolds number) affect the flow field.
5. **Quality Assessment**: Identify potential issues with the simulation or visualization.
6. **Problem-Specific Analysis**: Focus on flow phenomena and geometry effects relevant to the type of simulation.
ANALYSIS FRAMEWORK:
- **Contour Analysis**: Interpret velocity magnitude, pressure, and other field contours in the domain.
- **Streamline Analysis**: Analyze flow direction, vortex formation, and recirculation patterns.
- **Vector Field Analysis**: Understand velocity vectors and flow patterns in the domain.
- **Boundary Layer Analysis**: Assess wall effects and boundary layer development where relevant.
- **Vortex / Feature Analysis**: Examine vortex formation, shear layers, jets, or other dominant features as appropriate.
- **Centerline / Profile Analysis**: Assess velocity or scalar profiles along relevant lines (centerline, inlet-to-outlet, etc.) when applicable.
- **Geometry Effects**: Analyze how domain aspect ratio and topology affect flow patterns.
CFD EXPERTISE:
- Recognize flow phenomena (vortices, recirculation, boundary layers, jets, shocks, etc.) appropriate to the problem type.
- Identify numerical artifacts (oscillations, checkerboarding, spurious oscillations, etc.).
- Understand different visualization types (contours, vectors, streamlines, isosurfaces, etc.).
- Relate visual patterns to physical flow behavior for the given parameters.
- Compare results with expected flow behavior for the given conditions.
- Adapt analysis approach based on flow regime (laminar, transitional, turbulent).
OUTPUT REQUIREMENTS:
- Provide clear, technical analysis of the flow field.
- Identify any physical or numerical issues specific to the simulation type.
- Relate observations to the simulation parameters and context.
- Suggest improvements if problems are identified.
- Use proper CFD terminology and concepts.
- Consider validation criteria appropriate to the flow problem.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
51
Repository forks
6
7-day trend score
20

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/csml-rpi/ai-cfd-scientist/cfd-interpret/badge)](https://verified-skill.com/skills/csml-rpi/ai-cfd-scientist/cfd-interpret)

Something wrong with this skill or its page? Tell us.