infra-automation-generator
БесплатноЗапускает вложенные скриптыНе проверенScans a project, auto-detects language/framework, and generates infrastructure files (Containerfile, K8s, Helm, OpenTofu, Ansible) based on user choices.
от 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.xmlorbuild.gradleorbuild.gradle.kts→ Javago.mod→ GoCargo.toml→ Rustpackage.json→ Node.jsrequirements.txtorpyproject.tomlorsetup.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.propertiesorapplication.ymlforserver.port, default 8080 - Go: scan for
ListenAndServeor 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,pgin connection strings, configs, or dependencies - MySQL: look for
mysql,mariadbin connection strings, configs, or dependencies - MongoDB: look for
mongodb,mongoin connection strings, configs, or dependencies - Redis: look for
redis,ioredis,lettucein configs or dependencies - RabbitMQ: look for
amqp,rabbitmqin configs or dependencies - Kafka: look for
kafkain 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 spacesIMAGE_NAME:PROJECT_NAME:latestDETECTED_PORT: from Phase 1DETECTED_LANG: from Phase 1DETECTED_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
Установить infra-automation-generator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub