modal

modal is a skill for Claude Code, Codex from K-Dense-AI/scientific-agent-skills. It costs 65 tokens per session (4,387 once invoked), scanned A, original, MIT.

A cloud service for running Python code on demand, including jobs that need GPUs. You define functions, containers, storage, web endpoints, and scheduled jobs through its Python-based SDK.

In plain words
What is it for?
Use it to train or serve machine-learning models, run GPU inference or fine-tuning, process batches in parallel, expose Python APIs, schedule recurring jobs, and store model files or datasets.
Why use it?
It removes much of the server setup and capacity planning involved in running AI workloads, web services, and batch jobs in the cloud.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to train or serve machine-learning models, run GPU inference or fine-tuning, process batches in parallel, expose Python APIs, schedule recurring jobs, and store model files or datasets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/k-dense-ai/scientific-agent-skills/modal
About the project

Scientific Agent Skills is a collection of reusable procedures that give AI agents capabilities for scientific research across areas such as biology, chemistry, medicine, and drug discovery. It is used by researchers and by people building AI scientist workflows with compatible coding agents. The catalogue contains many of the project's skills and supporting instructions.

K-Dense-AI/scientific-agent-skills · 54,777 stars · on GitHub · arxiv.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add K-Dense-AI/scientific-agent-skills --skill modal
Clone the repo
git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for modal

README.md
[![agentmods](https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/modal/github.svg)](https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/modal)
Your own site
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/modal"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/modal/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for modal

Your own site · 80×15
<a href="https://agentmods.dev/skills/k-dense-ai/scientific-agent-skills/modal"><img src="https://agentmods.dev/badge/skills/k-dense-ai/scientific-agent-skills/modal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,387 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 2 Oct 2026
  • Snyk pass 2 Oct 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 43
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.04387
Opus 5.5 $0.00026 $0.01755
Sonnet 5.5 $0.00013 $0.00877
Haiku 4.5 $0.00006 $0.00439

Measured 25d ago against content hash 5da5d0a39db4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

modal scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Subprocess / custom servers:** Some patterns here (multi-GPU training launchers, `@modal.web_server` apps) call `subprocess.run`/`subprocess.Popen` or shell commands during builds. Keep argument lists fixed and hardc
Origin

Copies of this mod

7 near-identical copies found in the catalogue:

  • modal — 100% identical, 119 lines differ
  • modal — 91% identical, 136 lines differ
  • modal — 88% identical, 140 lines differ
  • modal — 88% identical, 140 lines differ
  • modal — 83% identical, 182 lines differ
  • modal — 81% identical, 182 lines differ
  • modal — 80% identical, 181 lines differ
skills/modal/SKILL.md · 497 lines

How it starts

The opening of the file, as written. The whole thing — 497 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

Modal is a cloud platform for running Python code serverlessly, with a focus on AI/ML workloads. Key capabilities:

  • GPU compute on demand (including H100, H200, B200 and B300)
  • Serverless functions with autoscaling from zero to thousands of containers
  • Custom container images built entirely in Python code
  • Persistent storage via Volumes for model weights and datasets
  • Web endpoints for serving models and APIs
  • Scheduled jobs via cron or fixed intervals
  • Container reuse and warm pools to reduce cold starts (model loading still takes time)

Modal Apps and Images are defined in Python; existing Dockerfiles are also supported.

When to Use This Skill

Use this skill when:

  • Deploy or serve AI/ML models in the cloud
  • Run GPU-accelerated computations (training, inference, fine-tuning)
  • Create serverless web APIs or endpoints
  • Scale batch processing jobs in parallel
  • Schedule recurring tasks (data pipelines, retraining, scraping)
  • Need persistent cloud storage for model weights or datasets
  • Want to run code in custom container environments
  • Build job queues or async task processing systems

Installation and Authentication

Install

uv pip install "modal==1.6.0"

Reviewed against SDK 1.6.0 and current release notes. Local SDK construction and selected handlers were tested; remote builds, deployments, GPU inference and cloud limits were not executed. Snippets using model/data placeholders or third-party workloads are illustrative and require their stated dependencies.

Authenticate

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. Reuse an existing Modal profile, or check whether both MODAL_TOKEN_ID and MODAL_TOKEN_SECRET are set; report presence only.
  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 if no usable profile or token pair exists. The SDK supports profiles in .modal.toml; environment tokens are optional when a profile authenticates.

Read the full file on GitHub · 497 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago Changed · +6 lines 5da5d0a39db4
  2. 26d ago Changed · +5 lines f802994b58fe
  3. 1mo ago First seen · 486 lines · 65 tokens per session scan A 81fd4eaea47e

Subscribe to this mod's changes

modal is a skill published in the GitHub repository K-Dense-AI/scientific-agent-skills (54,777 stars, last pushed yesterday), licensed MIT. It adds 65 tokens to every session and 4,387 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.