Token导航 LogoToken导航

Agent Skill · 研究检索

serverless-modal(无服务器模态)

serverless-modal 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

serverless-modal 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 42,544。

总安装 1,063周安装 43GitHub Stars 7,763下载 334核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:serverless-modal(无服务器模态)
来源仓库:https://github.com/wanshuiyin/auto-claude-code-research-in-sleep
仓库路径:skills/serverless-modal
安装命令:
npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill serverless-modal
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill serverless-modal

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

serverless-modal 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。适用于无服务器环境下的资料调研和技术选型支持。通过语义匹配和来源过滤提供候选内容,具体算法依赖底层实现。

使用前应确认其是否具备联网查询或数据抓取权限。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/serverless-modal

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

serverless-modal 怎么安装?

在终端执行 npx skills add https://github.com/wanshuiyin/auto-claude-code-research-in-sleep --skill se…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

serverless-modal 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

serverless-modal 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

serverless-modal 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

serverless-modal 用的人多吗?

公开数据是累计安装 1,063 次,近一周安装 43 次,下载 334 次,GitHub 7,763 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

serverless-modal 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 7,763 星,维护活跃度相对可查。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
serverless-modal

无服务器模态 · 本页

1,0637,763操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Modal Cloud GPU — Training & Inference

Task: $ARGUMENTS

Overview

Modal is a serverless GPU cloud. Key advantages over SSH-based platforms (vast.ai, remote servers):

  • Zero config: no SSH, no Docker, no port forwarding. Write Python → modal run → done.
  • Auto scale-to-zero: billing stops the instant your code finishes. No idle instances.
  • Local-first: run modal run from your laptop. Code, data, and results stay local; only the GPU function runs remotely.
  • Reproducible environments: dependencies declared in code via modal.Image, not system-level packages.

Best for: Users without a local GPU who need to debug CUDA code, run small-scale tests, or iterate quickly on experiments. The $5 free tier (no card) is enough for code debugging; $30 (with card) covers most small-scale experiment runs.

Trade-off: Modal costs more per GPU-hour than vast.ai or Lightning for some GPU tiers, but eliminates setup time and idle billing, often making it cheaper for short/medium workloads. For long training runs (>4 hours), consider vast.ai for lower $/hr.

Authentication

pip install modal
modal setup          # Opens browser login, writes token to ~/.modal.toml
# Verify:
modal run -q 'print("ok")'
  • Sign up: https://modal.com (GitHub/Google login)
  • Free (no card): $5/month — enough for quick tests
  • Free (with card): $30/month — bind a payment method at https://modal.com/settings for the full free tier. Set a workspace spending limit to prevent accidental overcharge (Settings → Usage → Spending Limit)
  • Academic: apply for $10k credits | Startups: apply for $25k credits
  • Secrets: modal secret create huggingface-secret HF_TOKEN=hf_xxxxx
Recommended setup: Bind a card to unlock $30/month, then immediately set a spending limit (e.g., $30) so you never exceed the free tier. Modal will pause your workloads when the limit is hit. SECURITY WARNING: Always bind your card and set spending limits directly on https://modal.com/settings in your browser. NEVER enter payment information, card numbers, or billing details through Claude Code or any CLI tool. Only the official Modal website is safe for payment operations.

Pricing (source: modal.com/pricing, per-second billing)

GPU$/sec≈$/hrVRAMBandwidth GB/sFree budget → hours
T4$0.000164$0.5916GB300~8.5 hr ($5) / 50.8 hr ($30)
L4$0.000222$0.8024GB300~6.3 hr / 37.5 hr
A10$0.000306$1.1024GB600~4.5 hr / 27.3 hr
L40S$0.000542$1.9548GB864~2.6 hr / 15.4 hr
A100-40GB$0.000583$2.1040GB1555~2.4 hr / 14.3 hr
A100-80GB$0.000694$2.5080GB2039~2.0 hr / 12.0 hr
H100$0.001097$3.9580GB3352~1.3 hr / 7.6 hr
H200$0.001261$4.54141GB4800~1.1 hr / 6.6 hr
B200$0.001736$6.25192GB8000~0.8 hr / 4.8 hr

CPU: $0.047/core/hr | RAM: $0.008/GiB/hr (GPU typically 90%+ of total cost)

!! Cost Estimation Required!!

Before EVERY run, estimate cost and show to user for confirmation.

Key insights:

  • Inference bottleneck is memory bandwidth, not compute → high-bandwidth GPUs are often cheaper overall
  • 7-8B BF16 inference needs ~22GB VRAM (weights 15G + KV cache 1G + overhead), T4 (16GB) insufficient
  • H100 is often cheaper than L4 for benchmarks (11x faster but only 5x more expensive)

Cost Estimation Template (required before every run)

Cost estimate (Modal):
  Model: [name] ([params], [precision])
  VRAM: ~[X]GB (weights + KV cache + overhead)
  GPU: [type] ([VRAM]GB, $[X]/sec = $[X]/hr, bandwidth [X] GB/s)
  Estimate: ~[N] min, ~$[X]

7-8B BF16 Benchmark Cost Comparison

GPUSpeed tok/s$/hr1000 samples x 200tok costDuration
H100224$3.95$0.9815 min
A100-40GB104$2.10$1.1232 min
L420$0.80$2.22167 min

Workflow

Step 1: Analyze Task → Estimate Cost → Choose GPU

Same analysis as any GPU skill — determine VRAM needs from model size, pick GPU, estimate hours, calculate cost. See pricing table above.

VRAM Rules of Thumb:

Model SizeFP16 VRAMRecommended GPU
≤3B~8GBT4, L4
7-8B~22GBL4, A10, A100-40GB
13B~30GBL40S, A100-40GB
30B~65GBA100-80GB, H100
70B~140GBH100:2, H200

Step 2: Generate Modal Launcher

Based on the task type, generate the appropriate launcher script.

Pattern A: One-Shot GPU Function (training, evaluation, benchmark)

The most common pattern for run-experiment integration. Wraps an existing training script:

import modal

app = modal.App("experiment-name")
image = modal.Image.debian_slim(python_version="3.11").pip_install(
    "torch", "transformers", "accelerate", "datasets", "wandb"
)

# Mount local project code into the container
local_code = modal.Mount.from_local_dir(".", remote_path="/workspace")
# Persistent volume for checkpoints and results
volume = modal.Volume.from_name("experiment-results", create_if_missing=True)

@app.function(
    image=image,
    gpu="A100-80GB",          # Chosen based on Step 1 analysis
    mounts=[local_code],
    volumes={"/results": volume},
    timeout=3600 * 6,         # 6 hours max
    secrets=[modal.Secret.from_name("wandb-secret")],  # Optional
)
def train():
    import subprocess
    subprocess.run(
        ["python", "train.py", "--output_dir", "/results/run_001"],
        cwd="/workspace",
        check=True,
    )
    volume.commit()  # Persist results to volume

@app.local_entrypoint()
def main():
    train.remote()
    print("Training complete. Results saved to Modal volume 'experiment-results'.")

Run: modal run launcher.py

Pattern B: Web API (persistent inference service)
import modal

app = modal.App("inference-api")
image = modal.Image.debian_slim(python_version="3.11").pip_install(
    "torch", "transformers", "accelerate"
)

@app.cls(image=image, gpu="L40S")
@modal.concurrent(max_inputs=10)
class InferenceAPI:
    @modal.enter()
    def load_model(self):
        from transformers import AutoModelForCausalLM, AutoTokenizer
        self.tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B")
        self.model = AutoModelForCausalLM.from_pretrained(
            "meta-llama/Llama-3.2-1B", device_map="auto"
        )

    @modal.fastapi_endpoint(method="POST")
    def generate(self, request: dict):
        inputs = self.tokenizer(request.get("prompt", ""), return_tensors="pt").to("cuda")
        outputs = self.model.generate(**inputs, max_new_tokens=256)
        return {"text": self.tokenizer.decode(outputs[0], skip_special_tokens=True)}

Deploy: modal deploy app.py

Pattern C: vLLM High-Performance Inference
import modal, subprocess

app = modal.App("vllm-server")
image = modal.Image.debian_slim(python_version="3.11").pip_install("vllm")
VOLUME = modal.Volume.from_name("model-cache", create_if_missing=True)
MODEL = "Qwen/Qwen3-4B"

@app.function(image=image, gpu="H100", volumes={"/models": VOLUME}, timeout=3600)
@modal.concurrent(max_inputs=100)
@modal.web_server(port=8000)
def serve():
    subprocess.Popen(["python", "-m", "vllm.entrypoints.openai.api_server",
                      "--model", MODEL, "--download-dir", "/models", "--port", "8000"])
Pattern D: Batch Parallel (map over dataset)
@app.function(image=image, gpu="T4", timeout=600)
def process_item(item: dict) -> dict:
    # ... process one item ...
    return {"result": "processed"}

@app.local_entrypoint()
def main():
    results = list(process_item.map([{"id": i} for i in range(1000)]))
Pattern E: LoRA Fine-Tuning
@app.function(
    image=image, gpu="A100-80GB", volumes={"/output": volume},
    timeout=3600 * 6, secrets=[modal.Secret.from_name("huggingface-secret")],
)
def train():
    # ... transformers + peft + trl training code ...
    trainer.save_model("/output/final")
    volume.commit()
Pattern F: Multi-GPU Distributed Training
@app.function(image=image, gpu="H100:4", volumes={"/output": volume}, timeout=3600 * 12)
def train_distributed():
    import subprocess
    subprocess.run(["accelerate", "launch", "--num_processes", "4",
                    "--mixed_precision", "bf16", "train.py"], check=True)

Step 3: Run

modal run launcher.py     # One-shot execution (most common for experiments)
modal deploy app.py       # Persistent service deployment

Step 4: Verify & Monitor

modal app list            # List running apps
modal app logs <app-name> # Stream logs

Step 5: Collect Results

Results collection depends on the pattern used:

Volume-based (recommended for training):

# Download results from volume after run completes
# Option A: In the launcher script, copy results to local mount before exit
# Option B: Use modal volume commands
modal volume ls experiment-results
modal volume get experiment-results /run_001/results.json ./results/

Stdout/return-based (for evaluation/benchmarks): Results are printed to terminal or returned from the function — already local.

Step 6: Cleanup

Modal auto-scales to zero — no manual instance destruction needed. But clean up unused resources:

modal app stop <app-name>     # Stop a deployed service
modal volume rm <volume-name> # Delete a volume when done

CLI Reference

modal run app.py          # Run once
modal deploy app.py       # Deploy persistent service
modal app logs <app>      # View logs
modal app list            # List apps
modal app stop <app>      # Stop
modal volume ls           # List volumes
modal volume get <vol> <remote> <local>  # Download from volume
modal secret create NAME KEY=VALUE       # Create secret

Key Tips

  • GPU fallback: gpu=["H100", "A100-80GB", "L40S"] — Modal tries each in order
  • Multi-GPU: gpu="H100:4" (up to 8 GPUs, cost scales linearly)
  • Volume: modal.Volume.from_name("x", create_if_missing=True) for persistent storage
  • @modal.enter() loads model once per container | @modal.concurrent() for concurrent requests
  • Long training: set timeout=3600 * N (default is 5 min)
  • Local code: modal.Mount.from_local_dir(".", remote_path="/workspace")
  • W&B integration: secrets=[modal.Secret.from_name("wandb-secret")] + wandb.init() in your script

Composing with Other Skills

/run-experiment "train model"       <- detects gpu: modal, calls /serverless-modal
  -> /serverless-modal              <- analyzes task, generates launcher, runs
  -> Results returned locally or to Modal Volume
  -> No destroy step needed (auto scale-to-zero)

/serverless-modal                   <- standalone: any Modal GPU workload
/serverless-modal "deploy vLLM"     <- inference service deployment

CLAUDE.md Example

## Modal
- gpu: modal                 # tells run-experiment to use Modal serverless
- modal_gpu: A100-80GB       # optional: override GPU selection (default: auto-select)
- modal_timeout: 21600       # optional: max seconds (default: 6 hours)
- modal_volume: my-results   # optional: named volume for results persistence

No SSH keys, no Docker images, no instance management needed. Just pip install modal && modal setup.

Cost protection: After modal setup, go to https://modal.com/settings in your browser (NEVER through CLI) → bind a payment method to unlock $30/month free tier (without card: only $5/month). Then set a workspace spending limit equal to your free tier amount — Modal will auto-pause workloads when the limit is reached, preventing any surprise charges.

Documentation

平台分布

Codex

38.09%
按下载量换算127

Claude

31.03%
按下载量换算104

Cursor

18.77%
按下载量换算63

Gemini CLI

10.09%
按下载量换算34

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills