modal
Skill0 starsChanged 44 days agoMITView on GitHub
Field-tested playbook for agents that run GPU/CPU workloads on Modal (modal.com) on a small budget. Use when writing or launching a Modal app or job (training, eval, batch inference), estimating or capping Modal spend, reserving and reconciling Modal bills, adding watchdogs or deadlines to cloud runs, debugging a failed or hung Modal run, choosing a GPU class, shipping code/data payloads to Modal, or driving Modal from a cloud agent session.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- lobehub/lobehubtheir own version, first seen Nov 5, 2026
- MarieLynneBlock/arcanum-artifextheir own version, first seen Nov 1, 2026
- BlockRunAI/blockrun-mcptheir own version, first seen Oct 20, 2026
- patoangolano/bio-stacktheir own version, first seen Oct 15, 2026
- longtermrisk/claude-skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use torch-geometric, get-available-resources and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Hongyu-yuSkilltorch-geometric
Graph Neural Networks (PyG). Node/graph classification, link prediction, GCN, GAT, GraphSAGE, heterogeneous graphs, molecular property prediction, for geometric deep learning.
Also in 3 projects that use this
SoljournerSkillget-available-resources
Enumerate installed packages, databases, and tools for engineering workflows
Also in 3 projects that use this
garri333Skillscientific-schematics
Create publication-quality scientific diagrams using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Only regenerates if quality is below threshold for your document type. Specialized in neural network architectures, system diagrams, flowcharts, biological pathways, and complex scientific visualizations.
Also in 3 projects that use this
Hugging FaceSkilltransformers
Agent-invokable Transformers commands. Pass `--format json` at the top level (e.g. `transformers --format json classify ...`) to receive the structured output documented in each capability's `outputs` schema.
Also in 3 projects that use this
ZanderRussSkillseaborn
Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.
Also in 3 projects that use this
silvainfmSkillpolars
Lightning-fast DataFrame library written in Rust for high-performance data manipulation and analysis. Use when user wants blazing fast data transformations, working with large datasets, lazy evaluation pipelines, or needs better performance than pandas. Ideal for ETL, data wrangling, aggregations, joins, and reading/writing CSV, Parquet, JSON files.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- lobehub/lobe-chat★ 84ksame name
- lobehub/lobehub★ 84ksame name
- LeonChaoX/qinyan-academic-skills★ 910same name
- BlockRunAI/blockrun-mcp★ 389same name
- qinyan-ai/qinyan-academic-skills★ 80same name
- MarieLynneBlock/arcanum-artifex★ 4same name
- JunMA98/Computer-science-claude-skills★ 3same name
- modal-projects/skills★ 3same name
- BrightGold70/skills★ 1same name
- garri333/Skills★ 1same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Spend needs a human yes and a dollar cap: Before the first paid job of a session, get an explicit authorization with a $ cap from the …
- Very specific: line 27
Reserve before you spend, hold until the bill: Every paid job gets a worst-case reservation first (ledger.py reserve).
- Distinctive: line 36
Receipts come local, checkpoints stay on the Volume: Never download weights to "complete" a job.
- Distinctive: line 56
Read the reference fully before acting.
“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modal — run it detached, bounded in the cloud, and paid for on purpose
You are operating paid cloud GPUs on someone else's money. The local client (you, your shell, your laptop) can die at any moment; every guarantee must therefore live on Modal's side or in a ledger on disk, never in your memory.
0 · Resolve the skill directory
Everything this skill references sits next to this file: references/*.md and scripts/ (ledger.py,
modal_task.py, selftest.py). If you need an absolute path:
MS="${ZCODE_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${MODAL_SKILL_ROOT:-}}}}"
[ -n "$MS" ] && MS="$MS/skills/modal" # else: the directory containing this SKILL.mdInstall check (CPU only, no account, no spend): python3 "$MS/scripts/selftest.py" prints ok.
1 · Golden rules (never break these)
- Spend needs a human yes and a dollar cap. Before the first paid job of a session, get an explicit authorization
with a $ cap from the account owner and record it in the ledger (
ledger.py init --authorization "..."). - Reserve before you spend, hold until the bill. Every paid job gets a worst-case reservation first
(
ledger.py reserve). Release it only against the job's completed-hour per-app bill (ledger.py reconcile), never on elapsed time. - The local client is only a launcher. Anything over a few minutes:
modal run --detachundernohup, with server-side bounds: functiontimeout, an in-container deadline,retries=0, no warm pool. A local.get(timeout=)stops nothing in the cloud. - Canary first. One job alone; check setup, numerics, speed and its first bill (≤ 1.25× estimate) before fan-out.
- Never auto-resubmit, never reuse a job id. A retry is a new id with a new reservation, resuming from state saved on the Volume.
- Receipts come local, checkpoints stay on the Volume. Never download weights to "complete" a job.
- Sweep before you sleep.
modal app listshows nothing of yours running when you stop; stop apps by exact id, never other people's apps, never a blanketpkill modal. - Exactly one driver per campaign. Two agents or schedulers dispatching the same work will double-spend.
- Check the clock before stating a time (
date). Bills are hourly; you will need the real time. - Never put credentials in payloads, logs, commits or chat. Tokens live in env vars or
~/.modal.toml.
2 · Route by task
| Task | Read |
| First time on Modal, auth, CI tokens | references/run-pattern.md §Onboarding |
| Write or launch a job | references/run-pattern.md → copy scripts/modal_task.py into the project's scripts/ and edit its CONFIG |
| Estimate cost, set a cap, reserve, reconcile, close | references/budget-guard.md (drive scripts/ledger.py) |
| Make a run survive a dead laptop/agent (deadlines, watchdog, guardian) | references/guardrails.md |
| Pick a GPU, fix OOM, benchmark latency honestly | references/gpu-sizing.md |
| Ship code/data to the container, import errors, data drift | references/payloads-data.md |
| Drive Modal from a cloud agent session, hand off between drivers, macOS quirks | references/drivers.md |
| Something failed or looks hung | references/lessons.md (symptom → fix table), then the section it points to |
Read the reference fully before acting; do not work from this summary.
3 · The standard job loop
First copy scripts/ledger.py and scripts/modal_task.py from this skill into the project's scripts/ (the
template finds the project root one level above itself), then:
python3 scripts/ledger.py init --ledger runs/ledger_s1.json --cap 10 --workspace-left 25 \
--authorization "owner OK 2026-09-30, cap \$10" # once per authorized session
python3 scripts/ledger.py reserve --ledger runs/ledger_s1.json --job train_01 --usd 1.90
nohup modal run --detach scripts/modal_task.py --job train_01 > runs/logs/train_01.log 2>&1 &
python3 scripts/ledger.py dispatched --ledger runs/ledger_s1.json --job train_01 --app-id ap-... # id from the log
modal volume ls <volume> train_01 # done when status.json exists
modal app stop -y ap-... # confirm stopped, tasks 0
# fetch receipts only (no .pt / adapters / checkpoints), then:
python3 scripts/ledger.py complete --ledger runs/ledger_s1.json --job train_01 # or --failed "why"
python3 scripts/ledger.py reconcile --ledger runs/ledger_s1.json --job train_01 # after the hourly bill landsledger.py refuses (at $0) on: cap exceeded, workspace headroom exceeded, job-id reuse, an unreconciled failed job,
too many jobs in flight, or a month rollover. A refusal is the guard working; do not route around it (never raise a
cap, relabel a ledger or reuse a job id to fit). Ask the owner instead.
4 · Reporting
Report four money numbers separately: estimate, reservation, metered (workspace meter delta) and final bill (reconciled). Say which jobs still hold reservations and when their bills land. Before ending a session: 0 live apps of yours, every job reconciled or listed with its bill time, watchdog stopped, ledger closed.
5 · When you learn something new
A new failure mode → add a row to references/lessons.md (symptom → fix, with the date and what it cost). If you
are in a plugin-cache copy, tell the user what to upstream to github.com/nagisanzenin/modal-skill instead of editing
the cache.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

