[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ETRQCFTW1QWB8M5ZKPG73P":3,"skill-same:01M7ETRQCFTW1QWB8M5ZKPG73P":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7ETRQCFTW1QWB8M5ZKPG73P","modal-guide",null,"Run serverless GPUs with Modal — deploy models, batch jobs, and agents on demand without managing infrastructure.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-modal-guide\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: modal-guide\ndescription: Run serverless GPUs with Modal — deploy models, batch jobs, and agents on demand without managing infrastructure.\ncategory: ai-research\n---\n\n## Overview\n\nModal is a serverless compute platform for Python: you write ordinary Python\nfunctions, decorate them with infrastructure requirements (GPU type, image,\ntimeouts), and Modal runs them on its cloud — scaling from zero to hundreds of\nparallel containers. For AI work, it's the fastest path to \"run this model on a\nGPU\" without provisioning anything: model inference endpoints, batch processing,\nfine-tuning jobs, and agent sandboxes all fit the model.\n\nThe programming model is the product: infrastructure as decorators on Python\ncode. `@app.function(gpu=\"A100\")` is the whole provisioning story. Combined\nwith fast cold starts (custom container images with cached layers), persistent\nvolumes, and secrets management, Modal covers the full lifecycle from notebook\nexperiment to production endpoint.\n\nUse Modal when your unit of work is Python code needing serious compute, and\nyou'd rather not think about clusters, Kubernetes, or GPU procurement.\n\n## When to use\n\n- Serving open models on GPUs without managing servers (custom inference\n  endpoints).\n- Batch jobs: dataset processing, embedding generation, evaluation sweeps at\n  scale.\n- Fine-tuning runs and experimentation needing on-demand GPUs.\n- Sandboxed code execution for agents (run untrusted generated code in isolated\n  containers).\n- Scheduled jobs (crons) and queues for ML pipelines.\n- Prototypes that might become production — Modal scales both.\n\n## Core concepts\n\n- **Apps and functions**: an App groups functions; each function is a Python\n  callable with declared resources. The decorator is the infrastructure spec —\n  read it as documentation of what the function needs.\n- **Images**: container images built from Python dependencies (pip, apt, CUDA).\n  Image builds are cached in layers — keep them lean and stable for fast cold\n  starts. Pin dependency versions.\n- **GPU selection**: request GPU types per function (T4 through H100 classes).\n  Match the GPU to the workload: inference on smaller GPUs, training on bigger\n  ones. Cost scales with GPU class — don't overprovision.\n- **Scaling**: functions scale from zero to many parallel containers\n  automatically. Set concurrency limits per function to bound cost and protect\n  downstream dependencies.\n- **Volumes and storage**: persistent volumes for model weights, datasets, and\n  caches. Mount weights from a volume instead of downloading per cold start —\n  this is the single biggest cold-start optimization.\n- **Secrets**: managed secrets injected as environment variables. Never hardcode\n  API keys; use Modal secrets and rotate them.\n- **Web endpoints**: expose functions as HTTP endpoints (including ASGI apps like\n  FastAPI). The path from Python function to production API is one decorator.\n- **Dedicated deployments**: reserved GPUs for your workload — no noisy\n  neighbors, predictable latency. The right choice when shared capacity variance\n  violates SLOs.\n\n## Practical workflow\n\n1. **Prototype locally, decorate for cloud.** Write the Python logic first; add\n   Modal decorators for GPU\u002Fimage\u002Ftimeout. Keep a local-run path for fast\n   iteration on logic.\n2. **Optimize the image.** Pin dependencies, minimize layers, pre-download model\n   weights into a volume. Cold-start time is dominated by image size and weight\n   loading — attack both.\n3. **Mount weights from volumes.** Never download multi-GB weights on cold start.\n   Build a volume with the weights once; mount it read-only in serving\n   functions.\n4. **Set timeouts and concurrency limits.** Every function gets a timeout (fail\n   fast, don't burn money on hangs) and a concurrency cap (bound cost, protect\n   downstream).\n5. **Load-test the endpoint.** Measure cold-start latency, warm latency, and\n   behavior at target concurrency. Modal scales well, but your code's\n   initialization path is yours to optimize.\n6. **Use sandboxes for agent code execution.** Agents generating code should run\n   it in Modal sandboxes — isolated, timeout-bounded, network-controllable.\n7. **Monitor spend.** Serverless GPUs bill by the second; runaway scaling is\n   expensive. Set concurrency limits, track per-function cost, and alert on\n   anomalies.\n\nChecklist for a Modal deployment:\n- Image pinned and lean; weights on volumes, not downloads.\n- Timeouts and concurrency limits on every function.\n- Secrets managed, never hardcoded.\n- Cold-start and warm latency measured at target concurrency.\n- Per-function cost tracked with anomaly alerts.\n\n## Common pitfalls\n\n- **Fat images.** Unpinned, kitchen-sink dependencies → slow builds and slow\n  cold starts. Curate the image like production infrastructure.\n- **Downloading weights per invocation.** The classic Modal beginner mistake.\n  Volumes exist for this — use them.\n- **No concurrency limits.** Autoscaling is wonderful until a bug or traffic\n  spike scales you into a shocking bill. Limits are guardrails, not pessimism.\n- **Missing timeouts.** A hung GPU function bills until it dies. Set aggressive\n  timeouts; retry with backoff instead of waiting.\n- **Secrets in code or images.** Hardcoded keys in function code or baked into\n  images. Use Modal secrets, rotate regularly.\n- **Local\u002Fcloud divergence.** Code that works locally but fails on Modal\n  (missing deps, path assumptions). Keep the local-run path honest and test\n  the decorated path early.\n- **Cold starts in latency-sensitive paths.** Serverless cold starts are real\n  (seconds). For strict latency, keep functions warm (minimum containers) or\n  accept the tradeoff consciously.\n- **No cost monitoring.** Per-second GPU billing across many functions without\n  attribution. The bill arrives monthly; the surprise shouldn't.\n","## Overview\n\nModal is a serverless compute platform for Python: you write ordinary Python\nfunctions, decorate them with infrastructure requirements (GPU type, image,\ntimeouts), and Modal runs them on its cloud — scaling from zero to hundreds of\nparallel containers. For AI work, it's the fastest path to \"run this model on a\nGPU\" without provisioning anything: model inference endpoints, batch processing,\nfine-tuning jobs, and agent sandboxes all fit the model.\n\nThe programming model is the product: infrastructure as decorators on Python\ncode. `@app.function(gpu=\"A100\")` is the whole provisioning story. Combined\nwith fast cold starts (custom container images with cached layers), persistent\nvolumes, and secrets management, Modal covers the full lifecycle from notebook\nexperiment to production endpoint.\n\nUse Modal when your unit of work is Python code needing serious compute, and\nyou'd rather not think about clusters, Kubernetes, or GPU procurement.\n\n## When to use\n\n- Serving open models on GPUs without managing servers (custom inference\n  endpoints).\n- Batch jobs: dataset processing, embedding generation, evaluation sweeps at\n  scale.\n- Fine-tuning runs and experimentation needing on-demand GPUs.\n- Sandboxed code execution for agents (run untrusted generated code in isolated\n  containers).\n- Scheduled jobs (crons) and queues for ML pipelines.\n- Prototypes that might become production — Modal scales both.\n\n## Core concepts\n\n- **Apps and functions**: an App groups functions; each function is a Python\n  callable with declared resources. The decorator is the infrastructure spec —\n  read it as documentation of what the function needs.\n- **Images**: container images built from Python dependencies (pip, apt, CUDA).\n  Image builds are cached in layers — keep them lean and stable for fast cold\n  starts. Pin dependency versions.\n- **GPU selection**: request GPU types per function (T4 through H100 classes).\n  Match the GPU to the workload: inference on smaller GPUs, training on bigger\n  ones. Cost scales with GPU class — don't overprovision.\n- **Scaling**: functions scale from zero to many parallel containers\n  automatically. Set concurrency limits per function to bound cost and protect\n  downstream dependencies.\n- **Volumes and storage**: persistent volumes for model weights, datasets, and\n  caches. Mount weights from a volume instead of downloading per cold start —\n  this is the single biggest cold-start optimization.\n- **Secrets**: managed secrets injected as environment variables. Never hardcode\n  API keys; use Modal secrets and rotate them.\n- **Web endpoints**: expose functions as HTTP endpoints (including ASGI apps like\n  FastAPI). The path from Python function to production API is one decorator.\n- **Dedicated deployments**: reserved GPUs for your workload — no noisy\n  neighbors, predictable latency. The right choice when shared capacity variance\n  violates SLOs.\n\n## Practical workflow\n\n1. **Prototype locally, decorate for cloud.** Write the Python logic first; add\n   Modal decorators for GPU\u002Fimage\u002Ftimeout. Keep a local-run path for fast\n   iteration on logic.\n2. **Optimize the image.** Pin dependencies, minimize layers, pre-download model\n   weights into a volume. Cold-start time is dominated by image size and weight\n   loading — attack both.\n3. **Mount weights from volumes.** Never download multi-GB weights on cold start.\n   Build a volume with the weights once; mount it read-only in serving\n   functions.\n4. **Set timeouts and concurrency limits.** Every function gets a timeout (fail\n   fast, don't burn money on hangs) and a concurrency cap (bound cost, protect\n   downstream).\n5. **Load-test the endpoint.** Measure cold-start latency, warm latency, and\n   behavior at target concurrency. Modal scales well, but your code's\n   initialization path is yours to optimize.\n6. **Use sandboxes for agent code execution.** Agents generating code should run\n   it in Modal sandboxes — isolated, timeout-bounded, network-controllable.\n7. **Monitor spend.** Serverless GPUs bill by the second; runaway scaling is\n   expensive. Set concurrency limits, track per-function cost, and alert on\n   anomalies.\n\nChecklist for a Modal deployment:\n- Image pinned and lean; weights on volumes, not downloads.\n- Timeouts and concurrency limits on every function.\n- Secrets managed, never hardcoded.\n- Cold-start and warm latency measured at target concurrency.\n- Per-function cost tracked with anomaly alerts.\n\n## Common pitfalls\n\n- **Fat images.** Unpinned, kitchen-sink dependencies → slow builds and slow\n  cold starts. Curate the image like production infrastructure.\n- **Downloading weights per invocation.** The classic Modal beginner mistake.\n  Volumes exist for this — use them.\n- **No concurrency limits.** Autoscaling is wonderful until a bug or traffic\n  spike scales you into a shocking bill. Limits are guardrails, not pessimism.\n- **Missing timeouts.** A hung GPU function bills until it dies. Set aggressive\n  timeouts; retry with backoff instead of waiting.\n- **Secrets in code or images.** Hardcoded keys in function code or baked into\n  images. Use Modal secrets, rotate regularly.\n- **Local\u002Fcloud divergence.** Code that works locally but fails on Modal\n  (missing deps, path assumptions). Keep the local-run path honest and test\n  the decorated path early.\n- **Cold starts in latency-sensitive paths.** Serverless cold starts are real\n  (seconds). For strict latency, keep functions warm (minimum containers) or\n  accept the tradeoff consciously.\n- **No cost monitoring.** Per-second GPU billing across many functions without\n  attribution. The bill arrives monthly; the surprise shouldn't.\n",{"name":5,"category":24,"description":7},"ai-research","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-modal-guide",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill modal-guide",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill modal-guide",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill modal-guide","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-modal-guide\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]