用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/UltronCore/claude-skill-vault --skill replicate命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Build Raycast extensions using the Raycast API: commands, list views, forms, and preferences. Triggers on: Raycast, @raycast/api, raycast extension, raycast command, showToast, List.Item, Action.
基于 SOC 职业分类
| name | replicate |
| description | Replicate cloud platform for running and deploying ML models via simple Python API |
| version | 1.0.0 |
| tags | ["ml","inference","cloud","image-generation","deployment","api","models"] |
Replicate is a cloud platform for running ML models via a simple Python API. It hosts thousands of community models (Stable Diffusion, Flux, Llama, Whisper, SDXL, ControlNet, etc.) with pay-per-second billing. You can also deploy your own models in Docker containers. The API is extremely simple — pass inputs, get outputs — with no infrastructure management. Especially strong for image/video generation, audio processing, and vision models.
GitHub: https://github.com/replicate/replicate-python (1k+ stars) Website: https://replicate.com
pip install replicate
export REPLICATE_API_TOKEN="your-token-here"
import replicate
# Run Flux for image generation
output = replicate.run(
"black-forest-labs/flux-schnell",
input={
"prompt": "A photorealistic image of a robot painting a sunset",
"num_outputs": 1,
"aspect_ratio": "16:9",
"output_format": "webp",
}
)
# output is a list of URLs
for image_url in output:
print(f"Generated image: {image_url}")
import replicate
import requests
from pathlib import Path
output = replicate.run(
"black-forest-labs/flux-dev",
input={
"prompt": "Abstract digital art, vibrant colors, 8k resolution",
"num_inference_steps": 28,
"guidance": 3.5,
"width": 1440,
"height": 1024,
}
)
for i, image_url in enumerate(output):
response = requests.get(str(image_url))
Path(f"output_{i}.webp").write_bytes(response.content)
print(f"Saved output_{i}.webp")
import replicate
# Stream text output from Llama
for event in replicate.stream(
"meta/meta-llama-3-70b-instruct",
input={
"prompt": "Explain the attention mechanism in transformers",
"max_tokens": 512,
"temperature": 0.7,
"system_prompt": "You are a helpful ML educator.",
}
):
print(str(event), end="", flush=True)
print()
import replicate
# Transcribe a local audio file
with open("audio.mp3", "rb") as f:
output = replicate.run(
"openai/whisper",
input={
"audio": f,
"language": "en",
"transcription": "plain text",
"translate": False,
}
)
print(output["transcription"])
# Or from a URL
output = replicate.run(
"vaibhavs10/incredibly-fast-whisper",
input={
"audio": "https://example.com/podcast.mp3",
"language": "None", # Auto-detect
"batch_size": 64,
}
)
print(output["text"])
import replicate
# Image-to-image transformation
output = replicate.run(
"stability-ai/sdxl",
input={
"image": open("input.jpg", "rb"),
"prompt": "Convert to anime art style, vivid colors",
"strength": 0.6,
"num_inference_steps": 30,
}
)
# ControlNet for precise control
output = replicate.run(
"jagilley/controlnet-canny",
input={
"image": open("sketch.png", "rb"),
"prompt": "Professional product photo, white background",
"num_samples": "1",
"image_resolution": "512",
}
)
import replicate
import time
# Create a prediction and check status later
prediction = replicate.predictions.create(
version="stability-ai/stable-video-diffusion:3f0457e4619daac51203dedb472816fd4af51f3149fa7a9e0b5ffcf1b8172438",
input={
"input_image": open("frame.jpg", "rb"),
"sizing_strategy": "maintain_aspect_ratio",
"frames_per_second": 6,
"motion_bucket_id": 127,
}
)
print(f"Prediction ID: {prediction.id}, Status: {prediction.status}")
# Poll for completion
while prediction.status not in ["succeeded", "failed", "canceled"]:
time.sleep(2)
prediction.reload()
print(f"Status: {prediction.status}")
if prediction.status == "succeeded":
print(f"Output: {prediction.output}")
else:
print(f"Failed: {prediction.error}")
# 1. Create a Cog model (cog.yaml + predict.py)
# Then deploy via CLI: cog push r8.im/your-username/your-model
# 2. Use the deployed model in Python
import replicate
# Run your custom deployed model
output = replicate.run(
"your-username/your-model:latest",
input={"text": "Hello, world!", "temperature": 0.8}
)
print(output)
# Or create a deployment for consistent latency
deployment = replicate.deployments.get("your-username/your-deployment-name")
prediction = deployment.predictions.create(
input={"text": "Hello from deployment!"}
)
prediction.wait()
print(prediction.output)
import replicate
import concurrent.futures
prompts = [
"A serene mountain landscape at dawn",
"A futuristic city with flying cars at night",
"A cozy coffee shop on a rainy afternoon",
]
def generate_image(prompt: str) -> str:
output = replicate.run(
"black-forest-labs/flux-schnell",
input={"prompt": prompt, "num_outputs": 1}
)
return str(output[0])
# Run in parallel (respects your API rate limits)
with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor:
futures = {executor.submit(generate_image, p): p for p in prompts}
for future in concurrent.futures.as_completed(futures):
prompt = futures[future]
url = future.result()
print(f"Prompt: {prompt[:40]}... -> {url}")
webhook parameteropen("file", "rb") for local files; URLs work toolatest can change behaviortogether-ai — alternative for LLM inference (cheaper for text)modal-gpu — run your own models on serverless GPU with more controldiffusion-models — understanding the models running on Replicatevllm-serving — self-hosted alternative for LLM servingcomputer-vision — vision model patterns that pair with Replicatetool: replicate
category: ml-inference
tier: platform
interface: python-sdk, rest-api
platform: cloud
stars: 1000+