ericrisco/rsc-harness / skills/netlify
netlify
VerifiedUse when deploying or operating a site on Netlify — writing or fixing netlify.toml, authoring Functions or Edge Functions, redirects, rewrites and headers, env vars per deploy context, and shipping via the Netlify CLI. NOT deploying to Vercel (that is `vercel`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.4 KB |
| evals/README.md | markdown | 834 B |
| evals/cases.yaml | config | 2.9 KB |
| references/functions.md | markdown | 3.3 KB |
| references/netlify-toml.md | markdown | 3.7 KB |
| scripts/verify.shexecutable | script | 3.0 KB |
scripts/verify.sh
View on GitHub#!/usr/bin/env bash
# verify.sh — read-only sanity check for a Netlify config artifact.
# Usage: verify.sh [TARGET_DIR] (default: current directory)
# Exits 0 on a clean OR empty target (no netlify.toml => nothing to check, not a failure).
# Exits 1 only when a netlify.toml is present AND structurally wrong.
set -uo pipefail
TARGET="${1:-.}"
TOML="$TARGET/netlify.toml"
fail=0
pass() { printf 'PASS: %s\n' "$1"; }
warn() { printf 'WARN: %s\n' "$1"; }
bad() { printf 'FAIL: %s\n' "$1"; fail=1; }
if [ ! -f "$TOML" ]; then
echo "INFO: no netlify.toml in '$TARGET' — nothing to verify."
exit 0
fi
pass "found $TOML"
# 1. Does it parse as TOML?
if command -v python3 >/dev/null 2>&1; then
if python3 - "$TOML" <<'PY' 2>/dev/null
import sys
try:
import tomllib
except ModuleNotFoundError:
sys.exit(42) # signal "no tomllib" -> skip, not fail
with open(sys.argv[1], "rb") as f:
tomllib.load(f)
PY
then
pass "netlify.toml parses as valid TOML"
else
rc=$?
if [ "$rc" = "42" ]; then
warn "python3 has no tomllib (Python < 3.11) — skipping parse check"
else
bad "netlify.toml does not parse as valid TOML"
fi
fi
else
warn "python3 not found — skipping TOML parse check"
fi
# 2. SPA fallback (to "/index.html") must be status = 200, not a 3xx.
# Scan each [[redirects]] block; if its `to` is /index.html, its status must be 200.
if command -v python3 >/dev/null 2>&1 && python3 -c "import tomllib" >/dev/null 2>&1; then
python3 - "$TOML" <<'PY'
import sys, tomllib
with open(sys.argv[1], "rb") as f:
data = tomllib.load(f)
reds = data.get("redirects", [])
ok = True
for r in reds:
if "from" not in r or "to" not in r:
print("FAIL: a [[redirects]] block is missing 'from' or 'to'")
ok = False
if r.get("to") == "/index.html" and r.get("status", 301) != 200:
print("FAIL: SPA fallback (to=/index.html) must be status = 200, not %r" % r.get("status", 301))
ok = False
if "build" not in data:
print("WARN: no [build] table — builds will rely on dashboard settings")
if ok:
print("PASS: redirects have from+to and any SPA fallback is status 200")
sys.exit(0 if ok else 1)
PY
[ $? -ne 0 ] && fail=1
else
# Fallback grep-based check when tomllib is unavailable.
if grep -Eq 'to[[:space:]]*=[[:space:]]*"/index\.html"' "$TOML"; then
# crude: ensure a status 200 appears near a /index.html target
if grep -Eq 'status[[:space:]]*=[[:space:]]*200' "$TOML"; then
pass "SPA fallback target present and a status = 200 is declared"
else
bad "SPA fallback to /index.html found but no status = 200 declared"
fi
fi
fi
# 3. Optional: if the netlify CLI is installed, surface its parse via build --dry (best-effort).
if command -v netlify >/dev/null 2>&1; then
pass "netlify CLI available (run 'netlify build --dry' for a deeper check)"
else
warn "netlify CLI not installed — CLI-level checks skipped"
fi
if [ "$fail" -ne 0 ]; then
echo "RESULT: FAIL"
exit 1
fi
echo "RESULT: PASS"
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 |