Index of every page on this site: llms.txt
All skills
Run it yourself

Write, debug, review, profile, or shard JAX numerical code. Use when the hard part is JAX tracing, autodiff, control flow, PRNGs, compilation, array placement, or runtime performance. Do not impose JAX on a NumPy-only or unrelated GPU task.

Use this Skill: https://skilld.dev/gh/tristanmanchester/agent-skills/jax-development

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesADVANCED-EXTENSIONS.md

≈774 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Advanced extensions

Use this file only after ordinary JAX design, transforms, and sharding have been exhausted or ruled out.

Escalation ladder

Prefer the simplest option that solves the real problem:

  1. rewrite in plain JAX
  2. use a different transform or control-flow primitive
  3. add checkpoint / donation / explicit sharding
  4. use custom_jvp or custom_vjp
  5. use export / AOT lowering
  6. use custom_partitioning
  7. use Pallas
  8. use FFI
  9. modify JAX internals directly

custom_jvp / custom_vjp

Use when:

  • default autodiff is mathematically wrong for the desired abstraction
  • a stable forward formula and stable backward formula differ
  • the primitive is too expensive to differentiate naively

Ask:

  • is the derivative truly custom, or does the forward pass just need stabilising?
  • can the tangent/cotangent rules be tested independently?
  • does the custom rule preserve batching / compilation expectations?

Use templates:

  • assets/custom_vjp_template.py

jax.export and AOT lowering

Use when:

  • tracing/lowering and execution must be decoupled
  • you need a serialisable staged computation
  • you need shape-polymorphic export
  • you need to inspect lowered programs without executing them immediately

Use assets/export_template.py as a starter.

custom_partitioning

Use when:

  • a function needs specialised sharding-aware lowering
  • compiler suggestions are not enough
  • the function should participate in distributed compilation with custom rules

This is already advanced. Only recommend it when the sharding semantics are clearly understood.

Pallas

Use when:

  • profiling points to a real kernel-level bottleneck
  • plain JAX and XLA optimisations are not enough
  • the target backend and kernel semantics are understood well enough

Do not recommend Pallas just because code is “slow”. It is the right answer only when:

  • the hotspot is real
  • the algorithm is stable
  • higher-level rewrites have been exhausted
  • the user can tolerate backend-specific complexity

Use:

  • assets/pallas_kernel_skeleton.py

FFI

Use when:

  • a custom kernel or external library is already available
  • Pallas and other extension points are insufficient
  • integration cost is justified by the performance or functionality gain

FFI is powerful but expensive in complexity, portability, and maintenance.

JAX internals

Use source-level work only when:

  • the user is modifying JAX itself
  • the public API is insufficient
  • the issue is truly an internal bug or design change

When reasoning about internals, think in terms of:

  • primitives
  • tracers
  • jaxpr
  • abstract evaluation
  • batching rules
  • autodiff rules
  • MLIR / XLA lowering

Use references/REPO-MAP.md and scripts/jax_repo_locator.py.

Advanced-work checklist

Before proposing an advanced extension, verify:

  • the simpler alternatives were considered and rejected for a concrete reason
  • the user actually needs the extra power
  • the backend and portability trade-offs were stated
  • the testing plan is clear
  • the performance or correctness case is specific, not hand-wavy

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo4 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides a suite of JAX development tools. It includes functionality for dynamic loading of local modules for benchmarking and a code scanner that processes user files, which introduces a low risk of dynamic execution and indirect prompt injection.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 3323bc9. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Steadyupdated last month
Other metadata
compatibility
Current-release baseline JAX 0.11.1 requires Python >=3.12; wheel/backend support must be checked separately. Diagnostics need Python 3.12+ and the project's JAX environment for runtime probes. Static helpers can run without JAX. Benchmark/probe commands execute trusted project code.
metadata
{
  "version": "3.0.0",
  "reviewed": "2026-09-13",
  "source": "https://github.com/jax-ml/jax/tree/jax-v0.11.1"
}

README badge

README badge for tristanmanchester/agent-skills/jax-development