一键导入
modal-deploy
Deploy serverless Python functions and AI workloads to Modal. Use when user needs GPU, AI inference, serverless Python, or scheduled AI tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Deploy serverless Python functions and AI workloads to Modal. Use when user needs GPU, AI inference, serverless Python, or scheduled AI tasks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | modal-deploy |
| description | Deploy serverless Python functions and AI workloads to Modal. Use when user needs GPU, AI inference, serverless Python, or scheduled AI tasks. |
| argument-hint | [script-path] |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Write, Edit, Glob, Grep |
Deploy Python functions to Modal for serverless execution. $30/month free credit. GPU available for AI tasks.
pip install modalmodal setup (one-time auth)pip install modal
modal setup
# Opens browser for auth — click approve
# app.py
import modal
app = modal.App("my-automation")
@app.function()
def generate_post(topic: str) -> str:
"""Generate a social media post using AI."""
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.euron.one/api/v1/euri",
api_key=os.environ["EURI_API_KEY"],
)
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": f"Write a LinkedIn post about {topic}"}],
)
return response.choices[0].message.content
# Webhook endpoint (callable via HTTP)
@app.function()
@modal.web_endpoint(method="POST")
def webhook(data: dict):
topic = data.get("topic", "AI automation")
post = generate_post.remote(topic)
return {"post": post}
# Scheduled task (runs daily)
@app.function(schedule=modal.Cron("0 9 * * *"))
def daily_post():
post = generate_post.remote("AI automation trends")
# Post to LinkedIn, etc.
print(f"Generated: {post[:100]}...")
# Add secrets via Modal dashboard or CLI
modal secret create my-secrets \
EURI_API_KEY=your-key \
LINKEDIN_ACCESS_TOKEN=your-token
Then reference in code:
@app.function(secrets=[modal.Secret.from_name("my-secrets")])
def generate_post(topic: str):
...
# Test locally first
modal run app.py
# Deploy to cloud (persistent)
modal deploy app.py
curl -X POST https://your-app--webhook.modal.run \
-H "Content-Type: application/json" \
-d '{"topic": "AI in 2026"}'
@app.function(gpu="T4") # or "A100", "H100"
def run_inference(prompt: str):
# GPU-accelerated inference
...
GPU pricing:
$30 free credit = ~50 hours of T4 time.
keep_warm=1 for critical endpoints..env. Use Modal dashboard or modal secret create.run is one-time test, deploy is persistent.| Name | Type | Required | Description |
|---|---|---|---|
script | file_path | Yes | Python file to deploy |
gpu | string | No | GPU type: T4, A100, H100 (default: none/CPU) |
| Name | Type | Description |
|---|---|---|
url | string | Webhook endpoint URL |
deployed | boolean | Whether deployment succeeded |
| Name | Source |
|---|---|
MODAL_TOKEN_ID | modal setup (automatic) |
MODAL_TOKEN_SECRET | modal setup (automatic) |
| App secrets | Modal Dashboard or modal secret create |
vercel-deploy (Vercel frontend → calls Modal backend), github-actions-deploy (cron triggers Modal)
Free ($30/mo credit), then pay-per-second compute
DEPRECATED. Koyeb removed its free tier. Use github-actions-deploy or n8n-workflow-deploy instead.
Deploy any automation to run on schedule using GitHub Actions. Use when user asks to deploy with cron, schedule an automation, run code automatically, or deploy for free.
Deploy automations as n8n workflows — visual, webhook-driven, multi-step. Use when user asks to create a workflow, connect services visually, or deploy to n8n.
Deploy frontends, dashboards, webhooks, and API endpoints to Vercel. Use when user needs a web UI, dashboard, webhook receiver, or Next.js/React frontend.
Add 6-layer guardrail pipeline to any AI agent — RBAC, injection defense, output filtering, monitoring
A formalized skill for generating hyper-realistic, highly-controlled images using the Nano Banana 2 (Gemini 3.1 Flash) model through parameterized JSON prompting.