masonjames/dockhand-plugin/dh-infra

Claude Code and agent skill by masonjames/dockhand-plugin

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Infrastructure-as-code operations with Terraform. Use when user wants to run terraform, manage infrastructure, bootstrap new hosts, change infrastructure, or says "terraform", "infrastructure", "IaC", "provision".

Install

npx vskill@latest install masonjames/dockhand-plugin/dh-infra

SKILL.md

Dockhand Infrastructure

Manage infrastructure-as-code operations with Terraform for Hetzner Cloud resources. Enforces environment-based safety workflows.

Environment Safety Model

EnvironmentWorkflowDirect Apply
prodPR-first requiredBlocked
testDirect allowedconfirmed=true
globalPR-first requiredBlocked

Core Operations

Plan Changes

Preview infrastructure changes before applying:

terraform_plan environment="prod"
→ Shows diff of proposed changes
→ No state modification
→ Safe to run anytime

For all environments:

terraform_plan environment="global"
terraform_plan environment="prod"
terraform_plan environment="test"
Apply Changes

Test environment (direct allowed):

terraform_plan environment="test"
→ Review changes
terraform_apply environment="test" confirmed=true
→ Applied directly

Production/Global (PR workflow):

  1. Create feature branch
  2. Make Terraform changes
  3. Run terraform_plan to verify
  4. Create PR with plan output
  5. Merge after review
  6. Apply from main branch (CI/CD or manual)
View Current State

Inspect current Terraform state:

terraform_show environment="prod"
→ Current resource inventory
→ Useful for debugging drift
Collect Platform State

Capture full platform state for documentation:

collect_state environment="prod"
→ Docker services, containers, volumes
→ Outputs to state-snapshots/
→ Commit to git for drift detection

Infrastructure Components

Global Resources (infra/terraform/global/)
  • Hetzner Cloud network (platform-net)
  • Subnets per environment
  • Firewalls (SSH, HTTP, HTTPS, internal)
  • Object storage buckets (backups, terraform state)
Per-Environment Resources (infra/terraform/envs/<env>/)
  • Server instances (CPX31, CCX13, etc.)
  • Volumes (data persistence)
  • Floating IPs (if configured)
  • Server-specific firewall attachments

Common Workflows

Add New Server
  1. Create Terraform config in infra/terraform/envs/new-server/
  2. Define server, volume, network attachment
  3. Run terraform_plan environment="new-server"
  4. Create PR with plan
  5. After merge, terraform_apply environment="new-server" confirmed=true
  6. Bootstrap with /dh:bootstrap
Resize Server
  1. Update server_type in Terraform
  2. Plan: terraform_plan environment="<env>"
  3. Warning: May require server restart
  4. Apply during maintenance window
Add Storage Volume
  1. Add hcloud_volume resource
  2. Plan and review size/location
  3. Apply
  4. Mount on server via SSH

Bootstrap New Host

After Terraform provisions a server, bootstrap it:

/dh:bootstrap host=<new-host>

Bootstrap sequence:

  1. SSH connectivity test
  2. Install Docker
  3. Join Docker Swarm (manager or worker)
  4. Install Tailscale
  5. Configure monitoring agents
  6. Verify health

State Management

Terraform State
  • Stored in Cloudflare R2 (S3-compatible)
  • Backend configured per environment
  • State locking via DynamoDB-compatible
Platform State Snapshots
  • Generated by collect_state
  • Stored in state-snapshots/ in git
  • Compare for drift detection:

`` diff state-snapshots/prod/latest.json state-snapshots/prod/previous.json ``

Integration with dh-guardrails

The dh-guardrails skill enforces:

  • No terraform destroy without explicit confirmation
  • PR-first for production changes
  • Backup verification before destructive operations

Error Handling

ErrorResolution
State lockCheck for running applies, force unlock if stuck
Provider authVerify HCLOUD_TOKEN in environment
Resource conflictImport existing resource or rename
Plan driftRun plan, review changes, decide to apply or update config

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/masonjames/dockhand-plugin/dh-infra/badge)](https://verified-skill.com/skills/masonjames/dockhand-plugin/dh-infra)

Something wrong with this skill or its page? Tell us.