/homelab-ops:terrakube-opsfrom homelab-ops
Operate self-hosted Terrakube (remote OpenTofu/Terraform plan/apply, state, locking) — login/plan/apply flow, gated targeted applies, lock recovery, offline-mirror gotcha, token rotation. Use for a plan/apply, stuck lock, new workspace.
Ships in homelab-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Terrakube is a self-hosted remote-execution platform for OpenTofu/Terraform — plans and applies run on its own executor, not on the operator's machine or in CI. This skill is the generic operating model; your own workspace names, hostnames, and credential source stay in your own inventory.
tofu login <terrakube-hostname> # once per machine — opens a browser SSO flow
tofu plan # runs remotely; CLI streams the live plan log
tofu apply # same remote workspace, same run
tofu state list # inspect state / outputs afterward
tofu output
tofu plan/apply from the CLI and starting a run from the Terrakube web UI
both drive the same remote executor and the same job log — pick whichever is
convenient; they're interchangeable.
Local
tofu init -backend=false+tofu validatecatches syntax errors without contacting any provider — run that first, it's free and instant compared to a remote plan.
Targeted applies (-target=...) are allowed through the gated path:
Plan and apply (targeted) template, with the
targets passed as the job's targetAddrs (or TARGET_ADDRS through a gated
converge script). Never run a hand-built CLI -target apply that skips the
approval gate.For state surgery, prefer moved/removed blocks over -target or manual
state edits.
Terrakube owns one run queue and one lock per workspace — a second run simply queues behind the active one; independent workspaces don't share a lock.
An executor eagerly initializes its Terraform-compatible provider downloader even on a workspace that only ever runs OpenTofu. If your platform points release/provider resolution at an internal mirror for offline operation, both the Terraform-compatibility URL and the OpenTofu release URL need to point at that mirror — leaving either one pointed at a public release service reintroduces an internet dependency and breaks offline recovery exactly when you need it not to.
Rotating whatever secret Terrakube uses to sign its own issued tokens (a
PAT_SECRET/INTERNAL_SECRET-style value) invalidates every previously
issued personal access token at once. Plan for a tofu login re-auth on
every machine that touches the platform right after that rotation — it isn't
a sign anything else is broken.
A remote apply can exit 0 while its log still contains Error: lines and no
"Apply complete" summary — a partial failure that looks clean from the exit
status. Grep the apply output for both Error: and the completion summary
(Apply complete / Resources:); the summary's absence is the real signal,
not the process exit code.
Onboarding a root that already manages live infrastructure into a workspace whose state starts empty is not a normal apply, and the ordinary 0-destroy review is not enough to make it safe.
A plan against an empty workspace reads "create everything, 0 destroy." That falsely passes a naive 0-destroy gate — the apply then hits an already-exists error and duplicates live infrastructure. For an empty-state workspace the real gate is a refresh-only plan showing 0 add / 0 change / 0 destroy — proof state already matches reality. A create-everything plan on a workspace that should already hold resources means the state was never migrated.
Recipe: migrate the existing state into the workspace first (a state push,
or an init with state migration against the new backend), run a
refresh-only plan and require exactly 0/0/0, reconcile any benign drift with
moved/removed blocks rather than destroy-and-recreate, and only then is
the ordinary 0-destroy apply gate meaningful.
applied (CLI exits 0; UI shows a green Applied state)
and the log shows a completion summary with no Error: lines — see
above.tofu output reflects the expected values.tofu plan immediately after a clean apply reports "No
changes" — if it doesn't, something outside the applied config drifted,
or the apply didn't fully land.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jacobpevans-ai/claude-code-plugins --plugin homelab-ops9 skills in this plugin
/dell-idrac-bmc-opsBring a Dell PowerEdge BMC (iDRAC) onto the network headlessly, standardize settings, stage firmware, drive an unattended install — Redfish/racadm gotchas, identity-before-power, phantom-drive from stale firmware. Use bringing up/diagnosing a BMC./homelab-runbooksUse when powering on a sleeping DR node, converging DNS records for a new ingress vhost, or bringing up OpenBao/Terrakube JWT identity — homelab operational runbooks for power management, DNS, and secrets-engine bring-up./llm-router-opsOperate a self-hosted OpenAI-compatible LLM router — client-wiring per client, context-window ad gotcha, env-vs-persisted-config gotcha, why an unauth health probe should 401. Use wiring a client, adding a backend, diagnosing misbehavior./monitoring-firstRead system state from monitoring and close telemetry gaps./proxmox-cluster-opsOperate a Proxmox VE cluster safely — monitoring-first state checks, quorum-respecting node updates, and joining a new node. Use for cluster operations, rolling updates, or adding a node./pxe-netbootReliable remote OS install over PXE when virtual-media/KVM is broken — proxyDHCP+TFTP via dnsmasq, kernel/initrd over HTTP, custom iPXE with embedded autoexec. Use when a BMC's virtual CD is unreliable or a headless install needs netboot.