# Deploy Python Workloads on Modal

Cloud deployment requires correct images, resources, secrets, storage, and scaling settings. This skill guides Claude, Codex, and Claude Code through practical Modal workflows.

## Install

```bash
npx skillstore add davila7/modal
```

## Metadata

- Status: approved
- Slug: davila7-modal
- Skillstore revision: r2
- Version status: missing
- Tree hash: 25147b3ec54ceb767a0d3ebd56dce7098af2c01cc7738384d7ac0a16f42f8185
- Author: davila7
- GitHub username: davila7
- License: MIT
- Repository: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/scientific/modal
- Ref: c43861a65bb95efcae259cd161c9d6f4dc7eec6f
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: confirmation\_required
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, network, filesystem, env\_access, external\_commands
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/davila7-modal
- Manifest: https://skillstore.pages.dev/api/skills/davila7-modal/manifest

## Capabilities

- Creates Modal application, image, function, class, and local entrypoint patterns.
- Configures GPU, CPU, memory, disk, timeout, concurrency, and autoscaling settings.
- Designs batch processing with map operations and asynchronous function spawning.
- Guides persistent storage with Modal Volumes, commits, reloads, and cache mounts.
- Explains Modal Secrets, scheduled jobs, HTTP endpoints, FastAPI integration, and deployment commands.

## Use Cases

- Deploy GPU Inference: Plan a container image, GPU selection, model loading lifecycle, endpoint, and scaling policy for an inference service.
- Run Parallel Data Pipelines: Design mapped batch functions, scheduled collection jobs, persistent volumes, retries, and resource limits for data processing.
- Standardize Modal Services: Create repeatable deployment patterns for images, secrets, APIs, concurrency, observability, and cost controls.

## Prompt Templates

### Create a First Modal Function

```
Create a minimal Modal function for [task]. List prerequisites, image dependencies, local run steps, and expected output.
```

### Plan a GPU Workload

```
Design a Modal GPU workload for [model]. Recommend the GPU, image packages, memory, timeout, caching, and validation steps.
```

### Build a Scheduled Data Pipeline

```
Design a Modal job that runs [schedule], calls [source], stores results in a Volume, and handles secrets, retries, and failures.
```

### Architect a Production Inference API

```
Architect a secure Modal inference API for [traffic profile]. Cover authentication, model lifecycle, concurrency, autoscaling, observability, rollback, and cost controls.
```

## Limitations

- Requires a Modal account, credentials, network access, and responsibility for cloud charges.
- Provides guidance and examples but does not deploy, monitor, or validate workloads independently.
- Examples may require changes for current Modal APIs, dependency versions, and project structure.
- Some reference examples require security review, especially credential mounts, secret logging, and public web servers.

## Best Practices

- Pin package versions, base images, and source commits for reproducible deployments.
- Use least-privilege Modal Secrets and never print, copy, or embed credential values.
- Set explicit scaling, concurrency, timeout, and resource limits before production deployment.

## Anti Patterns

- Do not copy local credential directories into images or remote container filesystems.
- Do not expose container root directories or unauthenticated administrative endpoints.
- Do not deploy unbounded workloads without cost limits, retries, monitoring, and failure handling.

## Security Audit

- Audited at: 2026-07-23T13:55:09.221\+00:00
- Summary: Most alerts are false positives from Markdown, framework method names, placeholders, and expected Modal APIs. Confirmed examples expose credentials, log secrets, serve the container root, and use unpinned source.

## Stats

- Views: 535
- Downloads: 7
- Favorites: 0
- Popularity score: 0
