jeremylongshore/tons-of-skills-marketplace / plugins/devops/infrastructure-as-code-generator/skills/generating-infrastructure-as-code
generating-infrastructure-as-code
VerifiedExecute use when generating infrastructure as code configurations. Trigger with phrases like "create Terraform config", "generate CloudFormation template", "write Pulumi code", or "IaC for AWS/GCP/Azure". Produces production-ready code for Terraform, CloudFormation, Pulumi, ARM templates, and CDK across multiple cloud providers.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.5 KB |
| assets/README.md | markdown | 501 B |
| assets/iac_config_schema.json | config | 6.1 KB |
| references/README.md | markdown | 75 B |
| scripts/README.md | markdown | 488 B |
| scripts/iac_generate.pyexecutable | script | 3.7 KB |
scripts/iac_generate.py
View on GitHub#!/usr/bin/env python3
"""
infrastructure-as-code-generator - Generator Script
Script to generate IaC based on user input and platform selection. Handles API calls and template selection.
Generated: 2025-12-10 03:48:17
"""
import json
import argparse
from pathlib import Path
from datetime import datetime
from typing import Dict
class Generator:
def __init__(self, config: Dict):
self.config = config
self.output_dir = Path(config.get("output", "./output"))
self.output_dir.mkdir(parents=True, exist_ok=True)
def generate_markdown(self, title: str, content: str) -> Path:
"""Generate markdown document."""
filename = f"{title.lower().replace(' ', '_')}_{datetime.now().strftime('%Y%m%d_%H%M%S')}.md"
file_path = self.output_dir / filename
md_content = f"""# {title}
Generated by infrastructure-as-code-generator
Date: {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
## Overview
{content}
## Configuration
```json
{json.dumps(self.config, indent=2)}
```
## Category
devops
## Plugin
infrastructure-as-code-generator
"""
file_path.write_text(md_content)
return file_path
def generate_json(self, data: Dict) -> Path:
"""Generate JSON output."""
filename = f"output_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json"
file_path = self.output_dir / filename
output_data = {
"generated_by": "infrastructure-as-code-generator",
"timestamp": datetime.now().isoformat(),
"category": "devops",
"plugin": "infrastructure-as-code-generator",
"data": data,
"config": self.config,
}
with open(file_path, "w") as f:
json.dump(output_data, f, indent=2)
return file_path
def generate_script(self, name: str, template: str) -> Path:
"""Generate executable script."""
filename = f"{name}.sh"
file_path = self.output_dir / filename
script_content = f"""#!/bin/bash
# Generated by infrastructure-as-code-generator
# Date: {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
set -e # Exit on error
echo "🚀 Running {name}..."
# Template content
{template}
echo "✅ Completed successfully"
"""
file_path.write_text(script_content)
file_path.chmod(0o755) # Make executable
return file_path
def main():
parser = argparse.ArgumentParser(
description="Script to generate IaC based on user input and platform selection. Handles API calls and template selection."
)
parser.add_argument("--type", choices=["markdown", "json", "script"], default="markdown")
parser.add_argument("--output", "-o", default="./output", help="Output directory")
parser.add_argument("--config", "-c", help="Configuration file")
parser.add_argument("--title", default="infrastructure-as-code-generator Output")
parser.add_argument("--content", help="Content to include")
args = parser.parse_args()
config = {"output": args.output}
if args.config and Path(args.config).exists():
with open(args.config) as f:
config.update(json.load(f))
generator = Generator(config)
print(f"🔧 Generating {args.type} output...")
if args.type == "markdown":
output_file = generator.generate_markdown(args.title, args.content or "Generated content")
elif args.type == "json":
output_file = generator.generate_json({"title": args.title, "content": args.content})
else: # script
output_file = generator.generate_script(
args.title.lower().replace(" ", "_"), args.content or "# Add your script content here"
)
print(f"✅ Generated: {output_file}")
return 0
if __name__ == "__main__":
import sys
sys.exit(main())
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 |