⚠️ 重要依赖说明 — 先看这里再安装本技能不包含 itasca-mcp 和 itasca-mcp-bridge。它们是 yusong652 的独立项目,需要单独安装。
你需要准备:
- Itasca 引擎(FLAC3D / PFC3D / 3DEC 等)— 你已有的数值模拟软件
- itasca-mcp-bridge — 在引擎的嵌入式 Python 中安装并启动:
首次安装指南:https://raw.githubusercontent.com/yusong652/itasca-mcp/main/docs/agentic/itasca-mcp-bootstrap.mdimport itasca_mcp_bridge; itasca_mcp_bridge.start()- itasca-mcp(可选,仅交互模式需要)—
uvx itasca-mcp或pip install itasca-mcp本技能只负责"编排流程"(生成工况 → 提交计算 → 汇总结果),不负责"控制引擎"。
A Claude Code skill that turns a recurring Itasca research chore — run a model across a parameter space, collect outputs, see how the response changes — into a standardised, resumable workflow. Built on top of the existing itasca-mcp bridge: this skill does not re-implement Itasca control. The bridge owns the engine connection; this skill is the orchestration layer above it — config, case generation, logs, result aggregation, regression, plotting, and grid-mode calibration.
Supports all Itasca engines the bridge supports: FLAC3D, PFC3D, 3DEC, UDEC, MassFlow, MPoint. The generated per-case engine script is stdlib-only and version-safe across engine 6 / 7 / 9.
config.yaml + template.dat
→ generate_cases.py expands the parameter space, renders one folder per case
→ run_study.py autonomous sweep (talks to the bridge over HTTP)
*or* the agent drives itasca_execute_task per case (interactive)
→ collect_results.py results.csv + regression report
→ calibrate.py rank cases vs a target (grid mode)
→ plot.py plots/*.png
Two execution modes, same generated cases:
- Autonomous sweep —
run_study.pysubmits every pending case to the bridge, polls to completion, captures logs, continues past failures. Fire and forget; resumable. - Interactive / MCP-driven — the agent calls
itasca_execute_task/check_task_status/execute_codeper case, reasoning between iterations. Use this for calibration loops and live inspection.
This is a self-contained, relocatable skill directory (the scripts locate their
own templates via __file__, so it works from any install path). Install it by
placing this directory where your Claude Code looks for skills:
# user-level (recommended — the bridge is machine-scoped)
cp -r itasca-parametric-skill ~/.claude/skills/
# or project-level
cp -r itasca-parametric-skill <project>/.claude/skills/Restart Claude Code; the skill auto-registers. It needs:
- The itasca-mcp bridge running inside the Itasca engine GUI — in the
engine's IPython console:
First-time setup (engine install, bridge pip-install, MCP client config): fetch and follow
import itasca_mcp_bridge itasca_mcp_bridge.start()
https://raw.githubusercontent.com/yusong652/itasca-mcp/main/docs/agentic/itasca-mcp-bootstrap.md. - Host Python 3.10+ with
pyyaml,pandas,matplotlibfor the skill scripts (pip install -r requirements.txt). The per-caserun.pythat runs inside the engine is stdlib-only and needs none of these.
# 1. author config.yaml + template.dat (copy examples/ as a base)
# 2. generate cases
python scripts/generate_cases.py --config path/to/config.yaml
# 3. run the sweep
python scripts/run_study.py --config path/to/config.yaml
# 4. collect + plot
python scripts/collect_results.py --config path/to/config.yaml
python scripts/calibrate.py --config path/to/config.yaml # if a target is set
python scripts/plot.py --config path/to/config.yamlRe-running any step is safe — completed cases are skipped, so you can
interrupt and resume. Check progress with python scripts/status.py --config ….
examples/flac3d_tunnel_sigma3/— FLAC3D anisotropic tunnel, dip-angle sweep, crown-displacement + unbalanced-ratio extraction. Single parameter with twoexpr-derived parameters.examples/pfc3d_ucs_fric/— PFC3D bonded-ball block, 2-parameter (friction × stiffness) Cartesian sweep, plus a commented calibration target.
SKILL.md— the orchestration guide the agent followsreferences/mcp_tools.md— itasca-mcp tool signatures + response envelope (for interactive mode)references/config.md— fullconfig.yamlreference
- No subprocess / no license / no stdout parsing in the skill. The bridge already solves those. This skill is purely the research-workflow layer.
- Per-case
run.pyreadsmodel.datand replays it viaitasca.command(...), neverprogram call. On engine 6/7 and 9.0–9.6,program call '<file>.datblocks the bridge for the file's whole duration; the replay approach is version-safe and preserves per-command output and error locality. - FISH extraction via
fish define+call_function. Itasca 9'sitasca.fishhas noeval, so eachextract:expression is wrapped as a throwaway zero-arg FISH function and called — any intrinsic works. - No closed-loop optimizer in v1. Calibration is grid ranking + the agent
refining the grid between runs. A
scipy.optimize-backed closed loop is a documented future extension; v1 keeps the user in control of every model change, which suits the small parameter counts typical of geomechanics.