Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
beita6969 avatar

Mesh Generation

  • 16 installs
  • 869 repo stars
  • Updated June 8, 2026
  • beita6969/scienceclaw

mesh-generation is a Claude skill for planning and evaluating mesh resolution and quality for numerical PDE simulations.

About

This skill provides a workflow for choosing mesh resolution and checking mesh quality for PDE simulations. It runs stdlib Python scripts to compute grid sizing and evaluate aspect ratio and skewness against thresholds. Developers use it when planning grid resolution or adaptive mesh refinement, but it only recommends sizing and does not generate meshes.

  • Plan and evaluate mesh generation for numerical PDE simulations
  • Selects grid resolution and checks aspect ratio and skewness
  • Pure-stdlib Python scripts for grid sizing and mesh quality

Mesh Generation by the numbers

  • 16 all-time installs (skills.sh)
  • Ranked #1,318 of 2,065 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
At a glance

mesh-generation capabilities & compatibility

Free; requires only Python 3.8+ with no external dependencies.

Capabilities
molecular dynamics · math computation · materials screening
Use cases
data analysis · research
Pricing
Free
From the docs

What mesh-generation says it does

Plan and evaluate mesh generation for numerical simulations.
SKILL.md
Python 3.8+ - No external dependencies (uses stdlib)
SKILL.md
**No mesh generation**: Sizing recommendations only
SKILL.md
npx skills add https://github.com/beita6969/scienceclaw --skill mesh-generation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs16
repo stars869
Last updatedJune 8, 2026
Repositorybeita6969/scienceclaw

What it does

Select grid resolution and check aspect ratio and skewness for PDE simulation meshes using stdlib Python scripts.

Who is it for?

Choosing grid resolution, checking aspect ratios/skewness, and planning adaptive mesh refinement.

Skip if: Actual unstructured mesh generation (sizing recommendations only).

When should I use this skill?

You need to select mesh resolution or evaluate mesh quality for a PDE discretization.

What you get

Recommends grid sizing and flags aspect-ratio and skewness quality issues.

  • Grid sizing JSON (dx, nx, ny, nz)
  • Mesh quality JSON (aspect_ratio, skewness, quality_flags)

By the numbers

  • 2 mesh quality scripts
  • 5-item pre-mesh checklist
  • Aspect ratio threshold 5:1, skewness threshold 0.8

Files

SKILL.mdMarkdownGitHub ↗

Mesh Generation

Goal

Provide a consistent workflow for selecting mesh resolution and checking mesh quality for PDE simulations.

Requirements

  • Python 3.8+
  • No external dependencies (uses stdlib)

Inputs to Gather

InputDescriptionExample
Domain sizePhysical dimensions1.0 × 1.0 m
Feature sizeSmallest feature to resolve0.01 m
Points per featureResolution requirement10 points
Aspect ratio limitMaximum dx/dy ratio5:1
Quality thresholdSkewness limit< 0.8

Decision Guidance

Resolution Selection

What is the smallest feature size?
├── Interface width → dx ≤ width / 5
├── Boundary layer → dx ≤ layer_thickness / 10
├── Wave length → dx ≤ lambda / 20
└── Diffusion length → dx ≤ sqrt(D × dt) / 2

Mesh Type Selection

ProblemRecommended Mesh
Simple geometry, uniformStructured Cartesian
Complex geometryUnstructured triangular/tetrahedral
Boundary layersHybrid (structured near walls)
Adaptive refinementQuadtree/Octree or AMR

Script Outputs (JSON Fields)

ScriptKey Outputs
scripts/grid_sizing.pydx, nx, ny, nz, notes
scripts/mesh_quality.pyaspect_ratio, skewness, quality_flags

Workflow

1. Estimate resolution - From physics scales 2. Compute grid sizing - Run scripts/grid_sizing.py 3. Check quality metrics - Run scripts/mesh_quality.py 4. Adjust if needed - Fix aspect ratios, reduce skewness 5. Validate - Mesh convergence study

Conversational Workflow Example

User: I need to mesh a 1mm × 1mm domain for a phase-field simulation with interface width of 10 μm.

Agent workflow: 1. Compute grid sizing:

   python3 scripts/grid_sizing.py --length 0.001 --resolution 200 --json

2. Verify interface is resolved: dx = 5 μm, interface width = 10 μm → 2 points per interface width. 3. Recommend: Increase to 500 points (dx = 2 μm) for 5 points across interface.

Pre-Mesh Checklist

  • [ ] Define target resolution per feature/interface
  • [ ] Ensure dx meets stability constraints (see numerical-stability)
  • [ ] Check aspect ratio < limit (typically 5:1)
  • [ ] Check skewness < threshold (typically 0.8)
  • [ ] Validate mesh convergence with refinement study

CLI Examples

# Compute grid sizing for 1D domain
python3 scripts/grid_sizing.py --length 1.0 --resolution 200 --json

# Check mesh quality
python3 scripts/mesh_quality.py --dx 1.0 --dy 0.5 --dz 0.5 --json

# High aspect ratio check
python3 scripts/mesh_quality.py --dx 1.0 --dy 0.1 --json

Error Handling

ErrorCauseResolution
length must be positiveInvalid domain sizeUse positive value
resolution must be > 1Insufficient pointsUse at least 2
dx, dy must be positiveInvalid spacingUse positive values

Interpretation Guidance

Aspect Ratio

Aspect RatioQualityImpact
1:1ExcellentOptimal accuracy
1:1 - 3:1GoodAcceptable
3:1 - 5:1FairMay affect accuracy
> 5:1PoorSolver issues likely

Skewness

SkewnessQualityImpact
0 - 0.25ExcellentOptimal
0.25 - 0.50GoodAcceptable
0.50 - 0.80FairMay affect accuracy
> 0.80PoorLikely problems

Resolution Guidelines

ApplicationPoints per Feature
Phase-field interface5-10
Boundary layer10-20
Shock3-5 (with capturing)
Wave propagation10-20 per wavelength
Smooth gradients5-10

Limitations

  • 2D/3D only: No unstructured mesh generation
  • Quality metrics: Basic aspect ratio and skewness only
  • No mesh generation: Sizing recommendations only

References

  • references/mesh_types.md - Structured vs unstructured
  • references/quality_metrics.md - Aspect ratio/skewness thresholds

Version History

  • v1.1.0 (2024-12-24): Enhanced documentation, decision guidance, examples
  • v1.0.0: Initial release with 2 mesh quality scripts

Related skills

FAQ

Does it generate meshes?

No, it provides sizing recommendations and quality checks only; it does not generate unstructured meshes.

What are the quality thresholds?

Aspect ratio typically under 5:1 and skewness under 0.8.

Data Science & MLanalyticspipelines

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.