用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill paraview-interface-verify-data-range命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
正在显示 SKILL.md
基于 SOC 职业分类
| name | paraview-interface-verify-data-range |
| description | Sub-skill of paraview-interface: Verify Data Range (+2). |
| version | 1.1.0 |
| category | engineering |
| type | reference |
| scripts_exempt | true |
def validate_data_ranges(source, expected_ranges):
"""Validate that data arrays are within expected ranges.
Args:
source: ParaView source/filter
expected_ranges: dict of {'array_name': (min, max)}
"""
source.UpdatePipeline()
data_info = source.GetDataInformation()
checks = {"passed": True, "issues": []}
for name, (exp_min, exp_max) in expected_ranges.items():
array_info = data_info.GetArrayInformation(name, 0) # 0=point, 1=cell
if not array_info:
array_info = data_info.GetArrayInformation(name, 1)
if not array_info:
checks["issues"].append(f"Array '{name}' not found")
checks["passed"] = False
continue
data_range = array_info.GetComponentRange(0)
if data_range[0] < exp_min * 0.5 or data_range[1] > exp_max * 2.0:
checks["issues"].append(
f"{name}: range [{data_range[0]:.3f}, {data_range[1]:.3f}] "
f"outside expected [{exp_min}, {exp_max}]"
)
checks["passed"] = False
return checks
# Example: validate typical CFD ranges
validate_data_ranges(reader, {
'p': (-1e5, 1e5), # Pressure (Pa, relative)
'U': (-50, 50), # Velocity (m/s)
'k': (0, 100), # Turbulent kinetic energy
'omega': (0, 1e6), # Specific dissipation rate
})
import os
def validate_screenshots(output_dir, expected_count=1, min_size_kb=10):
"""Validate that screenshots were generated correctly."""
checks = {"passed": True, "issues": [], "files": []}
images = [f for f in os.listdir(output_dir)
if f.endswith(('.png', '.jpg', '.tiff'))]
if len(images) < expected_count:
checks["issues"].append(
f"Expected {expected_count} images, found {len(images)}"
)
checks["passed"] = False
for img in images:
path = os.path.join(output_dir, img)
size_kb = os.path.getsize(path) / 1024
checks["files"].append({"name": img, "size_kb": size_kb})
if size_kb < min_size_kb:
checks["issues"].append(f"{img}: {size_kb:.1f} KB — likely blank render")
checks["passed"] = False
return checks
def validate_openfoam_for_paraview(case_dir):
"""Check that OpenFOAM case is ready for ParaView visualization."""
import os
checks = {"passed": True, "issues": []}
# Check polyMesh exists
polymesh = os.path.join(case_dir, 'constant', 'polyMesh')
if not os.path.isdir(polymesh):
checks["issues"].append("No constant/polyMesh/ — mesh not generated")
checks["passed"] = False
# Check time directories
time_dirs = [d for d in os.listdir(case_dir)
if d.replace('.', '').isdigit() and d != '0']
if not time_dirs:
checks["issues"].append("No result time directories — simulation not run")
checks["passed"] = False
else:
checks["time_dirs"] = len(time_dirs)
# Check for .foam file
foam_files = [f for f in os.listdir(case_dir) if f.endswith('.foam')]
if not foam_files:
checks["issues"].append("No .foam file — create with: touch case.foam")
return checks