modal
Skill by K-Dense-AI
Modal is a serverless cloud platform for running Python on demand, including on-demand GPUs. This skill guides an AI assistant through deploying AI and ML models, GPU workloads, web endpoints and scheduled jobs with the Modal SDK.
Install modal
Built from the published package, never by AI.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/modal ~/.claude/skills/modalRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills /tmp/scientific-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/scientific-agent-skills/skills/modal ~/.gemini/antigravity-cli/skills/modalAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The modal skill teaches an AI assistant to use the Modal serverless cloud platform for running Python code on demand, including on-demand GPUs. It covers installing the Modal SDK version 1.6.0, authenticating with an existing profile or a token pair, and defining Apps, Functions and container Images in Python. It also covers GPU selection, Volumes for persistent storage, web endpoints, scheduled jobs, and autoscaling settings.
The skill is aimed at developers who deploy or serve AI and ML models, run training, fine-tuning or inference on GPUs, serve web APIs, or schedule batch and recurring jobs. It points to reference files for deeper topics such as images, GPUs, volumes and secrets. Cloud execution requires a Modal account and, for GPU use, a payment method.
Written from the project's SKILL.md and checked against it.
What it can do
- Install and authenticateSet up the Modal SDK and reuse an existing profile or token pair.
- Define Apps and FunctionsWrite functions with @app.function() and run them with modal run or modal deploy.
- Build container imagesDefine images in Python with uv_pip_install, apt_install and related methods.
- Request GPUsChoose GPU types such as L40S, H100 or B200 with the gpu parameter.
- Persistent storageMount Volumes for model weights and datasets, with commit and reload guidance.
- Web endpointsServe FastAPI, ASGI, WSGI or WebSocket apps as Modal web endpoints.
- Scheduled jobsRun functions on a cron schedule or at a fixed interval.
- Scaling and concurrencyTune container limits, concurrency and parallel .map() calls.
- Lifecycle classesLoad a model once per container with enter and exit hooks.
- SecretsPass credentials to functions through Modal Secrets.
What you need
- Modal account
- Python 3.10 to 3.14
- modal 1.6.0 SDK
- Payment method for GPU use
- Network access for cloud execution
Try asking
- Deploy my Python inference function to Modal on an L40S GPU.
- Add a Modal cron job that runs my data pipeline every day at 9 AM UTC.
- Create a Modal web endpoint with FastAPI for my model's predict function.
Good to know
- GPU use requires a payment method even when credits remain.
- Model loading still takes time despite container reuse and warm pools.
- Up to 8 GPUs per container, or 4 for A10.
- Remote builds, deployments and GPU inference were not executed in the source's review.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/modal/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md18 KB -
references/api_reference.md8 KB -
references/examples.md10 KB -
references/functions.md8 KB -
references/getting-started.md5 KB
Show all 13 files
-
references/gpu.md7 KB -
references/images.md7 KB -
references/resources.md3 KB -
references/scaling.md6 KB -
references/scheduled-jobs.md4 KB -
references/secrets.md4 KB -
references/volumes.md7 KB -
references/web-endpoints.md8 KB
Alternatives to modal
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
modal: common questions
Does Modal require a payment method for GPUs?
Yes. The source says GPU use requires a payment method even when credits remain.
Which GPUs does the skill cover?
The source lists T4, L4, A10, L40S, A100 variants, RTX-PRO-6000, H100, H200, B200, B200+ and B300.
How does the skill authenticate with Modal?
It first checks for an existing Modal profile or a MODAL_TOKEN_ID and MODAL_TOKEN_SECRET pair, and falls back to modal setup if neither is available.
How do I install modal?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is modal free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is modal safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to modal?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
