
flash
Write and deploy code-first Runpod Serverless with runpod-flash: @Endpoint/@remote, flash dev, resource configuration, and debugging. Use runpod-build-template for explicit Dockerfile/template project authoring, and runpodctl/runpod-mcp for infrastructure management.
- Installs
- 13.9K
- Last 24h
- +144
- Trending rank
- #1521
- Security
- Pass
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/runpod/runpod-plugins-official --skill flash- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads flash automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
Runpod Flash
For an explicit Dockerfile/template project request, use runpod-build-template. Do not replace that deliverable with Flash unless the user chooses its code-first workflow.
Write code locally, iterate with flash dev — it runs your functions on remote Runpod GPUs/CPUs with hot-reload and live worker logs — then flash deploy to ship. Endpoint handles provisioning.
runpod-flash releases on its own cadence, so flash --help and flash <command> --help
are authoritative for the command surface — this skill is the mental model, the decision
rules, and the gotchas that help output does not carry. Confirm the installed version with
pip show runpod-flash before concluding a subcommand or flag is unavailable.
Worked examples first for anything multi-step. Flash appears in verified end-to-end paths — 03 variant B (whisper endpoint via flash) and 08 (fine-tune → serve); the full index is runpod/golden-paths/README.md. Open the matching path before planning a deploy — it carries the ordering and the cost cleanup this skill only summarizes.
Load on demand — this skill keeps the mental model + gotchas inline; details live in reference/:
| Need | Read |
|---|---|
Install, auth, flash init, and the full flash command list | reference/setup-and-cli.md |
Endpoint(...) constructor params, NetworkVolume/PodTemplate/EndpointJob, GPU & CPU enum tables | reference/api.md |
| Worked patterns — choosing a model, warm-worker model loading, CPU→GPU pipeline, parallel calls | reference/patterns.md |
Quick start: uv tool install runpod-flash → flash login (or export RUNPOD_API_KEY=...) → flash init my-project → flash dev. Details in reference/setup-and-cli.md.
Dev vs Deploy
flash dev— iterate. Local server at:8888, but your decorated functions execute on remote GPU/CPU workers. Hot-reloads on save and streams the worker's logs live to the terminal. No build/upload/deploy wait — use this the whole time you develop.flash deploy— ship. Builds an artifact and deploys a stable endpoint. Slow (build + upload + provision); only do this once the code works underflash dev.
flash dev ships only the function body to the worker, so a NameError for a
module-level name surfaces immediately here. flash deploy imports the whole module and
can mask that bug (see Gotcha #1). Develop against flash dev and you catch it first.
Autonomous Dev Loop
flash dev is a long-running server. Three rules:
- Run it in the background — don't block on it.
- Capture its output to a log file.
- Drive it over HTTP.
The captured log is the remote worker's live stream (cold start, model load, prints,
tracebacks) — read it to debug.
flash dev > /tmp/flash-dev.log 2>&1 & # background; never run it blocking
for i in $(seq 1 60); do grep -q "flash dev localhost:" /tmp/flash-dev.log && break; sleep 2; done # bounded ~2min; if it never appears, check the log for errors
URL=$(grep -o "localhost:[0-9]*" /tmp/flash-dev.log | head -1) # actual port (8888 bumps if taken)
curl -s "$URL/main/predict" -d '{"data": {...}}' # dispatches to the remote worker
- Read the real URL from the log — flash auto-bumps the port if 8888 is in use, and
prints
✓ flash dev localhost:<port>plus the route table. - Routes are namespaced by file:
main.py's/predictis served at/main/predict. - Two route shapes, two body shapes (mismatch →
422naming the missing field inloc):- Load-balanced (
@api.post("/predict")) →POST /main/predict, body is the arg at top level: a handlerdef predict(data: dict)wants{"data": {...}}(not the bare object). - Queue-based (bare
@Endpointdecorator) →POST /main/runsync(the local dev server only generates/runsync; production also exposes/run), body is double-wrapped ininput: a handlerdef synthesize(data: dict)wants{"input": {"data": {...}}}. The outerinputis the queue envelope; the inner key is the handler's param name.
- Load-balanced (
- Edit a handler and save — hot-reload re-syncs the body; just re-send the request, no
redeploy. Add
--auto-provisionto skip the first-call cold start.kill %1when done.
Endpoint: Three Modes
Full constructor params and the GPU/CPU enum tables are in reference/api.md.
Mode 1: Your Code (Queue-Based Decorator)
One function = one endpoint with its own workers.
from runpod_flash import Endpoint, GpuGroup
@Endpoint(name="my-worker", gpu=GpuGroup.AMPERE_80, workers=5, dependencies=["torch"])
async def compute(data):
import torch # MUST import inside function (cloudpickle)
return {"sum": torch.tensor(data, device="cuda").sum().item()}
result = await compute([1, 2, 3])
Mode 2: Your Code (Load-Balanced Routes)
Multiple HTTP routes share one pool of workers.
from runpod_flash import Endpoint, GpuGroup
api = Endpoint(name="my-api", gpu=GpuGroup.ADA_24, workers=(1, 5), dependencies=["torch"])
@api.post("/predict")
async def predict(data: list[float]):
import torch
return {"result": torch.tensor(data, device="cuda").sum().item()}
@api.get("/health")
async def health():
return {"status": "ok"}
Mode 3: External Image (Client)
Deploy a pre-built Docker image and call it via HTTP.
from runpod_flash import Endpoint, GpuGroup, PodTemplate
server = Endpoint(
name="my-server",
image="my-org/my-image:latest",
gpu=GpuGroup.AMPERE_80,
workers=1,
env={"HF_TOKEN": "xxx"},
template=PodTemplate(containerDiskInGb=100),
)
# LB-style
result = await server.post("/v1/completions", {"prompt": "hello"})
models = await server.get("/v1/models")
# QB-style
job = await server.run({"prompt": "hello"}) # optional: webhook="https://..." for completion callback
await job.wait()
print(job.output)
Connect to an existing endpoint by ID (no provisioning):
ep = Endpoint(id="abc123")
job = await ep.runsync({"prompt": "hello"}) # runsync wraps this as {"input": {"prompt": "hello"}}
print(job.output)
How Mode Is Determined
| Parameters | Mode |
|---|---|
name= only | Decorator (your code) |
image= set | Client (deploys image, then HTTP calls) |
id= set | Client (connects to existing, no provisioning) |
The table above is how the mode is picked from params. When to reach for image=:
When to use image= (custom container) vs your own code
Default to writing Python (decorator / routes) — it runs arbitrary code with
dependencies=[...]/system_dependencies=[...] and needs no Dockerfile. Even large
HuggingFace models stay in decorator mode (weights stream at runtime — see
reference/patterns.md → Loading ML models).
Reach for image= only when you need:
- a pre-built inference server — vLLM, TensorRT-LLM (
image="vllm/vllm-openai:latest", orrunpod/worker-vllm,runpod/worker-comfy) - system-level deps not pip-installable — a specific CUDA/cuDNN, OS libraries
- models baked into the image — to skip the runtime download entirely
- an existing Runpod Serverless worker — you already have a working image
Trade-off: image= mode can't run arbitrary Python (the image owns all logic) and the
image must implement a Runpod Serverless handler. Full list + examples:
https://docs.runpod.io/flash/custom-docker-images
Gotchas
- Only the function body ships to the worker -- most common error. Put imports and any module-level constants/helpers the function uses inside the decorated body.
flash deployimports the whole module so module globals happen to work;flash devships just the body, so a module-level name raisesNameError. A handler that works deployed can break under dev — fix it by moving everything inside. - Forgetting await -- all decorated functions and client methods need
await. - Missing dependencies -- must list in
dependencies=[]. - gpu/cpu are exclusive -- pick one per Endpoint.
- idle_timeout is seconds -- default 60s, not minutes.
- 10MB payload limit -- pass URLs, not large objects. Return binary (audio/images/files) as base64 in the JSON (
{"audio_b64": ...}) and decode client-side; for larger outputs write to a NetworkVolume or upload to storage and return a URL. - Client vs decorator --
image=/id== client. Otherwise = decorator. - Auto GPU switching requires workers >= 5 -- pass a list of GPU types (e.g.
gpu=[GpuGroup.ADA_24, GpuGroup.AMPERE_80]) and setworkers=5or higher. The platform only auto-switches GPU types based on supply when max workers is at least 5. runsynctimeout is 60s -- cold starts can exceed 60s. Useep.runsync(data, timeout=120)for first requests or useep.run()+job.wait()instead.- Request body shape (raw/external HTTP callers only) -- match the request shape to the endpoint type:
- LB routes (
@api.post(...)): send the handler arg at the top level —{"data": {...}}. - QB endpoints (bare
@Endpoint, hit via.../runor.../runsync): the worker callshandler(**job_input), so the request'sinputkeys must match the handler's parameter names —def transcribe(input_data: dict)wants{"input": {"input_data": {...}}}, anddef read(input: dict)wants{"input": {"input": {...}}}. A mismatch fails withgot an unexpected keyword argument …. Use**kwargsif the handler ignores the payload. - Never send an empty
input. A QB request with{"input": {}}is rejected by the worker SDK asJob has missing field(s): id or input— always include at least one key. - Context: the flash client (
ep.runsync(x),api.post(...)) hides the spreading, so this only bites raw HTTP/external callers (mismatch behavior verified 2026-07-10 via worker logs). See Autonomous Dev Loop.
- LB routes (
- Load a model once per worker (not per call) -- for real inference use a class
@Endpointwhose__init__loads the model once per worker (see reference/patterns.md → Loading ML models). In function-form, reconcile with #1 by caching in a module global inside the body so it works under bothflash devanddeploy:global _MODEL try: _MODEL except NameError: _MODEL = load_model() # runs once per worker, reused across calls - Native CUDA libs go in
dependencies=[]too -- e.g. CTranslate2/faster-whisper needsnvidia-cublas-cu12+nvidia-cudnn-cu12or it silently falls back to CPU. Add them alongside the Python package. - Silent 401 auth failure -- a set
RUNPOD_API_KEYenv var overrides theflash logintoken, so a bad/expired key wins. The failure is quiet: provisioning logsGraphQL request failed: 401, butflash devstill prints its normal ready line ("failed endpoints deploy on-demand"), so it looks healthy. When endpoints fail to provision:- Check the provisioning log for
GraphQL request failed: 401. - Verify the current key independently:
curl -s -o /dev/null -w '%{http_code}' https://api.runpod.io/v2/serverless -H "Authorization: Bearer $RUNPOD_API_KEY"(200 = good, 401 = bad). - Fix it:
unset RUNPOD_API_KEYto fall back to theflash logintoken, orexporta valid key.
- Check the provisioning log for
system_dependencies=adds to cold start -- apt packages (e.g.["ffmpeg", "espeak-ng"]) install on the worker before first use, so the initial call is slower (on top of any model download); warm calls are unaffected.- Teardown a deployed app with
flash app delete <app>--flash undeploy listmay show "no endpoints" for an app that is deployed and serving;flash app delete(orrunpodctl serverless delete <id>) reliably removes it.
Resources
- Setup & CLI: reference/setup-and-cli.md · API & compute enums: reference/api.md · Patterns: reference/patterns.md
- Flash source: https://github.com/runpod/flash
- Runnable examples: https://github.com/runpod/flash-examples — clone and adapt the closest one
- Package (PyPI): https://pypi.org/project/runpod-flash/
- Docs: https://docs.runpod.io/flash/overview
- Custom Docker images (when + how): https://docs.runpod.io/flash/custom-docker-images
- Storage / network volumes: https://docs.runpod.io/flash/configuration/storage
FAQ
What does the flash skill do?
Write and deploy code-first Runpod Serverless with runpod-flash: @Endpoint/@remote, flash dev, resource configuration, and debugging. Use runpod-build-template for explicit Dockerfile/template project authoring, and runpodctl/runpod-mcp for infrastructure management.
How do I install flash?
Run npx skills add https://github.com/runpod/runpod-plugins-official --skill flash in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/flash/ (personal) or .claude/skills/flash/ (project).
Which AI agents can use flash?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is flash safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains flash?
It is published by runpod in runpod/runpod-plugins-official. It has 13,874 recorded installs.
More from runpod/runpod-plugins-official
runpodctl
runpod/runpod-plugins-official
Runpod CLI for managing GPU/CPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send/receive). Use for terminal/CI/scripting, SSH setup, doctor, or when the Runpod MCP tools are not connected; prefer runpod-mcp for structured tool calls in an MCP-enabled session.
companion-clis
runpod/runpod-plugins-official
Companion CLIs for Runpod workflows — HuggingFace, GitHub, Docker, and AWS. Use runpod-build-template for complete template project authoring, and the ComfyUI model-repair guide in runpod-templates for imported workflows lacking model download metadata.
runpod
runpod/runpod-plugins-official
Start here for any Runpod task — running GPU/CPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-build-template, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.
runpod-usage
runpod/runpod-plugins-official
Explain Runpod architecture and design choices: Pods versus Serverless, GPU/VRAM, image construction, storage, networking, and workload development. For creating or improving a complete template project use runpod-build-template; execute infrastructure with runpodctl/runpod-mcp and code-first work with flash.
runpod-mcp
runpod/runpod-plugins-official
Manage Runpod infrastructure through the connected Runpod MCP server's tool calls (pods, serverless endpoints and jobs, templates, network volumes, registry credentials, secrets, clusters, the GPU/CPU catalog, and billing), and connect the server when it is missing (hosted or local npx). Load it before the first Runpod MCP tool call of a request: it routes the task to the journey skill that carries the procedure, owns the answer contract and the rules on which resources you may change, and defers to runpodctl for the terminal, file transfer, and SSH setup; template project and Hub listing authoring routes to runpod-build-template.
runpod-migrate
runpod/runpod-plugins-official
Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.