用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill cfd-pipeline-path-a-freecadcad-to-gmsh命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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 | cfd-pipeline-path-a-freecadcad-to-gmsh |
| description | Sub-skill of cfd-pipeline: Path A: FreeCAD/CAD to Gmsh (+3). |
| version | 1.0.1 |
| category | engineering |
| type | reference |
| scripts_exempt | true |
# 1. Export from FreeCAD to STEP/BREP
freecadcmd -c "
import FreeCAD, Part
doc = FreeCAD.openDocument('geometry.FCStd')
Part.export(doc.Objects, 'geometry.step')
"
# 2. Mesh with Gmsh
gmsh geometry.step -3 -format msh2 -o mesh.msh \
-clmin 0.01 -clmax 0.5 \
-algo del3d
# Convert Gmsh mesh to OpenFOAM format
gmshToFoam mesh.msh
# Fix boundary patches (Gmsh exports generic names)
# Edit constant/polyMesh/boundary to set correct patch types
# Automated Gmsh-to-OpenFOAM boundary patch fix
import re
from pathlib import Path
def fix_boundary_patches(case_dir, patch_map):
"""Fix boundary patch types after gmshToFoam conversion.
Args:
case_dir: OpenFOAM case directory
patch_map: dict of {patch_name: patch_type}
e.g. {'inlet': 'patch', 'outlet': 'patch', 'walls': 'wall'}
"""
boundary_file = Path(case_dir) / 'constant' / 'polyMesh' / 'boundary'
content = boundary_file.read_text()
for name, ptype in patch_map.items():
# Replace patch type for named patch
pattern = rf'({name}\s*\{{[^}}]*type\s+)\w+'
content = re.sub(pattern, rf'\g<1>{ptype}', content)
boundary_file.write_text(content)
# 1. Export STL from CAD (FreeCAD or external)
# Ensure STL is watertight and in meters
# 2. Create background mesh with blockMesh
blockMesh
# 3. Run snappyHexMesh
snappyHexMesh -overwrite
# Key files needed:
# - system/blockMeshDict (background mesh)
# - system/snappyHexMeshDict (refinement + snapping)
# - constant/triSurface/geometry.stl
def validate_geometry_to_mesh(stl_path, mesh_dir):
"""Validate the geometry-to-mesh conversion."""
import subprocess
checks = {"passed": True, "issues": []}
# Check STL is readable
import os
if not os.path.exists(stl_path):
checks["issues"].append(f"STL not found: {stl_path}")
checks["passed"] = False
return checks
stl_size = os.path.getsize(stl_path)
if stl_size < 100:
checks["issues"].append(f"STL suspiciously small: {stl_size} bytes")
checks["passed"] = False
# Check OpenFOAM mesh
polymesh = os.path.join(mesh_dir, 'constant', 'polyMesh', 'points')
if not os.path.exists(polymesh):
checks["issues"].append("No polyMesh/points — mesh conversion failed")
checks["passed"] = False
return checks
# Run checkMesh
result = subprocess.run(
['checkMesh', '-case', mesh_dir],
capture_output=True, text=True
)
if 'FAILED' in result.stdout:
checks["issues"].append()
checks[] =
re
cells_match = re.search(, result.stdout)
cells_match:
checks[] = (cells_match.group())
checks