Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

modal-knowledge模态知识

Agent Skill

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

总安装

2,105

周安装

86

GitHub Stars

33

下载量

674
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/josiahsiegel/claude-plugin-marketplace --skill modal-knowledge

简介

用于查找和筛选相关信息以支持知识检索任务。

  • 适合根据关键词或场景快速定位候选结果。modal-knowledge 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 可结合来源仓库 README 了解具体搜索能力边界。
  • 安装前需确认是否需联网及数据访问权限。
  • 注意维护频率和搜索结果的相关性保障机制。

SKILL.md

Modal Knowledge Skill

Comprehensive Modal.com platform knowledge covering all features, pricing, and best practices. Activate this skill when users need detailed information about Modal's serverless cloud platform.

Activation Triggers

Activate this skill when users ask about:

  • Modal.com platform features and capabilities
  • GPU-accelerated Python functions
  • Serverless container configuration
  • Modal pricing and billing
  • Modal CLI commands
  • Web endpoints and APIs on Modal
  • Scheduled/cron jobs on Modal
  • Modal volumes, secrets, and storage
  • Parallel processing with Modal
  • Modal deployment and CI/CD

Platform Overview

Modal is a serverless cloud platform for running Python code, optimized for AI/ML workloads with:

  • Zero Configuration: Everything defined in Python code
  • Fast GPU Startup: ~1 second container spin-up
  • Automatic Scaling: Scale to zero, scale to thousands
  • Per-Second Billing: Only pay for active compute
  • Multi-Cloud: AWS, GCP, Oracle Cloud Infrastructure

Core Components Reference

Apps and Functions

import modal

app = modal.App("app-name")

@app.function()
def basic_function(arg: str) -> str:
    return f"Result: {arg}"

@app.local_entrypoint()
def main():
    result = basic_function.remote("test")
    print(result)

Function Decorator Parameters

ParameterTypeDescription
imageImageContainer image configuration
gpustr/listGPU type(s): "T4", "A100", ["H100", "A100"]
cpufloatCPU cores (0.125 to 64)
memoryintMemory in MB (128 to 262144)
timeoutintMax execution seconds
retriesintRetry attempts on failure
secretslistSecrets to inject
volumesdictVolume mount points
scheduleCron/PeriodScheduled execution
concurrency_limitintMax concurrent executions
container_idle_timeoutintSeconds to keep warm
include_sourceboolAuto-sync source code

GPU Reference

Available GPUs

GPUMemoryUse Case~Cost/hr
T416 GBSmall inference$0.59
L424 GBMedium inference$0.80
A10G24 GBInference/fine-tuning$1.10
L40S48 GBHeavy inference$1.50
A100-40GB40 GBTraining$2.00
A100-80GB80 GBLarge models$3.00
H10080 GBCutting-edge$5.00
H200141 GBLargest models$5.00
B200180+ GBLatest gen$6.25

GPU Configuration

# Single GPU
@app.function(gpu="A100")

# Specific memory variant
@app.function(gpu="A100-80GB")

# Multi-GPU
@app.function(gpu="H100:4")

# Fallbacks (tries in order)
@app.function(gpu=["H100", "A100", "any"])

# "any" = L4, A10G, or T4
@app.function(gpu="any")

Image Building

Base Images

# Debian slim (recommended)
modal.Image.debian_slim(python_version="3.11")

# From Dockerfile
modal.Image.from_dockerfile("./Dockerfile")

# From Docker registry
modal.Image.from_registry("nvidia/cuda:12.1.0-base-ubuntu22.04")

Package Installation

# pip (standard)
image.pip_install("torch", "transformers")

# uv (FASTER - 10-100x)
image.uv_pip_install("torch", "transformers")

# System packages
image.apt_install("ffmpeg", "libsm6")

# Shell commands
image.run_commands("apt-get update", "make install")

Adding Files

# Single file
image.add_local_file("./config.json", "/app/config.json")

# Directory
image.add_local_dir("./models", "/app/models")

# Python source
image.add_local_python_source("my_module")

# Environment variables
image.env({"VAR": "value"})

Build-Time Function

def download_model():
    from huggingface_hub import snapshot_download
    snapshot_download("model-name")

image.run_function(download_model, secrets=[...])

Storage

Volumes

# Create/reference volume
vol = modal.Volume.from_name("my-vol", create_if_missing=True)

# Mount in function
@app.function(volumes={"/data": vol})
def func():
    # Read/write to /data
    vol.commit()  # Persist changes

Secrets

# From dashboard (recommended)
modal.Secret.from_name("secret-name")

# From dictionary
modal.Secret.from_dict({"KEY": "value"})

# From local env
modal.Secret.from_local_environ(["KEY1", "KEY2"])

# From .env file
modal.Secret.from_dotenv()

# Usage
@app.function(secrets=[modal.Secret.from_name("api-keys")])
def func():
    import os
    key = os.environ["API_KEY"]

Dict and Queue

# Distributed dict
d = modal.Dict.from_name("cache", create_if_missing=True)
d["key"] = "value"
d.put("key", "value", ttl=3600)

# Distributed queue
q = modal.Queue.from_name("jobs", create_if_missing=True)
q.put("task")
item = q.get()

Web Endpoints

FastAPI Endpoint (Simple)

@app.function()
@modal.fastapi_endpoint()
def hello(name: str = "World"):
    return {"message": f"Hello, {name}!"}

ASGI App (Full FastAPI)

from fastapi import FastAPI
web_app = FastAPI()

@web_app.post("/predict")
def predict(text: str):
    return {"result": process(text)}

@app.function()
@modal.asgi_app()
def fastapi_app():
    return web_app

WSGI App (Flask)

from flask import Flask
flask_app = Flask(__name__)

@app.function()
@modal.wsgi_app()
def flask_endpoint():
    return flask_app

Custom Web Server

@app.function()
@modal.web_server(port=8000)
def custom_server():
    subprocess.run(["python", "-m", "http.server", "8000"])

Custom Domains

@modal.asgi_app(custom_domains=["api.example.com"])

Scheduling

Cron

# Daily at 8 AM UTC
@app.function(schedule=modal.Cron("0 8 * * *"))

# With timezone
@app.function(schedule=modal.Cron("0 6 * * *", timezone="America/New_York"))

Period

@app.function(schedule=modal.Period(hours=5))
@app.function(schedule=modal.Period(days=1))

Note: Scheduled functions only run with modal deploy, not modal run.


Parallel Processing

Map

# Parallel execution (up to 1000 concurrent)
results = list(func.map(items))

# Unordered (faster)
results = list(func.map(items, order_outputs=False))

Starmap

# Spread args
pairs = [(1, 2), (3, 4)]
results = list(add.starmap(pairs))

Spawn

# Async job (returns immediately)
call = func.spawn(data)
result = call.get()  # Get result later

# Spawn many
calls = [func.spawn(item) for item in items]
results = [call.get() for call in calls]

Container Lifecycle (Classes)

@app.cls(gpu="A100", container_idle_timeout=300)
class Server:

    @modal.enter()
    def load(self):
        self.model = load_model()

    @modal.method()
    def predict(self, text):
        return self.model(text)

    @modal.exit()
    def cleanup(self):
        del self.model

Concurrency

@modal.concurrent(max_inputs=100, target_inputs=80)
@modal.method()
def batched(self, item):
    pass

CLI Commands

Development

modal run app.py              # Run function
modal serve app.py            # Hot-reload dev server
modal shell app.py            # Interactive shell
modal shell app.py --gpu A100 # Shell with GPU

Deployment

modal deploy app.py           # Deploy
modal app list                # List apps
modal app logs app-name       # View logs
modal app stop app-name       # Stop app

Resources

# Volumes
modal volume create name
modal volume list
modal volume put name local remote
modal volume get name remote local

# Secrets
modal secret create name KEY=value
modal secret list

# Environments
modal environment create staging

Pricing (2025)

Plans

PlanPriceContainersGPU Concurrency
StarterFree ($30 credits)10010
Team$250/month100050
EnterpriseCustomUnlimitedCustom

Compute

  • CPU: $0.0000131/core/sec
  • Memory: $0.00000222/GiB/sec
  • GPUs: See GPU table above

Special Programs

  • Startups: Up to $25k credits
  • Researchers: Up to $10k credits

Best Practices

  1. Use @modal.enter() for model loading
  2. Use uv_pip_install for faster builds
  3. Use GPU fallbacks for availability
  4. Set appropriate timeouts and retries
  5. Use environments (dev/staging/prod)
  6. Download models during build, not runtime
  7. Use order_outputs=False when order doesn't matter
  8. Set container_idle_timeout to balance cost/latency
  9. Monitor costs in Modal dashboard
  10. Test with modal run before modal deploy

Common Patterns

LLM Inference

@app.cls(gpu="A100", container_idle_timeout=300)
class LLM:
    @modal.enter()
    def load(self):
        from vllm import LLM
        self.llm = LLM(model="...")

    @modal.method()
    def generate(self, prompt):
        return self.llm.generate([prompt])

Batch Processing

@app.function(volumes={"/data": vol})
def process(file):
    # Process file
    vol.commit()

# Parallel
results = list(process.map(files))

Scheduled ETL

@app.function(
    schedule=modal.Cron("0 6 * * *"),
    secrets=[modal.Secret.from_name("db")]
)
def daily_etl():
    extract()
    transform()
    load()

Quick Reference

TaskCode
Create appapp = modal.App("name")
Basic function@app.function()
With GPU@app.function(gpu="A100")
With image@app.function(image=img)
Web endpoint@modal.asgi_app()
Scheduledschedule=modal.Cron("...")
Mount volumevolumes={"/path": vol}
Use secretsecrets=[modal.Secret.from_name("x")]
Parallel mapfunc.map(items)
Async spawnfunc.spawn(arg)
Class pattern@app.cls() with @modal.enter()

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.56%
按下载量换算192

OpenCode

23.86%
按下载量换算161

Antigravity

17.09%
按下载量换算115

Gemini CLI

12.94%
按下载量换算87

Cursor

8.12%
按下载量换算55

Codex

3.96%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills