Skip to content

jeremylongshore/tons-of-skills-marketplace / plugins/devops/load-balancer-configurator/skills/configuring-load-balancers

configuring-load-balancers

Verified

Configure use when configuring load balancers including ALB, NLB, Nginx, and HAProxy. Trigger with phrases like "configure load balancer", "create ALB", "setup nginx load balancing", or "haproxy configuration". Generates production-ready configurations with health checks, SSL termination, sticky sessions, and traffic distribution rules.

FileKindSize
SKILL.mdskill md4.6 KB
assets/README.mdmarkdown232 B
assets/haproxy_template.confconfig3.0 KB
assets/nginx_template.confconfig3.8 KB
references/README.mdmarkdown69 B
references/errors.mdmarkdown913 B
references/examples.mdmarkdown330 B
scripts/README.mdmarkdown381 B
scripts/generate_config.pyexecutablescript3.6 KB

scripts/generate_config.py

View on GitHub
#!/usr/bin/env python3
"""
load-balancer-configurator - Generator Script
Generates load balancer configuration files based on specified parameters.
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 load-balancer-configurator
Date: {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}

## Overview
{content}

## Configuration
```json
{json.dumps(self.config, indent=2)}
```

## Category
devops

## Plugin
load-balancer-configurator
"""

        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": "load-balancer-configurator",
            "timestamp": datetime.now().isoformat(),
            "category": "devops",
            "plugin": "load-balancer-configurator",
            "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 load-balancer-configurator
# 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="Generates load balancer configuration files based on specified parameters."
    )
    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="load-balancer-configurator 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())
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall