ericrisco/rsc-harness / skills/runpod
runpod
VerifiedUse when running GPU compute on RunPod and deciding between Pods (hourly, always-on) and Serverless (per-second, autoscaling) for training, fine-tuning or inference — serverless endpoints, handler workers, worker Docker templates, network volumes, timeout and worker-count tuning, cold starts, and runaway bills. NOT Python-native serverless GPU with snapshot autoscaling (that is `modal`), NOT calling hosted prebuilt model APIs (that is `replicate`), NOT pulling weights from the Hub (that is `huggingface`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.1 KB |
| evals/README.md | markdown | 800 B |
| evals/cases.yaml | config | 3.0 KB |
| references/cost-and-scaling.md | markdown | 3.3 KB |
| references/serverless-workers.md | markdown | 3.1 KB |
| scripts/verify.shexecutable | script | 5.3 KB |
scripts/verify.sh
View on GitHub#!/usr/bin/env bash
set -euo pipefail
# Usage: bash scripts/verify.sh [TARGET_DIR] (default: .)
# Statically lints a RunPod worker directory. Pure grep/parse — no network, no RunPod
# account, never writes or installs anything. Read-only.
#
# Exit 0 = all applicable checks passed (or the target has nothing to check — an empty or
# non-worker dir is NOT a failure). Non-zero = a real problem found in present files.
# Portable to stock macOS bash 3.2: no mapfile, arrays guarded under set -u.
TARGET="${1:-.}"
if [ -t 1 ] && command -v tput >/dev/null 2>&1 && [ "$(tput colors 2>/dev/null || echo 0)" -ge 8 ]; then
YELLOW="$(tput setaf 3)"; RED="$(tput setaf 1)"; GREEN="$(tput setaf 2)"; RESET="$(tput sgr0)"
else
YELLOW=""; RED=""; GREEN=""; RESET=""
fi
rc=0
pass() { printf '%s[PASS]%s %s\n' "$GREEN" "$RESET" "$1"; }
warn() { printf '%s[WARN]%s %s\n' "$YELLOW" "$RESET" "$1" >&2; }
fail() { printf '%s[FAIL]%s %s\n' "$RED" "$RESET" "$1" >&2; rc=1; }
if [ ! -d "$TARGET" ]; then
fail "target dir not found: $TARGET"
exit 1
fi
# Prune patterns as a literal arg array — each token is its own quoted word, so the shell
# can never word-split them or glob-expand them against the cwd. (Unquoted `$PRUNE` here
# silently corrupts find when run from a real project root containing node_modules/.git/venv,
# emptying the file lists so every check — including the hardcoded-key check — passes.)
PRUNE=( '(' -path '*/node_modules/*' -o -path '*/.venv/*' -o -path '*/venv/*' -o -path '*/.git/*' ')' -prune -o )
# Collect file lists (newline-delimited; bash 3.2 safe — arrays only used as literal argv).
PY_FILES="$(find "$TARGET" "${PRUNE[@]}" -name '*.py' -print 2>/dev/null || true)"
DOCKERFILES="$(find "$TARGET" "${PRUNE[@]}" -iname 'Dockerfile*' -print 2>/dev/null || true)"
CONFIGS="$(find "$TARGET" "${PRUNE[@]}" \( -name '*.json' -o -name '*.yaml' -o -name '*.yml' \) -print 2>/dev/null || true)"
checked=0
# 1. Python worker: runpod.serverless.start present, and a handler with return/yield.
if [ -n "$PY_FILES" ]; then
if printf '%s\n' "$PY_FILES" | xargs grep -lE 'runpod\.serverless\.start\(' 2>/dev/null | grep -q .; then
checked=1
pass "found runpod.serverless.start( in a worker file"
# Any handler-ish def with a body that returns or yields.
if printf '%s\n' "$PY_FILES" | xargs grep -lE '\b(return|yield)\b' 2>/dev/null | grep -q .; then
pass "handler returns or yields a result"
else
fail "no handler 'return' or 'yield' found — worker would produce no output"
fi
else
warn "no runpod.serverless.start( found — not a serverless worker dir, skipping worker checks"
fi
# 2. No hardcoded API key. Flag literal string assignments to api_key / RUNPOD_API_KEY.
if printf '%s\n' "$PY_FILES" | xargs grep -nE '(runpod\.api_key|RUNPOD_API_KEY)[[:space:]]*=[[:space:]]*["'"'"'][A-Za-z0-9_-]+["'"'"']' 2>/dev/null | grep -q .; then
checked=1
fail "hardcoded API key literal found — read it from os.environ['RUNPOD_API_KEY']"
else
[ -n "$PY_FILES" ] && pass "no hardcoded API key literal in Python sources"
fi
fi
# 3. Serverless config (json/yaml) — bounded max_workers + timeout keys present.
if [ -n "$CONFIGS" ]; then
CFG_WITH_MW="$(printf '%s\n' "$CONFIGS" | xargs grep -lEi 'max[_-]?workers' 2>/dev/null || true)"
if [ -n "$CFG_WITH_MW" ]; then
checked=1
# Must be a finite positive int — fail on missing/0/negative/inf.
if printf '%s\n' "$CFG_WITH_MW" | xargs grep -hEi 'max[_-]?workers' 2>/dev/null \
| grep -qE 'max[_-]?[Ww]orkers["'"'"']?[[:space:]]*[:=][[:space:]]*[1-9][0-9]*'; then
pass "max_workers is a bounded positive integer"
else
fail "max_workers present but not a bounded positive int (set a finite ceiling)"
fi
if printf '%s\n' "$CFG_WITH_MW" | xargs grep -qiE 'idle[_-]?timeout' 2>/dev/null; then
pass "idle timeout set in config"
else
fail "config has max_workers but no idle timeout — set it explicitly"
fi
if printf '%s\n' "$CFG_WITH_MW" | xargs grep -qiE 'execution[_-]?timeout' 2>/dev/null; then
pass "execution timeout set in config"
else
fail "config has max_workers but no execution timeout — a hung job can run for days"
fi
fi
fi
# 4. Dockerfile — pinned FROM (not bare/:latest) and a CMD/ENTRYPOINT.
if [ -n "$DOCKERFILES" ]; then
while IFS= read -r df; do
[ -n "$df" ] || continue
checked=1
fromline="$(grep -iE '^[[:space:]]*FROM[[:space:]]' "$df" 2>/dev/null | head -1 || true)"
if [ -z "$fromline" ]; then
fail "$df: no FROM line"
elif printf '%s' "$fromline" | grep -qiE ':latest([[:space:]]|$)'; then
fail "$df: FROM uses :latest — pin a version tag"
elif printf '%s' "$fromline" | grep -qE '[^[:space:]]+:[^[:space:]]+'; then
pass "$df: FROM is pinned to a tag"
else
fail "$df: FROM has no tag — pin a version"
fi
if grep -qiE '^[[:space:]]*(CMD|ENTRYPOINT)[[:space:]]' "$df" 2>/dev/null; then
pass "$df: has CMD/ENTRYPOINT"
else
fail "$df: no CMD or ENTRYPOINT — worker has no entrypoint"
fi
done <<EOF
$DOCKERFILES
EOF
fi
if [ "$checked" -eq 0 ]; then
warn "no RunPod worker artifacts found in '$TARGET' — nothing to lint"
fi
if [ "$rc" -ne 0 ]; then
printf '%sverify.sh: FAILED%s\n' "$RED" "$RESET" >&2
exit "$rc"
fi
printf '%sverify.sh: OK%s\n' "$GREEN" "$RESET"
exit 0
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |