domain-ml — Claude Code skill: what it does, how to install
A Rust-focused skill for ML and AI app design, covering model loading, tensor handling, batching, streaming, and GPU inference.
npx skills add actionbook/rust-skills --skill domain-ml -a claude-codeWhat domain-ml does
domain-ml gives Rust projects a set of design constraints for machine learning and AI work. It covers memory-aware tensor handling, streaming for large data, batched inference, one-time model loading, and asynchronous data delivery for GPU workloads. Reproducibility is addressed through seeded randomness and versioning.
The skill maps common tasks to crates: tract for ONNX inference, candle and burn for training and inference, tch-rs for PyTorch bindings, ndarray for tensors, polars for data processing, and fastembed for embeddings. It also describes OnceLock<Model>, iterator-based streaming, and splitting inputs into batches.
When a model is trained in Python and deployed in Rust, the ONNX plus tract route is the clearest fit described here. GPU work depends on CUDA or Metal support in the selected backend, and large tensors should avoid unnecessary copies.
What it helps with
- design an ML application in Rust
- choose a crate for ONNX inference
- process inference inputs in batches
- reuse a loaded model across requests
- connect streaming data with GPU inference
Example prompts for the agent
- Design a Rust inference service for
model.onnxthat loads the model once. - Compare
tract,candle, andtch-rsfor my Rust ML application. - Refactor this inference flow to batch inputs and avoid copying large tensors.
How to install domain-ml
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-ml -a claude-code2Manually: put the files in place
~/.claude/skills/domain-ml/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/domain-ml/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-ml -a codex2Manually: put the files in place
.agents/skills/domain-ml/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-ml -a cursor2Manually: put the files in place
.cursor/skills/domain-ml/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills domain-ml2Manually: put the files in place
.github/skills/domain-ml/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-ml -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/domain-mlManually: put the files in place
.devin/skills/domain-ml/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill domain-ml -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about domain-ml
How do I install domain-ml in Claude Code?
Run npx skills add actionbook/rust-skills --skill domain-ml -a claude-code, then check ~/.claude/skills/domain-ml/SKILL.md. The Claude Code method repeats the install command as npx skills add actionbook/rust-skills --skill domain-ml -a claude-code.
What does domain-ml do?
This skill guides architecture for ML and AI applications in Rust. It covers crate selection, model loading, batching, streaming, memory use, and GPU-related design.
Which libraries does domain-ml cover?
It points to tract for ONNX inference, candle and burn for Rust training and inference, and tch-rs for PyTorch models. ndarray, polars, and fastembed cover tensors, data processing, and embeddings.