ericrisco/rsc-harness / skills/hetzner
hetzner
UnverifiedUse when provisioning or hardening a Hetzner Cloud VPS: picking the plan/location (CX/CPX/CAX/CCX), bringing it up reproducibly with hcloud + cloud-init, locking down SSH, and wiring the Cloud Firewall to hand off a Docker-ready host. NOT app deploys on Coolify (that is `coolify`), NOT Dockerfiles (that is `docker`), NOT another provider (that is `digitalocean`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.3 KB |
| evals/README.md | markdown | 1.8 KB |
| evals/cases.yaml | config | 3.6 KB |
| references/cloud-init.md | markdown | 4.3 KB |
| references/plans-and-locations.md | markdown | 2.9 KB |
| scripts/verify.shexecutable | script | 3.9 KB |
scripts/verify.sh
View on GitHub#!/usr/bin/env bash
set -euo pipefail
# ============================================================================
# NAME
# verify.sh — hetzner cloud-init / SSH-hardening static lint
#
# USAGE
# ./verify.sh [path/to/cloud-init.yaml]
# With no argument it scans the current directory for cloud-init*.yaml|yml.
# Run it BEFORE you create a server, against the user-data file you will pass
# to `hcloud server create --user-data-from-file`.
#
# WHAT IT CHECKS (pure static text, NO network, NO writes)
# FAIL root SSH not disabled (need PermitRootLogin no OR disable_root: true)
# FAIL password auth not off (need PasswordAuthentication no OR ssh_pwauth: false)
# FAIL no SSH key present (need ssh_authorized_keys / ssh-ed25519 / ssh-rsa)
# WARN no firewall step (ufw / nftables / hcloud firewall referenced)
# WARN fail2ban absent
#
# GUARANTEES
# - Read-only and idempotent: never writes, never calls the network.
# - Exits 0 on an empty/clean target (no files found = nothing to fail).
# - Portable to stock macOS bash 3.2 (no mapfile, no associative arrays).
#
# EXIT CODES
# 0 No FAILs (warnings are fine; no files found is fine).
# 1 At least one FAIL in at least one scanned file.
# ============================================================================
if [ -n "${NO_COLOR:-}" ] || [ ! -t 1 ]; then
RED="" ; YEL="" ; GRN="" ; RST=""
else
RED=$'\033[31m' ; YEL=$'\033[33m' ; GRN=$'\033[32m' ; RST=$'\033[0m'
fi
fail() { printf '%s FAIL%s %s\n' "$RED" "$RST" "$1" ; }
warn() { printf '%s WARN%s %s\n' "$YEL" "$RST" "$1" ; }
okmsg() { printf '%s ok%s %s\n' "$GRN" "$RST" "$1" ; }
# --- collect target files ---
TARGETS=""
if [ "$#" -gt 0 ]; then
for f in "$@"; do
if [ -f "$f" ]; then
TARGETS="$TARGETS $f"
else
warn "argument is not a file, skipping: $f"
fi
done
else
for f in cloud-init*.yaml cloud-init*.yml cloud-config*.yaml cloud-config*.yml; do
[ -f "$f" ] && TARGETS="$TARGETS $f"
done
fi
# Trim whitespace.
TARGETS="$(printf '%s' "$TARGETS" | sed 's/^ *//')"
if [ -z "$TARGETS" ]; then
echo "hetzner verify: no cloud-init file found to lint — nothing to check."
echo "Pass a path explicitly: ./verify.sh path/to/cloud-init.yaml"
exit 0
fi
overall_fail=0
for file in $TARGETS; do
echo "── linting: $file"
file_fail=0
# FAIL: root SSH must be disabled
if grep -Eqi 'permitrootlogin[[:space:]]+no' "$file" || grep -Eqi 'disable_root:[[:space:]]*true' "$file"; then
okmsg "root SSH disabled"
else
fail "root SSH not disabled — add 'PermitRootLogin no' or 'disable_root: true'"
file_fail=1
fi
# FAIL: password auth must be off
if grep -Eqi 'passwordauthentication[[:space:]]+no' "$file" || grep -Eqi 'ssh_pwauth:[[:space:]]*(false|no|0)' "$file"; then
okmsg "password auth off"
else
fail "password auth not disabled — add 'PasswordAuthentication no' or 'ssh_pwauth: false'"
file_fail=1
fi
# FAIL: an SSH key must be present
if grep -Eqi 'ssh_authorized_keys|ssh-ed25519|ssh-rsa|ecdsa-sha2' "$file"; then
okmsg "ssh key present"
else
fail "no SSH public key found — add it under ssh_authorized_keys"
file_fail=1
fi
# WARN: a firewall step should be referenced
if grep -Eqi 'ufw|nftables|iptables|hcloud firewall' "$file"; then
okmsg "firewall step referenced"
else
warn "no firewall step (ufw/nftables/hcloud firewall) — host has no defense-in-depth layer"
fi
# WARN: fail2ban
if grep -Eqi 'fail2ban' "$file"; then
okmsg "fail2ban present"
else
warn "fail2ban not installed — the one exposed SSH port has no brute-force throttle"
fi
if [ "$file_fail" -ne 0 ]; then
overall_fail=1
fi
echo ""
done
if [ "$overall_fail" -ne 0 ]; then
echo "${RED}hetzner verify: FAIL${RST} — resolve the failures above before creating the box."
exit 1
fi
echo "${GRN}hetzner verify: pass${RST} — hardening must-haves present."
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 |