adaptyv
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
Optional database URL for examples.
$ npx -y skills add k-dense-ai/claude-scientific-skills --skill modal --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/modalContext preview
The summary Claude sees to decide when to auto-load this skill.
Optional database URL for examples.
name: modal
description: Modal is a serverless cloud platform for running Python on demand, including on-demand GPUs. Use when deploying or serving AI/ML models, running GPU-accelerated workloads (training, fine-tuning, inference), serving web endpoints, scheduling batch jobs, or scaling Python code to cloud containers with the Modal SDK.
license: Apache-2.0
metadata:
version: "1.3"
skill-author: K-Dense Inc.
openclaw:
envVars:
- name: MODAL_TOKEN_ID
required: true
description: Modal token id.
- name: MODAL_TOKEN_SECRET
required: true
description: Modal token secret.
- name: DATABASE_URL
required: false
description: Optional database URL for examples.Modal is a cloud platform for running Python code serverlessly, with a focus on AI/ML workloads. Key capabilities:
Everything in Modal is defined as code — no YAML, no Dockerfiles required (though both are supported).
Use this skill when:
uv pip install modal
The Modal Python SDK supports Python 3.10–3.14. This skill targets the stable `modal>=1.0` API (current release: 1.4.x).
Prefer existing credentials before creating new ones. Only the two Modal-specific variables below are relevant — do not read, load, or expose any other environment variables or `.env` file contents:
1. Check whether `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET` are already set in the current environment. 2. If not, look up only those two keys in a local `.env` file (ignore all other entries) and load them if appropriate for the workflow. 3. Only fall back to interactive `modal setup` or generating fresh tokens if neither source already provides those two values.
modal setup
This opens a browser for authentication. For CI/CD or headless environments, use environment variables:
export MODAL_TOKEN_ID=<your-token-id> export MODAL_TOKEN_SECRET=<your-token-secret>
If tokens are not already available in the environment or `.env`, generate them at https://modal.com/settings
Modal offers a free tier with $30/month in credits.
**Reference**: See `references/getting-started.md` for detailed setup and first app walkthrough.
A Modal `App` groups related functions. Functions decorated with `@app.function()` run remotely in the cloud:
import modal
app = modal.App("my-app")
@app.function()
def square(x):
return x ** 2
@app.local_entrypoint()
def main():
# .remote() runs in the cloud
print(square.remote(42))Run with `modal run script.py`. Deploy with `modal deploy script.py`.
**Reference**: See `references/functions.md` for lifecycle hooks, classes, `.map()`, `.spawn()`, and more.
Modal builds container images from Python code. The recommended package installer is `uv`:
image = (
modal.Image.debian_slim(python_version="3.11")
.uv_pip_install("torch==2.12.0", "transformers==5.9.0", "accelerate==1.13.0")
.apt_install("git")
)
@app.function(image=image)
def inference(prompt):
from transformers import pipeline
pipe = pipeline("text-generation", model="meta-llama/Llama-3-8B")
return pipe(prompt)Key image methods:
**Reference**: See `references/images.md` for Dockerfiles, micromamba, caching, GPU build steps.
Request GPUs via the `gpu` parameter:
@app.function(gpu="H100")
def train_model():
import torch
device = torch.device("cuda")
# GPU training code here
# Multiple GPUs
@app.function(gpu="H100:4")
def distributed_training():
...
# GPU fallback chain
@app.function(gpu=["H100", "A100-80GB", "A100-40GB"])
def flexible_inference():
...Available GPUs: T4, L4, A10, L40S, A100-40GB, A100-80GB, RTX-PRO-6000, H100, H200, B200, B200+
**Reference**: See `references/gpu.md` for GPU selection guidance and multi-GPU training.
Volumes provide distributed, persistent file storage:
vol = modal.Volume.from_name("model-weights", create_if_missing=True)
@app.function(volumes={"/data": vol})
def save_model():
# Write to the mounted path
with open("/data/model.pt", "wb") as f:
torch.save(model.state_dict(), f)
@app.function(volumes🔔 Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility — now works with any AI agent that supports the open Agent Skills standard, not just Claude.
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP…
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data…
Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree…
Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk…