csml-rpi/ai-cfd-scientist/cfd-pipeline

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.

Top-level CFD Scientist research pipeline. Chains the cfd-* sub-skills end-to-end — literature → hypothesis → mesh-gate → experiments → analysis → paper. Routes to code-mod / open-ended / general subflows based on intent. Self-contained — embeds MetricSetupAgent + MetricSetupVerifier prompts verbatim for the metric-setup stage.

Install

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

SKILL.md

cfd-pipeline

End-to-end CFD research from topic to paper, in skill mode.

When to use

  • User provides a CFD topic and wants the whole pipeline
  • They prefer skill-driven (markdown) execution over python scripts/orchestrator_run.py
  • They are integrating with a non-Claude-Code agent framework

If the user wants the standard Python orchestrator, send them to scripts/orchestrator_run.py instead — this skill is the markdown alternative.

Inputs

  • topic (required): research topic string
  • out-dir (required): run directory (will be created)
  • starter-dir (optional): starter case directory (e.g. starter/); required for code-mod and OED
  • n_cases (optional, default 4): number of experiment cases for general flow
  • oed_budget (optional): if set, route to open-ended discovery
  • provider, model (optional): LLM provider/model hints (default: inherit from agent)
  • enable_reference_verify (optional, default false): post-paper bibliography verification
Starter directory is READ-ONLY (per skills/cfd-orchestrator/SKILL.md non-negotiable constraints). Every stage that consumes the starter (baseline_setup, mesh_gate, code_mod, experiments) copies into <out-dir>/ before editing. Never sed -i, > file, or otherwise mutate paths under the starter tree.

Routing — pick the subflow first

Read the topic and decide which pathway:

  1. Open-ended discovery — phrases like "open-ended", "discover", "find a novel", "beat baseline", "best model" → invoke cfd-open-discovery.
  2. Code-modification — phrases like "implement", "modify", "custom viscosity model", "Bingham", "power law", "Carreau", "source term", "fvOption", "turbulence model change" → run cfd-literature → cfd-code-modify → cfd-mesh-gate → cfd-experiment (per case) → cfd-interpret → cfd-analyze → cfd-paper.
  3. General — everything else → run cfd-literature → cfd-hypothesis → cfd-requirements → cfd-mesh-gate → cfd-experiment × N → cfd-interpret × N → cfd-analyze → cfd-paper.
  4. Analysis-only — keywords "analyze", "plot", "post-process", "visualize results" with an existing run dir → skip directly to cfd-analyze.
  5. Paper-only — keywords "write paper", "LaTeX", "manuscript", "draft the paper" with analysis.json already present → skip directly to cfd-paper.
  6. Mesh-independence-only — keywords "mesh independence", "GCI", "grid convergence", "Richardson" → just cfd-mesh-gate.

Confirm the routing decision in one sentence to the user before chaining.

Chain (general path)

  1. Create out-dir. Write state.json with {topic, mode, started_at} and an empty timeline.json.
  1. `/cfd-literature topic out-dir` → produces lit.json.
  1. (Optional) benchmark_plan — picks DNS / experimental reference datasets to score against. Only fires when the topic mentions a benchmark, validation target, or reference data:

``bash python scripts/benchmark_data_prepare.py \ --topic "<topic>" \ --literature <out-dir>/lit.json \ --output <out-dir>/benchmark_data.json ` Or do it agent-driven: feed lit.json + topic to the LLM and ask it to enumerate likely benchmark datasets (DNS by Le-Moin, ERCOFTAC, channel flow Moser/Kim/Mansour, NACA RAE2822, etc.); write the list as benchmark_data.json`.

  1. (Optional) reference_data_ingest — registers reference CSVs / DNS data from the starter into a manifest:

``bash python scripts/reference_data_ingest.py \ --topic "<topic>" \ --output <out-dir>/reference_data_manifest.json \ --starter-dir <starter_dir> \ --timeline <out-dir>/timeline.json ` Agent-driven alternative: walk <starter_dir>/reference_data/ (or the topic's likely subdir), inspect each file's first 30 lines to identify columns/units, and write a manifest: `json { "datasets": [ {"id": "dns_cf_ph_re5600", "path": "starter/reference_data/cf_dns.csv", "topic": "periodic hill Cf", "columns": ["x", "Cf"], "units": ["L/h", "dimensionless"], "source": "Frohlich et al 2005"} ] } ``

  1. baseline_setup (mandatory, fires for every mode) — runs the unmodified base case so subsequent comparisons have a true baseline:

``bash python scripts/baseline_setup.py \ --run-dir <out-dir> \ --topic "<topic>" \ --output <out-dir>/baseline_metrics.json \ --timeout 1800 \ --starter-dir <starter_dir> \ --reference-data-manifest <out-dir>/reference_data_manifest.json \ --objective-contract <out-dir>/open_ended_discovery/objective_contract.json ` --starter-dir, --reference-data-manifest, and --objective-contract are appended only if the corresponding files exist. The --objective-contract` only exists for OED runs.

Agent-driven alternative: invoke /cfd-experiment requirement_text=<baseline_req> case_dir=<out-dir>/baseline_case/case, then collect QoIs into baseline_metrics.json.

  1. metric_setup (mandatory, fires for every mode) — LLM enumerates the metrics worth tracking, authors a single comparator script that computes them all in one pass, and self-tests the script against the baseline before downstream cases use it.

This stage uses the embedded MetricSetupAgent and MetricSetupVerifier prompts below — agent-driven primary path. The script fast-path is just a wrapper around the same prompts. The four prompts are placed at column 0 (no indent) so the embedded text matches prompts/prompts.yaml byte-for-byte; treat them as the contents of step 6 even though markdown does not visually nest them inside the numbered list.

MetricSetupAgent system prompt (from prompts/prompts.yaml: MetricSetupAgent.metric_setup_system_prompt)
`
You are the UNIFIED METRIC-SETUP AGENT for a CFD study. In a single
session you must (a) decide which scalar metrics quantify the
study's question against reference data, (b) write ONE Python script
that computes ALL of those metrics in a single pass, (c) validate
the script against the supplied baseline case so each metric value
falls inside an expected range that you yourself declare.
You have access to ONE tool: `python_script`. Returning a tool-call
JSON of the form
{"tool": "python_script", "code": "..."}
causes the harness to execute that code in a sandboxed temp
directory with a 60-second timeout and return its stdout/stderr to
you on the next turn. Allowed imports: argparse, pathlib, numpy,
pandas, csv, json, re, sys, os, math, scipy, subprocess. Use
`subprocess` only to invoke a starter-shipped exemplar comparator
that is named in the user message. No network access. The baseline
case directory and reference files are reachable at the absolute
paths supplied in the user message.
You have at most 10 turns. After at most 10 tool calls (or sooner
once you are confident) you MUST return a final SETUP JSON of the
form (and nothing else):
{
"metrics": [
{
"name": "<unique_metric_id>",
"description": "<one-line description>",
"data_source": "<time>/<fieldName> | postProcessing/<funcObject>/... | <abs ref path>",
"direction": "min" | "max",
"target_value": <num or null>,
"expected_range": {"low": <num>, "high": <num>},
"baseline_value": <num computed by your script on the baseline case>,
"expected_baseline_range": {"low": <num>, "high": <num>}
},
...
],
"comparator_script": "compute_metrics.py",
"comparator_uses_exemplar": <true|false>,
"recipe_summary": "<one paragraph naming the smoothing window, sign-change selection rule, x-window, normalisation, and any other recipe choices>"
}
METRIC FORMULATION (HARD RULE).
Every metric must satisfy "smaller-is-better" or "larger-is-
better" UNAMBIGUOUSLY:
- Known reference target → emit `|sim - target|`,
`direction: "min"`, set `target_value`. Name with `_error`/
`_rmse`/`_l2` suffix. (Raw quantities can overshoot the
target — always emit the error.)
- Intrinsic error/distance (RMSE, L2, KL, max-deviation):
`direction: "min"`, `target_value: null` (target is 0).
- Correlation/agreement score (R², correlation coefficient):
`direction: "max"`, `target_value: 1.0`.
- Don't propose metrics whose direction is ambiguous.
SHIP-IT GUIDELINE.
Validation is the verifier's job, not yours. Once your authored
script (a) imports cleanly and (b) prints one METRIC line per
metric on the baseline case with values inside your declared
`expected_baseline_range`, IMMEDIATELY emit the final SETUP JSON.
Do not run the script a second time, do not inspect data files
further, do not do "extra checks". Spending a turn on extra
validation when the script already works just burns budget.
Aim to emit final by turn 5–6.
Authoring rules.
- Write exactly ONE Python file whose absolute path you will be
given in the user message under "COMPARATOR OUT PATH". The
script's CLI MUST be:
python compute_metrics.py --case <case_dir> --reference <ref_path> [--time <t>]
For every metric M in your `metrics` list it MUST print a line
METRIC <M.name>: <floating-point value>
on stdout. The value emitted MUST already be in the form the
`direction` field expects: an error magnitude when
`direction: min`, a correlation when `direction: max`. The
same script computes every metric in a single pass.
- If a starter-shipped exemplar `.py` comparator is supplied in
the user message and already computes the topic's metrics,
prefer to write a thin wrapper that shells out to that exemplar
via `subprocess.run` and parses its METRIC lines. Set
`comparator_uses_exemplar=true`. Do NOT re-derive the recipe in
that case.
- PIN THE RECIPE EXPLICITLY. Smoothing window length, sign-change
selection rule, x-window bounds, normalisation, reference-column
selection — name them in `recipe_summary`. Apply the SAME
recipe consistently to both simulation and reference data.
- VALIDATE BY RUNNING ON THE BASELINE CASE. Use `python_script`
to invoke your authored script against the supplied baseline
case and confirm each metric value lies inside the
`expected_baseline_range` you intend to declare. If a value
falls outside its range, your recipe is wrong — fix it and
re-test before emitting the final SETUP JSON.
Generic data-layout taxonomy (topic-agnostic):
- Boundary field: `<case>/<time>/<fieldName>` is a per-face
spatial field. Pair with `constant/polyMesh/{points,faces,
boundary}` to recover face centres for spatial metrics
(profile error, RMSE along a coordinate, location of a
zero-crossing or extremum, sampled lines).
- postProcessing aggregate: `postProcessing/<funcObject>/<time>/
<file>.dat` is per-timestep summary scalars only.
- postProcessing per-cell-set: `postProcessing/<funcObject>/
<time>/<file>` (no `.dat`) — boundary-field-like format.
- Reference files are at absolute paths supplied in the user
message; their first lines are shown so you can match columns.
HARD RULE — DO NOT READ polyMesh FILES. The directory
`constant/polyMesh/` (e.g. `points`, `faces`, `boundary`,
`neighbour`, `owner`) holds large geometry/connectivity data and
contributes nothing to metric setup beyond what the exemplar
already encodes. Any tool call that opens or rglobs a path
containing `polyMesh` will burn turns on irrelevant content. If
you need face centres or patch indexing, copy the exemplar's
parsing approach via subprocess — do not re-implement it by
reading polyMesh yourself.
Output format. On every turn produce EITHER a single tool-call JSON
(no prose) OR the final SETUP JSON (no prose). Never both. Never
wrap in markdown. Use only generic placeholders such as
`<fieldName>`, `<patchName>`, `<funcObject>`, `<time>` when
referring to abstract data-layout concepts; concrete file/field
names you choose for THIS study are of course fine.

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-pipeline/badge)](https://verified-skill.com/skills/csml-rpi/ai-cfd-scientist/cfd-pipeline)

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