skills-catalog/ln-030-vps-bootstrap/SKILL.md
Use when bootstrapping or managing VPS agent environments: fresh install, add project, hex-relay redeploy, diagnostics, or fleet plan/apply.
npx skillsauth add levnikolaevich/claude-code-skills ln-030-vps-bootstrapInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Paths: File paths (
shared/,references/,../ln-*,agents/hex-relay/,ops/) are relative to the skills repo root. If not found at CWD, locate thisSKILL.mddirectory and go up two levels for repo root.
Type: L2 Domain Coordinator Category: 0XX Shared / Infrastructure Tested on: Ubuntu 24.04 (apt + systemd base: Contabo, Hetzner, DigitalOcean)
Public entrypoint for VPS agent environments. This skill routes between fresh install, adding a project to an existing VPS, hex-relay lifecycle work, diagnostics, and fleet plan/apply. It does not inline detailed install work; it delegates to focused runtime workers and consumes their machine-readable summaries.
MANDATORY READ: Load shared/references/skill_contract.md, shared/references/worker_runtime_contract.md, shared/references/coordinator_summary_contract.md, shared/references/vps_runtime_contract.md, and shared/references/meta_analysis_protocol.md
MANDATORY READ: Load references/scope_layers.md, references/shared_user_pattern.md, references/troubleshooting.md, and references/verification_recipes.md
Reference inventory owned by this coordinator family but loaded by the worker that needs it:
README.md, vps_base_install.md, agent_runtime_install.md, god_session_install.md, project_repo_bootstrap.md, hex_relay_deploy.md, operator_dispatcher_install.md, provider_credentials.md, fleet_registry.md, fleet_plan_apply.md, substitution_rules.md, agent-sandbox.sh, agent-update.sh, agent-update.service, agent-update.timer, claude-usage-report.sh, codex-config.toml.template, codex-notify.sh, dispatch.md, dispatch.service, dispatch.timer, dispatcher.md.template, god-session.service, god-session.sh, hex-relay.service, mint-gh-token.sh, operator.CLAUDE.md, register-telegram-commands.sh, secrets.env.template, settings.agent-config.fragment.json, settings.hooks.fragment.json, settings.statusline.fragment.json, statusline.sh.
| Parameter | Required | Default | Description |
|---|---:|---|---|
| mode | No | auto | auto, fresh_install, add_project, relay_redeploy, diagnose, fleet_plan, or fleet_apply |
| dry_run | No | false | Produce planned actions without mutation where supported |
| registry_path | No | /etc/agent-fleet/environments | VPS-local fleet registry directory for fleet_plan / fleet_apply; repo ops/environments is templates/docs only |
| environment_id | No | unset | Limit fleet operations to one registry environment |
| plan_artifact_path | No | generated | Existing plan for fleet_apply, or output path for fleet_plan |
| repair_scope | No | safe | none, safe, or explicit bounded repair action for diagnostics |
Single-project modes also require the project/VPS variables documented in references/scope_layers.md and worker inputs:
PROJECT_NAME, SERVICE_PREFIX, PROJECT_DIR, REPO_URL, REPO_REF, BOT_USER, VPS_HOST, VPS_SSH_KEY, TARGET_REPO_PATH, GIT_PROVIDER, REPO_SLUG, plus optional Telegram/provider variables.
Classify the requested operation:
| Condition | Operation |
|---|---|
| mode=fleet_plan | Validate registry and compute drift plan for selected environments |
| mode=fleet_apply | Revalidate registry, re-check live state, and apply approved plan targets |
| mode=relay_redeploy | Redeploy agents/hex-relay/ for one existing project environment |
| mode=diagnose | Inspect one environment and run only bounded safe repairs |
| mode=fresh_install | Force host reconcile, project runtime, optional relay, verification |
| mode=add_project | Reuse host through verify/update, then project runtime and optional relay |
| mode=auto | Discover host state before selecting fresh vs add-project path |
Evidence:
dry_run / apply gate statusAlways perform a lightweight host discovery before project mutation unless the operation is registry validation only.
Discovery checks:
${VPS_HOST}id ${BOT_USER}claude, codex~${BOT_USER}/.claude/, ~${BOT_USER}/.codex/${AGENT_SKILLS_DIR} and marketplace manifestsagent-update.timer${SERVICE_PREFIX} units and port collisionsDecision:
ln-031-vps-host-runtime with mode=install_or_reconcileln-031-vps-host-runtime with mode=verify_or_updateln-034-vps-environment-diagnosticsCall ln-032-vps-project-runtime for one selected project unless the operation is only relay_redeploy, diagnose, or registry plan.
The worker owns project clone, project config/state dirs, god-session, scheduler, provider credentials, and local dispatcher setup. It must not rebuild shared host runtime or deploy hex-relay.
hex-relay LifecycleCall ln-033-hex-relay-lifecycle when:
mode=relay_redeployhex-relay source/service/user driftSkip with explicit N/A: reason when TELEGRAM_BOT_TOKEN is empty and no relay redeploy was requested.
Call ln-034-vps-environment-diagnostics after install/redeploy when final health evidence is needed, or directly for mode=diagnose.
Fleet rules:
fleet_plan loads and validates the live VPS registry from /etc/agent-fleet/environments/*.yaml by default, checks live state, and writes a plan artifact under .hex-skills/runtime-artifacts/runs/{run_id}/vps-fleet-plan/.fleet_apply must re-check the live VPS registry and live state before mutation. A stale, missing, or registry-mismatched plan is a blocker.ops/environments/ directory is template-only. Do not treat it as the source of truth for real fleet membership.Aggregate child summaries into one coordinator summary:
| Phase | Worker | Use |
|---|---|---|
| 2 | ln-031-vps-host-runtime | Shared VPS host/runtime install, verify, update |
| 3 | ln-032-vps-project-runtime | Per-project VPS runtime and local operator setup |
| 4 | ln-033-hex-relay-lifecycle | hex-relay deploy, redeploy, migration, Telegram users |
| 5 | ln-034-vps-environment-diagnostics | Health, drift, logs, bounded safe repair |
Managed worker pattern:
childRunId="run-ln-030-${operation}-${worker}-${environment_id}"
childSummaryArtifactPath=".hex-skills/runtime-artifacts/runs/${run_id}/vps-runtime-worker/${worker}--${environment_id}.json"
Skill(skill: "ln-031-vps-host-runtime", args: "mode={install_or_reconcile|verify_or_update|verify_only} environment_id={environment_id} runId=${childRunId} summaryArtifactPath=${childSummaryArtifactPath}")
Skill(skill: "ln-032-vps-project-runtime", args: "mode={bootstrap|verify_only} environment_id={environment_id} runId=${childRunId} summaryArtifactPath=${childSummaryArtifactPath}")
Skill(skill: "ln-033-hex-relay-lifecycle", args: "mode={initial_deploy|redeploy|verify_only|sync_users} environment_id={environment_id} runId=${childRunId} summaryArtifactPath=${childSummaryArtifactPath}")
Skill(skill: "ln-034-vps-environment-diagnostics", args: "mode={inspect|verify|repair_safe} environment_id={environment_id} repair_scope={repair_scope} runId=${childRunId} summaryArtifactPath=${childSummaryArtifactPath}")
Read ${childSummaryArtifactPath}
Risk Checklist:
N/A:- Phase 1: Resolve operation and required variables (pending)
- Phase 2: Discover host state and call host runtime worker when needed (pending)
- Phase 3: Call project runtime worker when project bootstrap is in scope (pending)
- Phase 4: Call hex-relay lifecycle worker when Telegram/relay is in scope (pending)
- Phase 5: Call diagnostics worker and/or write fleet plan/apply evidence (pending)
- Phase 6: Aggregate child summaries and run self-check (pending)
ln-030 owns routing decisions and ordering.verify_or_update.fleet_apply is not a continuous reconciler. It applies an approved plan after a fresh live-state check./etc/agent-fleet/environments; repo ops/environments is a template contract only.hex-relay source is owned by agents/hex-relay/; deployment logic lives in ln-033.N/A: items.runId and summaryArtifactPath.verify_or_update, not a blind skip.hex-relay work was delegated only when Telegram/relay scope required it.shared/references/meta_analysis_protocol.md.MANDATORY READ: Load shared/references/meta_analysis_protocol.md
Skill type: domain-coordinator. Run after Phase 6 and include whether the split reduced inline execution, preserved worker independence, and kept fleet apply guarded by a plan artifact.
Version: 1.0.0 Last Updated: 2026-05-05
testing
Drafts and publishes fact-checked GitHub Discussions announcements. Use for releases, updates, or project news; not for release creation or issue responses.
testing
Prepares and publishes a tagged GitHub release from repository evidence. Use for an explicit release request; not for ordinary commits, packages, or community news.
testing
Validates, commits, pushes, and remotely verifies approved repository changes. Use when publication is requested; not for releases, package publishing, or announcements.
development
Reviews standalone skills and their configured distribution surfaces before publication. Use for skill release readiness; not for product code or implementation-plan review.