Skip to content

ericrisco/rsc-harness / skills/vercel

vercel

Verified

Use when operating an already-chosen Vercel project from the CLI or its config file — preview versus production deploys, debugging builds, pushing and pulling env vars across environments, custom domains, function runtime, duration and regions, crons, rewrites and headers, and deployment protection. NOT host choice, Docker or CI (that is `deployment`), NOT Next.js app code or next.config (that is `nextjs`), NOT DNS records or registrar transfers (that is `domains-dns`).

FileKindSize
SKILL.mdskill md13.7 KB
evals/README.mdmarkdown1.6 KB
evals/cases.yamlconfig3.5 KB
references/cli-cookbook.mdmarkdown4.0 KB
references/vercel-json.mdmarkdown4.5 KB
scripts/verify.shexecutablescript6.2 KB

scripts/verify.sh

View on GitHub
#!/usr/bin/env bash
# verify.sh — lint a target vercel.json against the 2025-2026 platform rules.
#
# Usage:
#   bash scripts/verify.sh [path/to/vercel.json]
#
# With no arg it discovers ./vercel.json (then a shallow search). If no vercel.json
# exists anywhere in range, that is NOT a failure — exit 0 (read-only, no false alarm).
#
# Checks (FAIL = exit 1; WARN = advisory, still exit 0 if nothing failed):
#   1. valid JSON
#   2. FAIL if both `builds` and `functions` are present (mutually exclusive)
#   3. FAIL if any `functions.*.memory` is set (Fluid caveat — memory is a dashboard setting)
#   4. WARN if `$schema` is missing (lose autocomplete/validation)
#   5. for each `crons[]`: FAIL if `path` is missing or does not start with `/`, or `schedule` missing
#
# Pure jq/node/python3 — no network, no auth, no mutation. Runs on macOS bash 3.2 and CI bash 5.
set -euo pipefail

if [[ -n "${NO_COLOR:-}" ]]; then YEL=""; GRN=""; RED=""; RST=""
else YEL=$'\033[33m'; GRN=$'\033[32m'; RED=$'\033[31m'; RST=$'\033[0m'; fi
warn() { printf '%s[warn]%s %s\n' "$YEL" "$RST" "$*"; }
ok()   { printf '%s[ ok ]%s %s\n' "$GRN" "$RST" "$*"; }
fail() { printf '%s[fail]%s %s\n' "$RED" "$RST" "$*"; }

have() { command -v "$1" >/dev/null 2>&1; }

# Resolve target.
TARGET="${1:-}"
if [[ -z "$TARGET" ]]; then
  if [[ -f vercel.json ]]; then
    TARGET="vercel.json"
  else
    TARGET=$(find . -maxdepth 2 -name 'vercel.json' -not -path '*/node_modules/*' 2>/dev/null | head -n1 || true)
  fi
fi

if [[ -z "$TARGET" || ! -f "$TARGET" ]]; then
  ok "no vercel.json found in range — nothing to verify"
  exit 0
fi

# Need a JSON engine. Prefer node (rich logic), then python3. jq optional fallback for validity only.
ENGINE=""
if have node; then ENGINE="node"
elif have python3; then ENGINE="python3"
elif have jq; then ENGINE="jq"
else
  warn "no node/python3/jq available — cannot lint $TARGET (skipping, not a failure)"
  exit 0
fi

FAILED=0

if [[ "$ENGINE" == "jq" ]]; then
  # jq-only: can only confirm validity. Use -e (some jq builds exit 0 on parse error without it).
  if jq -e . "$TARGET" >/dev/null 2>&1; then
    ok "valid JSON ($TARGET)"
    warn "only jq available — skipping builds/memory/crons rules (install node or python3 for full lint)"
  else
    fail "not valid JSON ($TARGET)"; FAILED=1
  fi
  if [[ $FAILED -eq 0 ]]; then ok "all checks passed"; else fail "checks failed"; fi
  exit "$FAILED"
fi

# Full lint via node or python3. The runner prints lines: "OK …", "WARN …", "FAIL …".
run_node() {
node - "$TARGET" <<'JS'
const fs = require("fs");
const path = process.argv[2];
let cfg;
try { cfg = JSON.parse(fs.readFileSync(path, "utf8")); }
catch (e) { console.log("FAIL not valid JSON: " + e.message); process.exit(0); }
console.log("OK valid JSON (" + path + ")");

const hasBuilds = Object.prototype.hasOwnProperty.call(cfg, "builds");
const hasFns = Object.prototype.hasOwnProperty.call(cfg, "functions");
if (hasBuilds && hasFns) console.log("FAIL `builds` and `functions` are mutually exclusive — remove `builds`");

if (hasFns && cfg.functions && typeof cfg.functions === "object") {
  for (const [glob, val] of Object.entries(cfg.functions)) {
    if (val && typeof val === "object" && Object.prototype.hasOwnProperty.call(val, "memory")) {
      console.log("FAIL functions[\"" + glob + "\"].memory is set — under Fluid, memory is a dashboard setting, not vercel.json");
    }
  }
}

if (!Object.prototype.hasOwnProperty.call(cfg, "$schema")) {
  console.log("WARN missing `$schema` — add \"https://openapi.vercel.sh/vercel.json\" for validation");
}

if (Object.prototype.hasOwnProperty.call(cfg, "crons")) {
  const crons = cfg.crons;
  if (!Array.isArray(crons)) {
    console.log("FAIL `crons` must be an array");
  } else {
    crons.forEach((c, i) => {
      if (!c || typeof c !== "object") { console.log("FAIL crons[" + i + "] is not an object"); return; }
      if (typeof c.path !== "string" || c.path.length === 0) console.log("FAIL crons[" + i + "] missing `path`");
      else if (c.path[0] !== "/") console.log("FAIL crons[" + i + "] path must start with `/` (got \"" + c.path + "\")");
      if (typeof c.schedule !== "string" || c.schedule.length === 0) console.log("FAIL crons[" + i + "] missing `schedule`");
    });
  }
}
JS
}

run_python() {
python3 - "$TARGET" <<'PY'
import json, sys
path = sys.argv[1]
try:
    with open(path) as f:
        cfg = json.load(f)
except Exception as e:
    print("FAIL not valid JSON: %s" % e); sys.exit(0)
print("OK valid JSON (%s)" % path)

has_builds = "builds" in cfg
has_fns = "functions" in cfg
if has_builds and has_fns:
    print("FAIL `builds` and `functions` are mutually exclusive — remove `builds`")

if has_fns and isinstance(cfg.get("functions"), dict):
    for glob, val in cfg["functions"].items():
        if isinstance(val, dict) and "memory" in val:
            print('FAIL functions["%s"].memory is set — under Fluid, memory is a dashboard setting, not vercel.json' % glob)

if "$schema" not in cfg:
    print('WARN missing `$schema` — add "https://openapi.vercel.sh/vercel.json" for validation')

if "crons" in cfg:
    crons = cfg["crons"]
    if not isinstance(crons, list):
        print("FAIL `crons` must be an array")
    else:
        for i, c in enumerate(crons):
            if not isinstance(c, dict):
                print("FAIL crons[%d] is not an object" % i); continue
            p = c.get("path")
            if not isinstance(p, str) or not p:
                print("FAIL crons[%d] missing `path`" % i)
            elif not p.startswith("/"):
                print('FAIL crons[%d] path must start with `/` (got "%s")' % (i, p))
            if not isinstance(c.get("schedule"), str) or not c.get("schedule"):
                print("FAIL crons[%d] missing `schedule`" % i)
PY
}

if [[ "$ENGINE" == "node" ]]; then OUT=$(run_node); else OUT=$(run_python); fi

# Render results and set exit status.
while IFS= read -r line; do
  [[ -z "$line" ]] && continue
  case "$line" in
    OK\ *)   ok   "${line#OK }" ;;
    WARN\ *) warn "${line#WARN }" ;;
    FAIL\ *) fail "${line#FAIL }"; FAILED=1 ;;
    *)       printf '%s\n' "$line" ;;
  esac
done <<EOF
$OUT
EOF

if [[ $FAILED -eq 0 ]]; then ok "all checks passed (warnings are not failures)"
else fail "one or more checks failed"; fi
exit "$FAILED"
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall