Agent skill

Softjax

by lamm-mit in lamm-mit/scienceclaw

Soft differentiable drop-in replacements for non-differentiable JAX functions (abs, relu, sort, argmax, comparison, logical operators, etc.) with adjustable softening strength.

Apache-2.0Auto-check passedResearch & Science

Install Softjax

skills CLI
$ npx skills add lamm-mit/scienceclaw --skill softjax -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lamm-mit/scienceclaw softjax --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lamm-mit/scienceclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/softjax .claude/skills/softjax && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
softjax
GitHub stars
244
Token cost
~1.4k tokens
SKILL.md length
414 words
Files
3 (incl. scripts)
Skills in repo
85
Repo updated
First seen
Licence
Apache-2.0

At a glance

Soft differentiable drop-in replacements for non-differentiable JAX functions (abs, relu, sort, argmax, comparison, logical operators, etc.) with adjustable softening strength.

  • Tasks that involve Deep learning
  • SKILL.md covers softjax, Prerequisites, Installation and How to run, plus 1 more section
  • Runs Python scripts from its folder; calls git, pip and python3

What it does

Softjax is an agent skill from lamm-mit/scienceclaw. Soft differentiable drop-in replacements for non-differentiable JAX functions (abs, relu, sort, argmax, comparison, logical operators, etc.) with adjustable softening strength.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/USAGE.md` and `scripts/softjax_client.py`).

It sits in Research & Science, covering Deep learning. It works with arXiv. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Deep learning

Example prompts

  • “/softjax”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit ab9aba1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • pip
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • arxiv.org
    • a-paulus.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Softjax loads about 1.4k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 414 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from lamm-mit/scienceclaw at commit ab9aba1, republished under its Apache-2.0 licence (© lamm-mit). 414 words, ~1,377 tokens.

Download SKILL.mdSave it as .claude/skills/softjax/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
softjax
description
Soft differentiable drop-in replacements for non-differentiable JAX functions (abs, relu, sort, argmax, comparison, logical operators, etc.) with adjustable softening strength.
source_type
github
auth_required
false
repository_url
https://github.com/a-paulus/softjax
reference_url
https://arxiv.org/abs/2603.08824

softjax

Soft differentiable drop-in replacements for non-differentiable JAX functions (abs, relu, sort, argmax, comparison, logical operators, etc.) with adjustable softening strength.

Code repository

https://github.com/a-paulus/softjax

Use this as the implementation source: clone the repo and follow its README for install, dependencies, and how to run code or experiments. The generated client prints JSON with a suggested git clone command.

Paper (arXiv — explanation)

https://arxiv.org/abs/2603.08824

This is the paper reference. The client can optionally fetch live Atom metadata (title, abstract) for agents; it does not run training or upstream research code by itself.

What “running” this client does

The *_client.py script prints JSON that combines a GitHub repository (clone URL + suggested git clone) with optional paper context from arXiv (live Atom metadata when reference_url is arXiv). Run the real code by cloning the repo and following its README — the skill is your agent-facing entrypoint, not a substitute for the repo’s install steps.

To call a REST API instead, set BASE_URL in scripts/softjax_client.py or wrap the upstream CLI with subprocess after clone.

How to run the method (from the source)

Extracted for operators and agents. Confirm against the upstream repository or paper before relying on it in production.

Prerequisites

  • Python 3.11 or higher
  • JAX library installed

Installation

bash
pip install softjax

How to run

SoftJAX is a library providing drop-in soft replacements for non-differentiable JAX functions. Use it in Python scripts by importing and calling soft operators:

python
import jax.numpy as jnp
import softjax as sj

# Example: soft ReLU
x = jnp.array([-0.2, -1.0, 0.3, 1.0])
print(sj.relu(x))  # soft mode by default
print(sj.relu(x, mode="hard"))  # hard (non-differentiable) mode
Elementwise operators
python
sj.abs(x)
sj.relu(x)
sj.clip(x, min_val, max_val)
sj.sign(x)
sj.round(x)
sj.heaviside(x)
Array-valued operators
python
sj.max(x, method="neuralsort", softness=0.1)
sj.min(x)
sj.sort(x, method="neuralsort", softness=0.1)  # supports multiple methods
sj.quantile(x, q=0.5)
sj.median(x)
sj.top_k(x, k=3)
sj.rank(x, descending=False)
Operators returning indices
python
sj.argmax(x)  # returns soft distribution over indices
sj.argmin(x)
sj.argsort(x)
sj.top_k(x, k=3)  # returns (values, soft_indices)
Comparison operators
python
sj.greater(x, y)
sj.equal(x, y)
sj.less(x, y)
sj.isclose(x, y)
Logical operators
python
sj.logical_and(a, b)
sj.logical_or(a, b)
sj.logical_not(a)
sj.logical_xor(a, b)
sj.all(a)
sj.any(a)
Selection operators
python
sj.where(condition, x, y)
Straight-through estimators (hard forward, soft backward)
python
sj.relu_st(x)
sj.sort_st(x)
sj.top_k_st(x, k=3)
sj.greater_st(x, y)
Show full SKILL.md (166 more words)Show less
Autograd-safe operators (stable gradients at boundaries)
python
sj.sqrt(x)
sj.arcsin(x)
sj.arccos(x)
sj.log(x)  # safe at 0
sj.div(a, b)  # safe at division by zero
sj.norm(x)  # safe at zero vector

Configuration

Key parameters available across operators:

  • mode: Control softening behavior ('hard', 'soft', 'smooth', 'c0', 'c1', 'c2')
  • softness: Adjust approximation strength (float, higher = closer to hard function)
  • method: For sort-like operators, choose algorithm ('softsort', 'neuralsort', 'fast_soft_sort', 'smooth_sort', 'ot', 'sorting_network')
Example with parameters
python
# Soft sort with custom softness
result = sj.sort(x, method="fast_soft_sort", softness=2.0, mode="c1")

# Soft argmax returning distribution
soft_argmax = sj.argmax(x, mode="soft")

# Straight-through sort (hard forward, soft backward for gradient)
result = sj.sort_st(x, method="neuralsort", softness=0.1)

See documentation at https://a-paulus.github.io/softjax/ for full API details.

The same text lives in scripts/USAGE.md for tools that prefer reading files under scripts/.

Parameters

--mode (str) [optional, default=soft] Softening mode: 'hard' (non-differentiable), 'soft' (default, smooth approximation), 'smooth', 'c0', 'c1', 'c2' for different continuity guarantees. --softness (float) [optional, default=None] Strength of softening; controls smoothness and boundedness of soft function. Adjustable per operator and method. --method (str) [optional, default=neuralsort] Algorithm for soft operators like sort: 'softsort', 'neuralsort', 'fast_soft_sort', 'smooth_sort', 'ot', 'sorting_network'. --k (int) [optional, default=None] Number of top elements for top_k operations. --q (float) [optional, default=None] Quantile parameter (0–1) for quantile and argquantile operations. --descending (bool) [optional, default=True] Sort order for rank operation: True for descending, False for ascending.

Usage
bash
python3 scripts/softjax_client.py sj.sort(x, method='neuralsort', softness=0.1, mode='soft')
Example Output
json
array([-0.8792, -0.1641, 0.2767, 0.8738])

© lamm-mit, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in skills/softjax of lamm-mit/scienceclaw.

  • SKILL.md
  • scripts/USAGE.md
  • scripts/softjax_client.py

Open the folder on GitHubat commit ab9aba1

Compare with similar skills

Softjax next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Softjax compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Softjax this skilllamm-mit/scienceclaw244—~1.4kAutomated safety check: PassApache-2.0
Hugging Face Paper Publisherhuggingface/skills11k5 repos~4.2kAutomated safety check: PassApache-2.0
tangermeme Genomic Model Analysisjmschrei/tangermeme311—~1.6kAutomated safety check: PassMIT
Hugging Face Paper Pageshuggingface/skills11k3 repos~2.3kAutomated safety check: PassApache-2.0
Phyai Model Arch Researchmingti-org/phyai129—~1.8kAutomated safety check: PassMIT
Analyze Id Eval Rankingopen-thoughts/OpenThoughts-Agent301—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Indexes research papers on the Hugging Face Hub from arXiv, links them to models and datasets, claims authorship and generates markdown research articles from templates.

    11k GitHub starsUsed in 5 repos~4.2k tokens
    Research & ScienceAuto-check passed
  • Routes agents to the right tangermeme reference for analyzing trained genomic deep learning models, from attributions and motif experiments to variant effects and design.

    311 GitHub stars~1.6k tokensUpdated today
    Research & ScienceAuto-check passed
  • Hugging Face Paper Pages

    huggingface/skills

    Official

    Fetches Hugging Face paper pages as markdown and reads paper metadata through the papers API when you share a paper URL, an arXiv link or an arXiv ID.

    11k GitHub starsUsed in 3 repos~2.3k tokens
    Research & ScienceAuto-check passed
  • A skill your agent uses when the user provides a paper, arXiv link, technical report, model card, checkpoint name, GitHub repository, or local codebase and asks to research, explain, compare, or…

    129 GitHub stars~1.8k tokensUpdated yesterday
    Research & ScienceAuto-check passed
  • Analyze Id Eval Ranking

    open-thoughts/OpenThoughts-Agent

    Given a list of models (HF name stubs) that have valid agentic ID eval scores in Supabase, build a ranking table: raw per-benchmark accuracy on the 3 ID benchmarks (SWE-Bench-100…

    301 GitHub stars~3.1k tokensUpdated 9 days ago
    Research & ScienceAuto-check passed
  • Torchdrug

    davila7/claude-code-templates

    Graph-based drug discovery toolkit. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Research & ScienceAuto-check passed

More from lamm-mit/scienceclaw

All 85 skills in this repo
  • Fred Economic Data

    lamm-mit/scienceclaw

    Query FRED (Federal Reserve Economic Data) API for 800,000+ economic time series from 100+ sources.

    244 GitHub starsUsed in 4 repos~3k tokens
    Auto-check passed
  • Drug Research

    lamm-mit/scienceclaw

    Generates comprehensive drug research reports with compound disambiguation, evidence grading, and mandatory completeness sections.

    244 GitHub starsUsed in 3 repos~1.7k tokens
    Auto-check passed
  • Imaging Data Commons

    lamm-mit/scienceclaw

    Query and download public cancer imaging data from NCI Imaging Data Commons using idc-index.

    244 GitHub starsUsed in 5 repos~11k tokens
    Auto-check passed
  • Rowan

    lamm-mit/scienceclaw

    Cloud-based quantum chemistry platform with Python API. An agent skill from lamm-mit/scienceclaw.

    244 GitHub starsUsed in 4 repos~3.1k tokens
    Auto-check: warnings
  • Infographics

    lamm-mit/scienceclaw

    Create professional infographics using Nano Banana Pro AI with smart iterative refinement.

    244 GitHub starsUsed in 6 repos~4.4k tokens
    Auto-check: notes
  • Disease Research

    lamm-mit/scienceclaw

    Generate comprehensive disease research reports using 100+ ToolUniverse tools.

    244 GitHub stars~946 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Softjax

What does Softjax do?

Soft differentiable drop-in replacements for non-differentiable JAX functions (abs, relu, sort, argmax, comparison, logical operators, etc.) with adjustable softening strength. Softjax is an agent skill from lamm-mit/scienceclaw.) with adjustable softening strength.

When should I use Softjax?

Softjax fits situations like: tasks that involve Deep learning.

How do I install Softjax in Claude Code?

Run `npx skills add lamm-mit/scienceclaw --skill softjax -a claude-code`. Or copy the skill folder (skills/softjax in lamm-mit/scienceclaw) into .claude/skills/softjax in your project. Claude Code loads it when a task matches its description.

How do I install Softjax in Codex?

Run `npx skills add lamm-mit/scienceclaw --skill softjax -a codex`. Or copy the skill folder (skills/softjax in lamm-mit/scienceclaw) into .agents/skills/softjax in your project. Codex loads it when a task matches its description.

Can I use Softjax in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lamm-mit/scienceclaw --skill softjax -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/softjax, .gemini/skills/softjax, .github/skills/softjax and .opencode/skills/softjax in your project.

What does Softjax need to run?

Going by SKILL.md and its folder, Softjax needs Python for the scripts in its folder and the command-line tools its instructions call (git, pip and python3). Our summary lists: Python 3.

Does Softjax access the network?

SKILL.md names 3 domains. As links in the text: github.com, arxiv.org and a-paulus.github.io. This is read from the text; nothing was executed.

Is Softjax safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Softjax use?

Softjax is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Softjax use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Softjax?

Skills that share tags, products or a category with Softjax: Hugging Face Paper Publisher (huggingface/skills, 11k stars), tangermeme Genomic Model Analysis (jmschrei/tangermeme, 311 stars), Hugging Face Paper Pages (huggingface/skills, 11k stars) and Phyai Model Arch Research (mingti-org/phyai, 129 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Softjax?

lamm-mit (a GitHub user) maintains it in lamm-mit/scienceclaw, which has 244 GitHub stars. The repository holds 85 skills in this directory. The repository was last updated on August 21, 2026.

Source: lamm-mit/scienceclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.