Communitygithub.com

Modal 云部署技能

将执行脚本部署到 Modal 云平台。当用户要求部署到 Modal、将代码推送到云端或更新 Modal 函数时使用。

Modal 云部署技能 是什么?

该技能用于将执行脚本部署到 Modal 云平台,实现无服务器云执行。它支持通过 `modal deploy` 命令部署单个文件(默认为 `execution/modal_webhook.py`),并提供多个预定义的 API 端点,包括指令执行、Webhook 列表、通用代理任务、潜在客户抓取、提案生成和 YouTube 离群点抓取。用户可以轻松添加新函数,只需在 `execution/modal_webhook.py` 中添加函数并使用 `@app.function()` 装饰器,然后重新部署即可。技能还支持 Cron 定时任务,通过 `schedule=modal.Cron(...)` 参数实现。Modal 的秘密凭据(`MODAL_TOKEN_ID` 和 `MODAL_TOKEN_SECRET`)在 Modal 仪表板中配置,而不是本地 `.env` 文件。该技能适用于支持 CLI 和 Python 的 AI 代理平台(如 Claude Code、Cursor、Codex),并与 `add-webhook` 技能可组合使用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aiagentwithdhruv/skills/tree/HEAD/modal-deploy

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Modal 云部署

目标

将执行脚本部署到 Modal,实现无服务器云执行。

部署命令

modal deploy execution/modal_webhook.py

关键端点

端点用途
directive根据 slug 执行指令
list_webhooks列出可用的 Webhook
general_agent运行通用代理任务
scrape_leads潜在客户抓取端点
generate_proposal提案生成
youtube_outliersYouTube 离群点抓取

添加新函数

  1. 向 execution/modal_webhook.py 添加函数
  2. 使用 @app.function() 或 @app.function(schedule=modal.Cron(...)) 进行装饰
  3. 部署:modal deploy execution/modal_webhook.py

环境

Modal 秘密在 Modal 仪表板中配置,而不是本地 .env。

Cron 任务

@app.function(schedule=modal.Cron("0 * * * *"))  # 每小时
async def my_scheduled_function():
    pass

模式

输入

名称类型必填描述
filefile_path否要部署的文件(默认:execution/modal_webhook.py)

输出

名称类型描述
deployedboolean部署是否成功
endpointsarray已部署的端点 URL 列表

凭据

名称来源
MODAL_TOKEN_IDModal 仪表板
MODAL_TOKEN_SECRETModal 仪表板

可组合技能

与此技能链式结合良好的技能:add-webhook

费用

Modal 计算(按使用付费)

Individual skills in this repo

This repo contains 10 individual skills — each has its own dedicated page.

aiagentwithdhruv/skills

Add new Modal webhooks for event-driven execution. Use when user asks to create a webhook, add an endpoint, or set up event triggers.

aiagentwithdhruv/skills

Answer Euron Gen AI Bootcamp doubts instantly. Covers Euri API setup across all frameworks (Python, LangChain, OpenAI SDK, TypeScript, n8n, curl), MCP server setup, common errors, model recommendations, and token limits. Use when someone in the bootcamp asks a question.

aiagentwithdhruv/skills

Manage emails across multiple Gmail accounts with unified tooling. Use when user asks to check email, read inbox, label emails, archive messages, or manage Gmail across accounts.

aiagentwithdhruv/skills

Auto-label Gmail emails into Action Required, Waiting On, and Reference categories. Use when user asks to label emails, triage inbox, categorize emails, or organize Gmail.

aiagentwithdhruv/skills

Scrape Google Maps for B2B leads with deep website enrichment and contact extraction. Use when user asks to find local businesses, scrape Google Maps, generate contractor lists, or build local service business databases.

aiagentwithdhruv/skills

Run Claude orchestrator locally with Cloudflare tunneling. Use when user asks to run locally, start local server, or test webhooks locally.

aiagentwithdhruv/skills

MCP server for AI-powered macOS control — apps, display, audio, files, screenshots, clipboard

aiagentwithdhruv/skills

Scrape and verify business leads using Apify, classify with LLM, enrich emails, and save to Google Sheets. Use when user asks to find leads, scrape businesses, generate prospect lists, or build lead databases for any industry or location.

aiagentwithdhruv/skills

Query Skool community content using RAG pipeline with vector search. Use when user asks to search Skool knowledge, find community answers, or query Skool content.

aiagentwithdhruv/skills

Scrape Upwork jobs and generate personalized proposals with cover letters. Use when user asks to find Upwork jobs, create Upwork proposals, or apply to Upwork listings.

相关技能