home / skills / ehtbanton / claudeskillsrepo / vagrant-config-generator

vagrant-config-generator skill

/vagrant-config-generator

This skill generates a complete Vagrantfile for local development environments, enabling reproducible VMs with Ubuntu, provisioners, and port mappings.

npx playbooks add skill ehtbanton/claudeskillsrepo --skill vagrant-config-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
704 B
---
name: vagrant-config-generator
description: Generate Vagrant configuration files for local development environments. Triggers on "create vagrantfile", "generate vagrant config", "vagrant setup", "local vm config".
---

# Vagrant Config Generator

Generate Vagrant configuration files for reproducible development environments.

## Output Requirements

**File Output:** `Vagrantfile`
**Format:** Valid Ruby Vagrantfile
**Standards:** Vagrant 2.x

## When Invoked

Immediately generate a complete Vagrantfile for the development environment.

## Example Invocations

**Prompt:** "Create Vagrantfile for Node.js development"
**Output:** Complete `Vagrantfile` with Ubuntu, Node.js, and port forwarding.

Overview

This skill generates complete Vagrantfiles to provision reproducible local development virtual machines. It outputs a valid Ruby Vagrantfile compatible with Vagrant 2.x, ready to be dropped into a project root. The focus is on practical, editable configs for common stacks like Node.js, Python, Ruby, and database services.

How this skill works

On request it produces a full Vagrantfile that configures box, provider settings, synced folders, networking, and provisioning steps. The generated file includes OS selection (Ubuntu by default), package installation, port forwarding, and optional shell or provisioner scripts for tooling like Node.js. Outputs are syntactically valid Ruby and follow Vagrant 2.x conventions so they work with vagrant up immediately.

When to use it

  • Bootstrapping a local VM for team development to ensure environment parity
  • Creating reproducible demo or workshop environments for tutorials
  • Setting up isolated service dependencies like databases or message brokers
  • Rapidly sharing a development environment with contributors
  • Testing cross-OS behavior without modifying host system

Best practices

  • Choose a lightweight official box (e.g., ubuntu/focal64) to reduce download time
  • Use synced folders for source code and keep heavy data in separate volumes
  • Forward only necessary ports and document their purpose in comments
  • Include idempotent provisioning steps so vagrant provision can be rerun safely
  • Commit only the Vagrantfile and provisioning scripts; ignore VM state and large artifacts

Example use cases

  • Create Vagrantfile for Node.js development with Ubuntu, Node LTS install, and host-to-guest port forwarding for 3000
  • Generate Vagrantfile that provisions a Ruby on Rails environment with PostgreSQL service and shared app folder
  • Produce a Vagrantfile for a Python data-science sandbox with pip, Jupyter, and a mounted data directory
  • Build a minimal Vagrantfile for testing networked services by provisioning Redis and exposing its port

FAQ

What file does this skill produce?

It produces a single Vagrantfile in valid Ruby format compatible with Vagrant 2.x.

Can I request a specific base box or OS?

Yes—specify the base box (for example ubuntu/focal64) and the generator will use it in the Vagrantfile.