fenics-fem

fenics-fem is a skill for Claude Code, Codex from Cai-aa/CAE-Agent-Hub. It costs 53 tokens per session (6,002 once invoked), scanned A, original, MIT.

A guide to solving partial differential equations with the finite element method, a way to approximate equations over a mesh of small elements. It uses FEniCS or dolfinx, with gmsh for mesh generation and ParaView for visualizing results.

In plain words
What is it for?
Use it for Poisson, elasticity, and other elliptic, parabolic, or hyperbolic equations; custom weak-form models; convergence studies; and exporting results for ParaView.
Why use it?
It provides a workflow for problems involving complex shapes, multiple physical effects, and different boundary conditions. It also supports checking how results change as the mesh is refined.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions Gemini CLI.

Good fit Use it for Poisson, elasticity, and other elliptic, parabolic, or hyperbolic equations; custom weak-form models; convergence studies; and exporting results for ParaView.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cai-aa/cae-agent-hub/fenics-fem
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Cai-aa/CAE-Agent-Hub --skill fenics-fem
Clone the repo
git clone --depth 1 https://github.com/Cai-aa/CAE-Agent-Hub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fenics-fem

README.md
[![agentmods](https://agentmods.dev/badge/skills/cai-aa/cae-agent-hub/fenics-fem/github.svg)](https://agentmods.dev/skills/cai-aa/cae-agent-hub/fenics-fem)
Your own site
<a href="https://agentmods.dev/skills/cai-aa/cae-agent-hub/fenics-fem"><img src="https://agentmods.dev/badge/skills/cai-aa/cae-agent-hub/fenics-fem/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fenics-fem

Your own site · 80×15
<a href="https://agentmods.dev/skills/cai-aa/cae-agent-hub/fenics-fem"><img src="https://agentmods.dev/badge/skills/cai-aa/cae-agent-hub/fenics-fem.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,002 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • medium MCP Rug Pull · line 102
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium MCP Rug Pull · line 103
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • low Tool Misuse · line 103
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.06002
Opus 5 $0.00026 $0.03001
Sonnet 5 $0.00011 $0.01200
Haiku 4.5 $0.00005 $0.00600

Measured 12d ago against content hash 7583f67a2515, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

fenics-fem scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| Nédélec (edge elements) | `("Nedelec1st", 1)` | Electromagnetics, H(curl) |
Skill/abaqus/reference/fenics-fem/SKILL.md · 643 lines

How it starts

The opening of the file, as written. The whole thing — 643 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FEniCS Finite Element Method for PDEs

TL;DR — Solve partial differential equations with the Finite Element Method (FEM) using FEniCS/dolfinx. Derive the weak form, generate meshes with gmsh, apply Dirichlet/Neumann boundary conditions, solve Poisson or elasticity problems, and export results to XDMF/VTK for ParaView.


When to Use

Use this Skill when you need to:

  • Solve elliptic, parabolic, or hyperbolic PDEs on complex geometries
  • Implement custom weak forms for multi-physics problems
  • Apply mixed Dirichlet/Neumann/Robin boundary conditions
  • Perform convergence studies on successively refined meshes
  • Export solutions for publication-quality visualization in ParaView

Do not use this Skill when:

  • You need a quick 1D finite-difference solution → use SciPy solve_bvp
  • You want a spectral method for periodic domains → use pseudo-spectral libraries
  • You need GPU-accelerated large-scale CFD → consider OpenFOAM or Fluidity

Background & Key Concepts

Variational (Weak) Form

The FEM converts a strong-form PDE into an integral equation by multiplying by a test function v and integrating by parts. For Poisson's equation:

Strong form: −∇²u = f in Ω, u = uD on ΓD, ∇u·n = g on ΓN

Weak form: Find u ∈ H¹(Ω) such that for all v ∈ H¹₀(Ω): ∫_Ω ∇u·∇v dx = ∫_Ω f v dx + ∫_ΓN g v ds

Function Spaces

Space dolfinx name Use case
Continuous Galerkin deg 1 ("Lagrange", 1) Scalar fields, temperature
Continuous Galerkin deg 2 ("Lagrange", 2) Higher accuracy, elasticity displacement
Discontinuous Galerkin ("DG", 0) Cell-wise constants, flux
Nédélec (edge elements) ("Nedelec1st", 1) Electromagnetics, H(curl)

Convergence and Error

For Lagrange P1 elements on a quasi-uniform mesh of size h:

  • L² error: O(h²) (one order above approximation degree)
  • H¹ error: O(h)

Environment Setup

# Recommended: use conda with conda-forge (dolfinx + gmsh are complex to compile)
conda create -n fenics-env python=3.11 -y
conda activate fenics-env
conda install -c conda-forge fenics-dolfinx mpich petsc4py gmsh pyvista -y

# Verify installation
python -c "import dolfinx; print('dolfinx version:', dolfinx.__version__)"
python -c "import gmsh; print('gmsh version:', gmsh.__version__)"

# For Docker users (simplest approach)
docker pull dolfinx/dolfinx:stable
docker run -it --rm -v $(pwd):/work dolfinx/dolfinx:stable bash

Read the full file on GitHub · 643 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 643 lines · 53 tokens per session scan A 7583f67a2515

Subscribe to this mod's changes

fenics-fem is a skill published in the GitHub repository Cai-aa/CAE-Agent-Hub (881 stars, last pushed today), licensed MIT. It adds 53 tokens to every session and 6,002 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

fenics-fem

Use this Skill to solve PDEs with the finite element method using FEniCS/dolfinx: weak form formulation, mesh generation with gmsh, Poisson/elasticity problems, boundary conditions, and paraview export.

xjtulyc/awesome-rosetta-skills · 53 tokens

finite-element-analysis

Use this Skill for FEA with FEniCSx or scikit-fem: mesh generation, boundary conditions, linear elasticity, heat conduction, and result visualization.

xjtulyc/awesome-rosetta-skills · 38 tokens

scipy-numerical

SciPy numerical toolkit for physics: ODE/PDE solving, FFT analysis, optimization, numerical integration, and sparse linear algebra with real-world examples.

xjtulyc/awesome-rosetta-skills · 36 tokens

physicsnemo-discover

Official NVIDIA-authored guidance for navigating PhysicsNeMo — pick the model, datapipe, or example for a SciML/AI4Science task (surrogates, forecasting, downscaling, physics-informed, inverse, generative). Points at existing files via live repo search; never writes code. Do NOT use for installation or environment…

NVIDIA/physicsnemo · 124 tokens

hdf5-pde-data-loading

Patterns for loading PDE simulation datasets (PDEBench, PhiFlow, JAX-CFD) from HDF5 files. Handles layout detection (single tensor vs separate variables), spatial/temporal downsampling, multi-variable systems, HuggingFace and DaRUS data sources, and efficient PyTorch DataLoader creation. Use when preparing PDE data…

synthetic-sciences/openscience · 82 tokens

physics-units-si

SI units, CODATA constants, dimensional analysis, and rigorous unit conversion. Use when extracting, normalizing, or computing physical quantities (energy, frequency, length, mass, time, temperature). Handles eV/keV/MeV/GeV/TeV, Hz/kHz/MHz/GHz/THz, meter/cm/Å/fm, kg/g/u, second/ms/μs/ns/fs, Kelvin/eV-temperature…

LuuOW/meridian-mcp · 96 tokens