Modal Serverless GPU Deployment
Teaches Claude Code to build, deploy and scale Python and AI/ML workloads on Modal's serverless GPU cloud.
Dev & CodingIntermediate★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
Modal runs Python in the cloud serverlessly, with a strong focus on AI/ML. This skill gives Claude an accurate, up-to-date map of the Modal 1.x SDK so generated code actually works.
- Remote execution with
@app.function()/@app.cls()plus@modal.enter/@modal.exitlifecycle hooks - String-based GPU requests (
gpu="H100",gpu="H100:4", fallback chains) across T4 → B200 - Container images defined purely in Python (
uv_pip_install,apt_install,run_function) - Persistent Volumes for weights and datasets, Secrets, FastAPI/ASGI/WSGI web endpoints
- Cron and Period schedules, autoscaling knobs,
@modal.concurrent,with_options() modal.Sandboxfor isolating untrusted or agent-generated code with CIDR allowlists
Twelve references/*.md files provide deeper detail that Claude loads only when needed.
Who it's for
- ML engineers serving or fine-tuning models on on-demand GPUs
- Developers who want cloud deployment without Dockerfiles or Kubernetes
- Data teams running scheduled ETL, retraining, or scraping jobs
- AI app builders who need a sandbox to execute model-generated code
Examples
- LLM inference service — Ask "serve Llama-3 with vLLM on an H100 via Modal" and get a full script: image definition, one-time model load in
@modal.enter(), and a FastAPI POST endpoint. - Parallel batch pipeline — Fan out 100 parquet chunks with
process_chunk.map(), write results back to a shared Volume, and report row counts. - Scheduled ETL — Combine
modal.Cron("0 */6 * * *")withmodal.Secret.from_name("db-credentials")to run a credentialed job every six hours.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/modal folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/modal/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/scientific-agent-skills && cp -r /tmp/scientific-agent-skills/skills/modal ~/.claude/skills/modal⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and create the skills directory if needed:
mkdir -p ~/.claude/skills - Clone the repository into a temp folder:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/scientific-agent-skills - Copy just this skill:
cp -r /tmp/scientific-agent-skills/skills/modal ~/.claude/skills/modal - Install the SDK:
uv pip install modal(orpip install modal) - Create tokens at https://modal.com/settings, then run
modal setupor exportMODAL_TOKEN_IDandMODAL_TOKEN_SECRET. - Restart Claude Code and try a prompt like "deploy a GPU inference endpoint on Modal".
- Test with
modal runormodal servefirst, and keepmax_containersandtimeoutlow while experimenting to control GPU spend.
View source on GitHub ↗License: MIT