Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

Modal Serverless GPU Deployment

Teaches Claude Code to build, deploy and scale Python and AI/ML workloads on Modal's serverless GPU cloud.

Dev & CodingIntermediate33,0303,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.exit lifecycle 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.Sandbox for 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

  1. 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.
  2. Parallel batch pipeline — Fan out 100 parquet chunks with process_chunk.map(), write results back to a shared Volume, and report row counts.
  3. Scheduled ETL — Combine modal.Cron("0 */6 * * *") with modal.Secret.from_name("db-credentials") to run a credentialed job every six hours.

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal and create the skills directory if needed: mkdir -p ~/.claude/skills
  2. Clone the repository into a temp folder: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/scientific-agent-skills
  3. Copy just this skill: cp -r /tmp/scientific-agent-skills/skills/modal ~/.claude/skills/modal
  4. Install the SDK: uv pip install modal (or pip install modal)
  5. Create tokens at https://modal.com/settings, then run modal setup or export MODAL_TOKEN_ID and MODAL_TOKEN_SECRET.
  6. Restart Claude Code and try a prompt like "deploy a GPU inference endpoint on Modal".
  7. Test with modal run or modal serve first, and keep max_containers and timeout low while experimenting to control GPU spend.