modal

modal is a skill for Claude Code, Codex from graniet/kheish. It costs 36 tokens per session (2,291 once invoked), scanned A, a copy of modal, Apache-2.0.

A cloud service that provides temporary GPUs for machine-learning workloads without requiring you to manage servers.

In plain words
What is it for?
Use it to run GPU jobs, deploy machine-learning models as auto-scaling APIs, process batches, train or run inference, and schedule jobs.
Why use it?
It avoids setting up and maintaining GPU infrastructure for short-lived or changing workloads.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/graniet/kheish/modal
Any agent
npx skills add graniet/kheish --skill modal
Clone the repo
git clone --depth 1 https://github.com/graniet/kheish

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/graniet/kheish/modal.svg)](https://agentmods.dev/skills/graniet/kheish/modal)
Your own site
<a href="https://agentmods.dev/skills/graniet/kheish/modal"><img src="https://agentmods.dev/badge/skills/graniet/kheish/modal.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,291 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 78% copy Near-identical to another mod 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 $0.00036 $0.02291
Opus 5 $0.00018 $0.01145
Sonnet 5 $0.00007 $0.00458
Haiku 4.5 $0.00004 $0.00229

Measured 5d ago against content hash dc4be9c3b286, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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.

return subprocess.run(["nvidia-smi"], capture_output=True, text=True).stdout
Origin

This is a copy

78% identical to modal — 59 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/mlops/cloud/modal/SKILL.md · 365 lines

How it starts

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

Kheish Compatibility

This skill is repo-local and stays inactive until explicitly activated.

When the original instructions refer to legacy tool names, use these Kheish mappings:

  • terminal => bash
  • web_extract => web_fetch, plus web_search when discovery is needed
  • search_files => grep_search and glob_search
  • browser_* tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly

When the instructions mention local helper files, resolve them from ${KHEISH_SKILL_DIR}.

Comprehensive guide to running ML workloads on Modal's serverless GPU cloud platform.

When to use Modal

Use Modal when:

  • Running GPU-intensive ML workloads without managing infrastructure
  • Deploying ML models as auto-scaling APIs
  • Running batch processing jobs (training, inference, data processing)
  • Need pay-per-second GPU pricing without idle costs
  • Prototyping ML applications quickly
  • Running scheduled jobs (cron-like workloads)

Key features:

  • Serverless GPUs: T4, L4, A10G, L40S, A100, H100, H200, B200 on-demand
  • Python-native: Define infrastructure in Python code, no YAML
  • Auto-scaling: Scale to zero, scale to 100+ GPUs instantly
  • Sub-second cold starts: Rust-based infrastructure for fast container launches
  • Container caching: Image layers cached for rapid iteration
  • Web endpoints: Deploy functions as REST APIs with zero-downtime updates

Use alternatives instead:

  • RunPod: For longer-running pods with persistent state
  • Lambda Labs: For reserved GPU instances
  • SkyPilot: For multi-cloud orchestration and cost optimization
  • Kubernetes: For complex multi-service architectures

Quick start

Installation

pip install modal
modal setup  # Opens browser for authentication

Hello World with GPU

import modal

app = modal.App("hello-gpu")

@app.function(gpu="T4")
def gpu_info():
    import subprocess
    return subprocess.run(["nvidia-smi"], capture_output=True, text=True).stdout

@app.local_entrypoint()
def main():
    print(gpu_info.remote())

Read the full file on GitHub · 365 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 365 lines · 36 tokens per session scan A dc4be9c3b286

Subscribe to this mod's changes

modal is a skill published in the GitHub repository graniet/kheish (227 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 36 tokens to every session and 2,291 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). It is 78% identical to modal, differing in 59 lines, and is treated as a copy.