Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

simulation-validator模拟验证器

Agent Skill

simulation-validator 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

612

周安装

25

GitHub Stars

31

下载量

196
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:simulation-validator(模拟验证器)
来源仓库:https://github.com/heshamfs/materials-simulation-skills
仓库路径:skills/simulation-validator
安装命令:
npx skills add https://github.com/heshamfs/materials-simulation-skills --skill simulation-validator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/heshamfs/materials-simulation-skills --skill simulation-validator

简介

simulation-validator 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 当前无原始 SKILL.md 内容可参考,实际功能以来源仓库为准。

SKILL.md

Simulation Validator

Goal

Provide a three-stage validation protocol: pre-flight checks, runtime monitoring, and post-flight validation for materials simulations.

Requirements

  • Python 3.8+
  • No external dependencies (uses Python standard library only)
  • Works on Linux, macOS, and Windows

Inputs to Gather

Before running validation scripts, collect from the user:

InputDescriptionExample
Config fileSimulation configuration (JSON/YAML)simulation.json
Log fileRuntime output logsimulation.log
Metrics filePost-run metrics (JSON)results.json
Required paramsParameters that must existdt,dx,kappa
Valid rangesParameter boundsdt:1e-6:1e-2

Decision Guidance

When to Run Each Stage

Is simulation about to start?
├── YES → Run Stage 1: preflight_checker.py
│         └── BLOCK status? → Fix issues, do NOT run simulation
│         └── WARN status? → Review warnings, document if accepted
│         └── PASS status? → Proceed to run simulation
│
Is simulation running?
├── YES → Run Stage 2: runtime_monitor.py (periodically)
│         └── Alerts? → Consider stopping, check parameters
│
Has simulation finished?
├── YES → Run Stage 3: result_validator.py
│         └── Failed checks? → Do NOT use results
│                            → Run failure_diagnoser.py
│         └── All passed? → Results are valid

Choosing Validation Thresholds

MetricConservativeStandardRelaxed
Mass tolerance1e-61e-31e-2
Residual growth2x10x100x
dt reduction10x100x1000x

Script Outputs (JSON Fields)

ScriptOutput Fields
scripts/preflight_checker.pyreport.status, report.blockers, report.warnings
scripts/runtime_monitor.pyalerts, residual_stats, dt_stats
scripts/result_validator.pychecks, confidence_score, failed_checks
scripts/failure_diagnoser.pyprobable_causes, recommended_fixes

Three-Stage Validation Protocol

Stage 1: Pre-flight (Before Simulation)

  1. Run scripts/preflight_checker.py --config simulation.json
  2. BLOCK status: Stop immediately, fix all blocker issues
  3. WARN status: Review warnings, document accepted risks
  4. PASS status: Proceed to simulation
python3 scripts/preflight_checker.py \
    --config simulation.json \
    --required dt,dx,kappa \
    --ranges "dt:1e-6:1e-2,dx:1e-4:1e-1" \
    --min-free-gb 1.0 \
    --json

Stage 2: Runtime (During Simulation)

  1. Run scripts/runtime_monitor.py --log simulation.log periodically
  2. Configure alert thresholds based on problem type
  3. Stop simulation if critical alerts appear
python3 scripts/runtime_monitor.py \
    --log simulation.log \
    --residual-growth 10.0 \
    --dt-drop 100.0 \
    --json

Stage 3: Post-flight (After Simulation)

  1. Run scripts/result_validator.py --metrics results.json
  2. All checks PASS: Results are valid for analysis
  3. Any check FAIL: Do NOT use results, diagnose failure
python3 scripts/result_validator.py \
    --metrics results.json \
    --bound-min 0.0 \
    --bound-max 1.0 \
    --mass-tol 1e-3 \
    --json

Failure Diagnosis

When validation fails:

python3 scripts/failure_diagnoser.py --log simulation.log --json

Conversational Workflow Example

User: My phase field simulation crashed after 1000 steps. Can you help me figure out why?

Agent workflow:

  1. First, check the log for obvious errors: python3 scripts/failure_diagnoser.py --log simulation.log --json
  2. If diagnosis suggests numerical blow-up, check runtime stats: python3 scripts/runtime_monitor.py --log simulation.log --json
  3. Recommend fixes based on findings:

- If residual grew rapidly → reduce time step - If dt collapsed → check stability conditions - If NaN detected → check initial conditions

Error Handling

ErrorCauseResolution
Config not foundFile path invalidVerify config path exists
Non-numeric valueParameter is not a numberFix config file format
out of rangeParameter outside boundsAdjust parameter or bounds
Output directory not writablePermission issueCheck directory permissions
Insufficient disk spaceDisk nearly fullFree up space or reduce output

Interpretation Guidance

Status Meanings

StatusMeaningAction
PASSAll checks passedProceed with confidence
WARNNon-critical issues foundReview and document
BLOCKCritical issues foundMust fix before proceeding

Confidence Score Interpretation

ScoreMeaning
1.0All validation checks passed
0.75+Most checks passed, minor issues
0.5-0.75Significant issues, review carefully
< 0.5Major problems, do not trust results

Common Failure Patterns

Pattern in LogLikely CauseRecommended Fix
NaN, Inf, overflowNumerical instabilityReduce dt, increase damping
max iterations, did not convergeSolver failureTune preconditioner, tolerances
out of memoryMemory exhaustionReduce mesh, enable out-of-core
dt reducedAdaptive stepping triggeredMay be okay if controlled

Security

Input Validation

  • Config file paths are validated for existence before parsing; non-existent paths produce clear errors
  • --required parameter names are validated against a safe-character allowlist
  • --ranges entries are parsed as name:min:max with finite numeric bounds enforced
  • --min-free-gb is validated as a finite positive number
  • --residual-growth and --dt-drop thresholds are validated as finite positive numbers
  • --bound-min, --bound-max, and --mass-tol are validated as finite numbers with bound-max > bound-min

File Access

  • preflight_checker.py reads a single user-specified config file (JSON/YAML) and checks disk space on the output directory
  • runtime_monitor.py reads a single log file specified by --log; log files are size-limited (500 MB max) before parsing
  • result_validator.py reads a single metrics file (JSON) specified by --metrics
  • failure_diagnoser.py reads a single log file specified by --log
  • No scripts write to the filesystem; all output goes to stdout

Tool Restrictions

  • Read: Used to inspect script source, references, config files, and simulation logs
  • Bash: Used to execute the four Python validation scripts (preflight_checker.py, runtime_monitor.py, result_validator.py, failure_diagnoser.py) with explicit argument lists
  • Write: Used to save validation reports; writes are scoped to the user's working directory
  • Grep/Glob: Used to locate log files, config files, and search references

Safety Measures

  • No eval(), exec(), or dynamic code generation
  • All subprocess calls use explicit argument lists (no shell=True)
  • Log parsing uses pre-compiled regex patterns; user-supplied patterns are not accepted (patterns are hardcoded)
  • Phase names and diagnostic strings extracted from logs are sanitized (truncated, control characters stripped) before inclusion in output

Limitations

  • Not a real-time monitor: Scripts analyze logs after-the-fact
  • Regex-based: Log parsing depends on pattern matching; may miss unusual formats
  • No automatic fixes: Scripts diagnose but don't modify simulations

References

  • references/validation_protocol.md - Detailed checklist and criteria
  • references/log_patterns.md - Common failure signatures and regex patterns

Version History

  • v1.1.0 (2024-12-24): Enhanced documentation, decision guidance, Windows compatibility
  • v1.0.0: Initial release with 4 validation scripts

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.58%
按下载量换算72

Claude

30.59%
按下载量换算60

Cursor

16.33%
按下载量换算32

Gemini CLI

8.37%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/heshamfs/materials-simulation-skills --skill simulation-validator 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills