← 返回 Skills 市场
wu-uk

jax-skills

作者 wu-uk · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
76
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jax-computing-basics-jax-skills
功能描述
High-performance numerical computing and machine learning workflows using JAX. Supports array operations, automatic differentiation, JIT compilation, RNN-sty...
使用说明 (SKILL.md)

Requirements for Outputs

General Guidelines

Arrays

  • All arrays MUST be compatible with JAX (jnp.array) or convertible from Python lists.
  • Use .npy, .npz, JSON, or pickle for saving arrays.

Operations

  • Validate input types and shapes for all functions.
  • Maintain numerical stability for all operations.
  • Provide meaningful error messages for unsupported operations or invalid inputs.

JAX Skills

1. Loading and Saving Arrays

load(path)

Description: Load a JAX-compatible array from a file. Supports .npy and .npz.
Parameters:

  • path (str): Path to the input file.

Returns: JAX array or dict of arrays if .npz.

import jax_skills as jx

arr = jx.load("data.npy")
arr_dict = jx.load("data.npz")

save(data, path)

Description: Save a JAX array or Python array to .npy. Parameters:

  • data (array): Array to save.
  • path (str): File path to save.
jx.save(arr, "output.npy")

2. Map and Reduce Operations

map_op(array, op)

Description: Apply elementwise operations on an array using JAX vmap. Parameters:

  • array (array): Input array.
  • op (str): Operation name ("square" supported).
squared = jx.map_op(arr, "square")

reduce_op(array, op, axis)

Description: Reduce array along a given axis. Parameters:

  • array (array): Input array.
  • op (str): Operation name ("mean" supported).
  • axis (int): Axis along which to reduce.
mean_vals = jx.reduce_op(arr, "mean", axis=0)

3. Gradients and Optimization

logistic_grad(x, y, w)

Description: Compute the gradient of logistic loss with respect to weights. Parameters:

  • x (array): Input features.
  • y (array): Labels.
  • w (array): Weight vector.
grad_w = jx.logistic_grad(X_train, y_train, w_init)

Notes:

  • Uses jax.grad for automatic differentiation.
  • Logistic loss: mean(log(1 + exp(-y * (x @ w)))).

4. Recurrent Scan

rnn_scan(seq, Wx, Wh, b)

Description: Apply an RNN-style scan over a sequence using JAX lax.scan. Parameters:

  • seq (array): Input sequence.
  • Wx (array): Input-to-hidden weight matrix.
  • Wh (array): Hidden-to-hidden weight matrix.
  • b (array): Bias vector.
hseq = jx.rnn_scan(sequence, Wx, Wh, b)

Notes:

  • Returns sequence of hidden states.
  • Uses tanh activation.

5. JIT Compilation

jit_run(fn, args)

Description: JIT compile and run a function using JAX. Parameters:

  • fn (callable): Function to compile.
  • args (tuple): Arguments for the function.
result = jx.jit_run(my_function, (arg1, arg2))

Notes:

  • Speeds up repeated function calls.
  • Input shapes must be consistent across calls.

Best Practices

  • Prefer JAX arrays (jnp.array) for all operations; convert to NumPy only when saving.
  • Avoid side effects inside functions passed to vmap or scan.
  • Validate input shapes for map_op, reduce_op, and rnn_scan.
  • Use JIT compilation (jit_run) for compute-heavy functions.
  • Save arrays using .npy or pickle/json to avoid system-specific issues.

Example Workflow

import jax.numpy as jnp
import jax_skills as jx

# Load array
arr = jx.load("data.npy")

# Square elements
arr2 = jx.map_op(arr, "square")

# Reduce along axis
mean_arr = jx.reduce_op(arr2, "mean", axis=0)

# Compute logistic gradient
grad_w = jx.logistic_grad(X_train, y_train, w_init)

# RNN scan
hseq = jx.rnn_scan(sequence, Wx, Wh, b)

# Save result
jx.save(hseq, "hseq.npy")

Notes

  • This skill set is designed for scientific computing, ML model prototyping, and dynamic array transformations.

  • Emphasizes JAX-native operations, automatic differentiation, and JIT compilation.

  • Avoid unnecessary conversions to NumPy; only convert when interacting with external file formats.

安全使用建议
This skill appears internally consistent and limited to local JAX/NumPy operations. Before installing: ensure you trust the owner (source/homepage are missing) and have JAX/NumPy available; test it in a safe environment since it reads/writes local files (.npy/.npz) and could overwrite files if given paths you care about; verify the license (SKILL.md references LICENSE.txt which is not included); and if you want to avoid any autonomous actions, keep model-invocation disabled at the agent/platform level. The code contains no network calls, credential access, or other unexpected behaviors.
功能分析
Type: OpenClaw Skill Name: jax-computing-basics-jax-skills Version: 0.1.0 The skill bundle provides standard JAX-based numerical computing utilities, including array manipulation, automatic differentiation, and JIT compilation. The implementation in `jax_skills.py` and the instructions in `SKILL.md` are consistent with the stated purpose of high-performance ML workflows and do not contain any evidence of malicious intent, data exfiltration, or prompt injection.
能力评估
Purpose & Capability
The name, description, SKILL.md, and the included jax_skills.py functions (load/save, map_op, reduce_op, logistic_grad, rnn_scan, jit_run) match each other and are appropriate for JAX numerical and ML workflows. There are no unrelated credentials, binaries, or config paths requested. Minor metadata mismatch: SKILL.md claims a Proprietary LICENSE.txt but no LICENSE file is present in the manifest; source and homepage are unknown.
Instruction Scope
Runtime instructions stay within scope: they describe local array operations, reading/writing .npy/.npz files, using JAX primitives, and validating shapes. The SKILL.md does not instruct reading other system files, contacting external endpoints, or collecting unrelated data. Note: the doc mentions pickle/json as saving options but the provided save implementation only uses np.save (npy); this is an implementation/documentation inconsistency but not a security concern.
Install Mechanism
No install spec is provided (instruction-only with a small code file), so nothing is downloaded or written by an installer. This is low-risk from an install perspective. The package does depend on JAX and NumPy being present at runtime; the skill does not declare an install to fetch those.
Credentials
The skill requires no environment variables, credentials, or config paths. That is proportionate for the declared functionality (local numerical computing).
Persistence & Privilege
The skill is not forced-always (always:false) and does not request persistent system privileges. Model invocation is allowed (platform default) but the skill does not request elevated or cross-skill configuration changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jax-computing-basics-jax-skills
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jax-computing-basics-jax-skills 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Bulk publish from all-task-skills-dedup
元数据
Slug jax-computing-basics-jax-skills
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

jax-skills 是什么?

High-performance numerical computing and machine learning workflows using JAX. Supports array operations, automatic differentiation, JIT compilation, RNN-sty... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 76 次。

如何安装 jax-skills?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jax-computing-basics-jax-skills」即可一键安装,无需额外配置。

jax-skills 是免费的吗?

是的,jax-skills 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

jax-skills 支持哪些平台?

jax-skills 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 jax-skills?

由 wu-uk(@wu-uk)开发并维护,当前版本 v0.1.0。

💬 留言讨论