jax-pde

jax-pde is a skill for Claude Code from tondevrel/scientific-agent-skills. It costs 51 tokens per session (1,094 once invoked), scanned A, original, MIT.

A guide to using JAX, a Python library for numerical computing, to solve partial differential equations—equations describing how things change across space and time—and differentiable physics problems.

In plain words
What is it for?
Use it for fluid, wave, or heat simulations, physics-informed neural networks, inverse design, robotics or climate models, and sensitivity analysis.
Why use it?
It explains how to calculate how simulation results change when inputs or physical parameters change, including through numerical solvers.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the scientific-agent-skills plugin — 55 skills, 2 commands, 1 MCP server shipped together

Good fit Use it for fluid, wave, or heat simulations, physics-informed neural networks, inverse design, robotics or climate models, and sensitivity analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tondevrel/scientific-agent-skills/jax-pde
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 tondevrel/scientific-agent-skills --skill jax-pde
Clone the repo
git clone --depth 1 https://github.com/tondevrel/scientific-agent-skills

Made for: Claude Code.

Or install scientific-agent-skills, the plugin that ships this one along with the rest of its 55 skills, 2 commands, 1 MCP server.

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 jax-pde

README.md
[![agentmods](https://agentmods.dev/badge/skills/tondevrel/scientific-agent-skills/jax-pde/github.svg)](https://agentmods.dev/skills/tondevrel/scientific-agent-skills/jax-pde)
Your own site
<a href="https://agentmods.dev/skills/tondevrel/scientific-agent-skills/jax-pde"><img src="https://agentmods.dev/badge/skills/tondevrel/scientific-agent-skills/jax-pde/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 jax-pde

Your own site · 80×15
<a href="https://agentmods.dev/skills/tondevrel/scientific-agent-skills/jax-pde"><img src="https://agentmods.dev/badge/skills/tondevrel/scientific-agent-skills/jax-pde.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,094 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00051 $0.01094
Opus 5 $0.00026 $0.00547
Sonnet 5 $0.00010 $0.00219
Haiku 4.5 $0.00005 $0.00109

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

Security

Grade A, and why

jax-pde scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/jax-pde/SKILL.md · 110 lines

How it starts

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

JAX - Differentiable Physics & PDEs

JAX is uniquely suited for physics because it can differentiate through numerical solvers. This guide covers how to implement traditional PDE solvers that are "optimization-friendly" and how to build neural-hybrid physical models.

When to Use

  • Solving Navier-Stokes, Wave, or Heat equations on GPU.
  • Implementing Physics-Informed Neural Networks (PINNs).
  • Performing Inverse Design (finding material properties from observations).
  • Creating differentiable simulations for robotics or climate modeling.
  • Sensitivity analysis of physical systems.

Core Principles

1. Differentiation through the Solver

In JAX, if you write an Euler or Runge-Kutta integrator using jax.numpy, you can automatically calculate ∂Result/∂InitialCondition or ∂Result/∂Viscosity.

2. Staggered Grids & Vmap

Physical fields (velocity, pressure) are often stored on grids. JAX's vmap allows you to parallelize solvers across different boundary conditions or parameter sets instantly.

3. The Adjoint Method

For very large systems, JAX's reverse-mode autodiff effectively implements the "Adjoint State Method" used in traditional CFD/Geophysics for gradient calculation.

Implementation Patterns

1. PINNs (Physics-Informed Neural Networks)

import jax.numpy as jnp
from jax import grad, vmap

# A simple MLP representing the solution u(x, t)
def model(params, x, t):
    # standard neural net logic...
    return result

# Residual of the PDE: u_t + u*u_x - nu*u_xx = 0 (Burgers Equation)
def pde_loss(params, x, t, nu):
    u = lambda x, t: model(params, x, t)
    
    # Automatic derivatives of the MODEL
    u_t = grad(u, argnums=1)(x, t)
    u_x = grad(u, argnums=0)(x, t)
    u_xx = grad(grad(u, argnums=0), argnums=0)(x, t)
    
    return jnp.mean((u_t + u * u_x - nu * u_xx)**2)

2. Differentiable Finite Difference Solver

@jit
def update_step(u, dt, dx, nu):
    """One step of a diffusion solver."""
    # Vectorized Laplacian using shifts (Zero-copy views)
    u_left = jnp.roll(u, -1)
    u_right = jnp.roll(u, 1)
    laplacian = (u_left + u_right - 2*u) / (dx**2)
    return u + dt * nu * laplacian

# We can now differentiate this solver!
def loss(initial_u, target_u):
    final_u = integrate_pde(initial_u) # Loop of update_step
    return jnp.sum((final_u - target_u)**2)

grad_initial_condition = grad(loss)(initial_u, target_u)

Read the full file on GitHub · 110 lines

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 · 110 lines · 51 tokens per session scan A cdeb0c794f01

Subscribe to this mod's changes

jax-pde is a skill published in the GitHub repository tondevrel/scientific-agent-skills (21 stars, last pushed 7mo ago), licensed MIT. It adds 51 tokens to every session and 1,094 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. 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

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 61 tokens

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

K-Dense-AI/scientific-agent-skills · 66 tokens

pyhealth

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…

K-Dense-AI/scientific-agent-skills · 216 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

K-Dense-AI/scientific-agent-skills · 80 tokens

nemo-mbridge-perf-expert-parallel-overlap

Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.

NVIDIA/skills · 56 tokens

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens