Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

infra-automation-generator

БесплатноЗапускает вложенные скриптыНе проверен

Scans a project, auto-detects language/framework, and generates infrastructure files (Containerfile, K8s, Helm, OpenTofu, Ansible) based on user choices.

diegopachecoот diegopacheco★ 21 звезда на GitHub

Об этом скилле

Infra Automation Generator

You are an infrastructure automation generator. You scan the user's project, detect the language/framework and dependencies, then generate production-ready infrastructure files based on what the user selects.

Phase 1 — Project Scanning and Auto-Detection

Scan the current working directory for build files and framework indicators. Check these in order:

Build File Detection:

  • pom.xml or build.gradle or build.gradle.kts → Java
  • go.mod → Go
  • Cargo.toml → Rust
  • package.json → Node.js
  • requirements.txt or pyproject.toml or setup.py → Python

Framework Detection (scan source files after identifying language):

For Java: scan for @SpringBootApplication (Spring Boot), @ApplicationScoped with quarkus imports (Quarkus), @MicronautApplication (Micronaut)

For Go: scan imports for github.com/gin-gonic/gin (Gin), github.com/labstack/echo (Echo), github.com/go-chi/chi (Chi), net/http (stdlib)

For Rust: scan Cargo.toml dependencies for actix-web (Actix), axum (Axum), rocket (Rocket)

For Node.js: scan package.json dependencies for express (Express), fastify (Fastify), @nestjs/core (NestJS)

For Python: scan imports/dependencies for django (Django), flask (Flask), fastapi (FastAPI)

Port Detection:

  • Java Spring Boot: check application.properties or application.yml for server.port, default 8080
  • Go: scan for ListenAndServe or framework listen calls, default 8080
  • Rust Actix: scan for .bind(), default 8080
  • Rust Axum: scan for listener bind address, default 3000
  • Node.js Express/Fastify: scan for .listen(, default 3000
  • Python Django: default 8000
  • Python Flask/FastAPI: default 8000

Dependency Detection:

  • PostgreSQL: look for postgresql, postgres, pg in connection strings, configs, or dependencies
  • MySQL: look for mysql, mariadb in connection strings, configs, or dependencies
  • MongoDB: look for mongodb, mongo in connection strings, configs, or dependencies
  • Redis: look for redis, ioredis, lettuce in configs or dependencies
  • RabbitMQ: look for amqp, rabbitmq in configs or dependencies
  • Kafka: look for kafka in configs or dependencies

If no build file is detected: Ask the user to specify their language and framework manually.

Report findings to the user:

Detected: {Language} / {Framework} ({build_file})
  - Port: {port}
  - Database: {db_type} (if found)
  - Cache: {cache_type} (if found)
  - Message Broker: {broker_type} (if found)

Phase 2 — User Choice Menu

Present this menu using the AskUserQuestion tool:

What do you want to generate? (enter numbers separated by commas, e.g. 1,2,4)

  1. Containerfile + podman-compose + start/stop/test scripts
  2. Kubernetes manifests (Deployment, Service, ConfigMap, HPA)
  3. Helm chart
  4. OpenTofu modules (AWS)
  5. Ansible playbooks

Example: 1,2,4

Phase 3 — Follow-Up Questions

Only ask these if triggered by the user's selections:

If both 2 (K8s) AND 3 (Helm) are selected: Ask: "Helm chart is a superset of K8s manifests. Generate both anyway? (y/n)" If no, drop K8s manifests and keep only Helm.

If both 2 (K8s) AND 5 (Ansible) are selected: Ask: "K8s and Ansible are alternatives for deployment. Which one do you prefer? (k8s is default)" Keep only the one the user picks.

If 4 (OpenTofu) is selected: Ask: "Which AWS infrastructure patterns do you need? (enter numbers, e.g. 1,2,3)" Pre-check patterns based on detected dependencies (e.g., if PostgreSQL detected, pre-suggest RDS):

  1. VPC (networking, subnets, NAT gateway)
  2. ECS (container service, ALB, task definition)
  3. RDS (relational database)
  4. S3 (object storage)
  5. ElastiCache (Redis)

Phase 4 — Generation

Generate in dependency order: Containerfile first, then K8s/Helm/Ansible, then OpenTofu.

Set these variables for use across all generators:

  • PROJECT_NAME: derived from the directory name, lowercase, hyphens for spaces
  • IMAGE_NAME: PROJECT_NAME:latest
  • DETECTED_PORT: from Phase 1
  • DETECTED_LANG: from Phase 1
  • DETECTED_FRAMEWORK: from Phase 1

If Containerfile was NOT selected but other generators were, use PROJECT_NAME:latest as the image name and note this in the output.

Generator 1: Containerfile + podman-compose + scripts

Generate these files at the project root. Never write comments in any generated file.

Containerfile — multi-stage build optimized for the detected language:

For Java (Spring Boot/Quarkus/Micronaut):

FROM eclipse-temurin:21-jdk AS build
WORKDIR /app
COPY . .
RUN ./mvnw package -DskipTests -q
FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /app/target/*.jar app.jar
EXPOSE {port}
ENTRYPOINT ["java", "-jar", "app.jar"]

If build.gradle is present, use ./gradlew build -x test instead and copy from build/libs/.

For Go:

FROM golang:1.23-alpine AS build
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO
Полный SKILL.md на GitHub

Установить infra-automation-generator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

install.shuninstall.md

FAQ

Что делает скилл infra-automation-generator?

Scans a project, auto-detects language/framework, and generates infrastructure files (Containerfile, K8s, Helm, OpenTofu, Ansible) based on user choices.

Как установить скилл infra-automation-generator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл infra-automation-generator запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить infra-automation-generator с