Skip to content

chore(skills): ship UW3 Claude skills with the repository#299

Merged
lmoresi merged 1 commit into
developmentfrom
docs/ship-claude-skills
Jul 3, 2026
Merged

chore(skills): ship UW3 Claude skills with the repository#299
lmoresi merged 1 commit into
developmentfrom
docs/ship-claude-skills

Conversation

@lmoresi

@lmoresi lmoresi commented Jul 3, 2026

Copy link
Copy Markdown
Member

What

Version the domain-specific Claude Code skills alongside the code so they travel with a checkout and are reviewed via PR, rather than living only in each developer's ~/.claude/skills. Mirrors how .claude/commands/*.md are already tracked.

Skills shipped

.claude/skills/<name>/SKILL.md (+ supporting assets):

Skill Purpose
adapt-on-top-faults NVB adapt-on-top fault-modelling recipe
adaptive-meshing MMPDE node-movement convection setup
free-surface-convection free-surface integrator recipe
plasticity-solvers VEP / yield solver guidance
uw-visualisation PyVista render templates (+ .py helpers)
cetz-figures typst/cetz diagram authoring (+ examples/)

.gitignore

Un-ignores .claude/skills/ selectively — SKILL.md plus .py/.typ/.json/.png assets — keeping settings and stray files (.DS_Store, caches) ignored, in the same restrictive style as the existing .claude/commands allow-list.

Notes

  • These previously lived only in the user-global ~/.claude/skills/. After merge, the global copies should be removed so the repo is the single source of truth (skill edits then go through PR review).
  • cetz-figures ships generated example data (regenerable from its generate-*.py); can be trimmed later if repo weight becomes a concern.

Underworld development team with AI support from Claude Code

Version the domain-specific Claude Code skills alongside the code so they
travel with a checkout and are reviewed via PR, rather than living only in
each developer's ~/.claude/skills. Mirrors how .claude/commands/*.md are
already tracked.

Skills shipped (.claude/skills/<name>/SKILL.md + supporting assets):
- adapt-on-top-faults    NVB adapt-on-top fault modelling recipe
- adaptive-meshing       MMPDE node-movement convection setup
- free-surface-convection  free-surface integrator recipe
- plasticity-solvers     VEP / yield solver guidance
- uw-visualisation       PyVista render templates (+ .py helpers)
- cetz-figures           typst/cetz diagram authoring (+ examples)

.gitignore: un-ignore .claude/skills/ selectively (SKILL.md + .py/.typ/
.json/.png assets), keeping settings and stray files (.DS_Store, caches)
ignored — same restrictive style as the commands allow-list.

Underworld development team with AI support from Claude Code
Copilot AI review requested due to automatic review settings July 3, 2026 02:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR vendors a set of domain-specific “skills” under .claude/skills/ so they are versioned and reviewed alongside the Underworld3 codebase, and updates .gitignore to selectively track those skill assets while still ignoring .claude settings/junk.

Changes:

  • Update .gitignore to allow-list .claude/skills/** skill docs plus supporting asset types.
  • Add multiple Claude skill documents (SKILL.md) capturing UW3 workflow guidance (adaptive meshing, plasticity solvers, free-surface convection, visualisation).
  • Add helper scripts and examples (PyVista render templates; Typst/cetz figure examples with generated JSON + generators).

Reviewed changes

Copilot reviewed 19 out of 24 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.gitignore Allow-list .claude/skills/** assets while keeping .claude/* settings ignored.
.claude/skills/uw-visualisation/zoom_compare.py PyVista script to render cropped, side-by-side comparisons across runs.
.claude/skills/uw-visualisation/SKILL.md Canonical UW3→PyVista rendering recipe and rules.
.claude/skills/uw-visualisation/render_field.py Script template to render a scalar field (default T) + mesh edges for one/all steps.
.claude/skills/uw-visualisation/render_field_streamlines.py Script template to render T + mesh edges + velocity streamlines for one/all steps.
.claude/skills/plasticity-solvers/SKILL.md Guidance for convergent viscoplastic/VEP Stokes solves (tangents + yield homotopy).
.claude/skills/free-surface-convection/SKILL.md Guidance for the “three-number” free-surface integrator method and hardening notes.
.claude/skills/cetz-figures/underworld-bridge.md Sketch of a JSON contract to bridge UW3 mesh geometry into cetz figures.
.claude/skills/cetz-figures/SKILL.md Guidance for producing schematic figures with Typst+cetz (incl. repo layout pattern).
.claude/skills/cetz-figures/examples/mesh-demo.typ Example cetz figure demonstrating element-level geometry logic (data-driven).
.claude/skills/cetz-figures/examples/mesh-data.json Generated JSON input for mesh-demo.typ.
.claude/skills/cetz-figures/examples/generate-mesh-data.py Generator for mesh-data.json using SciPy Delaunay.
.claude/skills/cetz-figures/examples/generate-domain-demo-data.py Generator for domain-demo-data.json (multi-domain partition demo).
.claude/skills/cetz-figures/examples/generate-curved-bc-data.py Generator for curved-bc-data.json (facet-normal vs true-normal demo).
.claude/skills/cetz-figures/examples/facet-vs-true-normals.typ Example cetz figure for curved-boundary normals comparison.
.claude/skills/cetz-figures/examples/domain-demo.typ Example cetz figure for domain centroid vs point-in-domain illustration.
.claude/skills/cetz-figures/examples/curved-bc-data.json Generated JSON input for facet-vs-true-normals.typ.
.claude/skills/cetz-figures/cetz-cheatsheet.md Practical cetz notes, pitfalls, and verified patterns for this repo’s usage.
.claude/skills/adaptive-meshing/SKILL.md Detailed guidance for UW3 moving/adaptive mesh convection (mmpde + metrics + pitfalls).
.claude/skills/adapt-on-top-faults/SKILL.md Detailed guidance for NVB adapt-on-top fault modelling (metric→adapt loop, BCs, transfer).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +8
Usage:
python fault_zoom_compare.py --step step0060 \
--tags rq_passive_uniform rq_passive_gmsh --labels "uniform 1.6x" "gmsh 4.7x"
Comment on lines +26 to +29
SIM = os.path.expanduser(args.sim_dir)
labels = args.labels or args.tags
n = len(args.tags)

Comment on lines +26 to +33
cands = sorted(glob.glob(os.path.join(D, "step*.mesh.00000.h5")),
key=lambda c: int(re.search(r"step(\d+)\.mesh", c).group(1)))
if args.all:
labels = [re.search(r"(step\d+)\.mesh", os.path.basename(c)).group(1) for c in cands]
elif args.step:
labels = [args.step]
else:
labels = [re.search(r"(step\d+)\.mesh", os.path.basename(cands[-1])).group(1)]
Comment on lines +23 to +30
cands = sorted(glob.glob(os.path.join(D, "step*.mesh.00000.h5")),
key=lambda c: int(re.search(r"step(\d+)\.mesh", c).group(1)))
if args.all:
labels = [re.search(r"(step\d+)\.mesh", os.path.basename(c)).group(1) for c in cands]
elif args.step:
labels = [args.step]
else:
labels = [re.search(r"(step\d+)\.mesh", os.path.basename(cands[-1])).group(1)]
@lmoresi lmoresi merged commit aa3e383 into development Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants