agentsclimarketplace

Mesh generation

Skill bg-szy/TOP-SKILLS/skills/awesome-skills/mesh-generation

Plan and evaluate mesh generation for numerical simulations. Use when choosing grid resolution, checking aspect ratios/skewness, estimating mesh quality constraints, or planning adaptive mesh refinement for PDE discretization.From its SKILL.md

Install
npx -y skills add bg-szy/TOP-SKILLS --skill mesh-generation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.5 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most plan spec skills give in ~1.1k tokens

Counted across 1,099 of the 1,860 authors here whose files we hold, read 2026-08-07

  • Ask one question at a timein 51 of 1099
  • Break plans into vertical slicesin 29 of 1099, across 11 files
  • Publish issues in dependency orderin 27 of 1099, across 9 files
  • Iterate until user approves the breakdownin 25 of 1099, across 7 files
  • Explore the repository to understand the codebase statein 24 of 1099, across 7 files
  • Use domain glossary vocabularyin 23 of 1099, across 5 files
  • Apply correct triage labels to published issuesin 23 of 1099, across 5 files
  • Prefer AFK slices over HITLin 22 of 1099, across 7 files
  • Write a specification before writing any codein 22 of 1099, across 14 files
  • Write failing tests before implementation codein 22 of 1099, across 20 files
  • Ask clarifying questions until requirements are concretein 21 of 1099, across 13 files
  • Respect existing architecture decision recordsin 20 of 1099, across 5 files

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,871. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.