lee-to/ai-factory/aif-build-automation

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Analyze project and generate or enhance build automation file (Makefile, Taskfile.yml, Justfile, Magefile.go). If a build file already exists, improves it by adding missing targets and best practices. Use when user says "generate makefile", "create taskfile", "add justfile", "setup mage", or "build automation".

Install

npx vskill@latest install lee-to/ai-factory/aif-build-automation

SKILL.md

Build Automation Generator

Generate or enhance a build automation file for any project. Supports Makefile, Taskfile.yml, Justfile, and Magefile.go.

Two modes:

  • Generate — No build file exists → create one from scratch using best-practice templates
  • Enhance — Build file already exists → analyze gaps, add missing targets, fix anti-patterns, preserve existing work

Step 0: Load Project Context

Read the project description if available:

Read .ai-factory/DESCRIPTION.md

Store the project context (tech stack, framework, architecture) for use in later steps. If the file doesn't exist, that's fine — we'll detect everything in Step 2.

Read `.ai-factory/skill-context/aif-build-automation/SKILL.md` — MANDATORY if the file exists.

This file contains project-specific rules accumulated by /aif-evolve from patches, codebase conventions, and tech-stack analysis. These rules are tailored to the current project.

How to apply skill-context rules:

  • Treat them as project-level overrides for this skill's general instructions
  • When a skill-context rule conflicts with a general rule written in this SKILL.md,

the skill-context rule wins (more specific context takes priority — same principle as nested CLAUDE.md files)

  • When there is no conflict, apply both: general rules from SKILL.md + project rules from skill-context
  • Do NOT ignore skill-context rules even if they seem to contradict this skill's defaults —

they exist because the project's experience proved the default insufficient

  • CRITICAL: skill-context rules apply to ALL outputs of this skill — including the generated

build files (Makefile, Taskfile, justfile, magefile). Templates in this skill are base structures. If a skill-context rule says "build file MUST include target X" or "MUST follow convention Y" — you MUST comply. Generating build automation that violates skill-context rules is a bug.

Enforcement: After generating any output artifact, verify it against all skill-context rules. If any rule is violated — fix the output before presenting it to the user.


Step 1: Detect Existing Build Files & Determine Mode

1.1 Scan for Existing Build Files

Before anything else, check if the project already has build automation:

Glob: Makefile, makefile, GNUmakefile, Taskfile.yml, Taskfile.yaml, taskfile.yml, justfile, Justfile, .justfile, magefile.go, magefiles/*.go

Build a list of EXISTING_FILES from the results.

1.2 Determine Mode

Mode A — Enhance Existing (if EXISTING_FILES is not empty):

  • Set MODE = "enhance"
  • Set TARGET_TOOL automatically from the detected file (Makefile → makefile, Taskfile.yml → taskfile, etc.)
  • If multiple build files exist AND $ARGUMENTS specifies one, use the argument to pick which one to enhance
  • If multiple build files exist AND no argument, ask which one to enhance:
AskUserQuestion: This project has multiple build files. Which one should I improve?
Options (dynamic, based on what exists):
1. Makefile — Enhance the existing Makefile
2. Taskfile.yml — Enhance the existing Taskfile
...
  • Read the existing file content — this is the baseline for enhancement
  • Store as EXISTING_CONTENT

Mode B — Generate New (if EXISTING_FILES is empty):

  • Set MODE = "generate"
  • Parse $ARGUMENTS to determine tool:
ArgumentToolOutput File
makefile or makeGNU MakeMakefile
taskfile or taskTaskfileTaskfile.yml
justfile or justJustjustfile
mage or magefileMagemagefile.go
  • If $ARGUMENTS is empty or doesn't match, ask the user interactively:
AskUserQuestion: Which build automation tool do you want to generate?
Options:
1. Makefile — GNU Make (universal, no install needed)
2. Taskfile.yml — Task runner (YAML, modern, cross-platform)
3. justfile — Just command runner (simple, fast, ergonomic)
4. magefile.go — Mage (Go-native, type-safe, no shell scripts)

Store the chosen tool as TARGET_TOOL.


Step 2: Analyze Project

Detect the project profile by scanning the repository with Glob and Grep. Use the same flow for every stack: primary language → package manager / build entrypoints → frameworks → Docker → CI → migrations → tests → linters → monorepo, then the Summary object. JVM projects are handled inside those steps (not a separate pipeline).

2.1 Primary Language

Check for these files (first match wins in the table order below). For Java / Kotlin (JVM), infer language from build files: default Java unless Kotlin plugins / kotlin("jvm") / dominant .kt layout suggests Kotlin.

File / signalLanguage
go.modGo
package.jsonNode.js / JavaScript / TypeScript
pyproject.toml or setup.py or setup.cfgPython
Cargo.tomlRust
composer.jsonPHP
GemfileRuby
JVM: Gradle root or wrapper (see §2.2)Java / Kotlin (JVM)
JVM: pom.xmlJava / Kotlin (JVM)
*.csproj or *.slnC# / .NET
2.2 Package manager & build entrypoints

Lock files and wrappers (same idea as `package-lock.json` → npm):

FilePackage manager / tool
bun.lockbbun
pnpm-lock.yamlpnpm
yarn.lockyarn
package-lock.jsonnpm
poetry.lockpoetry
uv.lockuv
Pipfile.lockpipenv
gradle/wrapper/gradle-wrapper.properties./gradlew
.mvn/wrapper/maven-wrapper.properties./mvnw

Java / Kotlin (JVM) — Gradle vs Maven: Detect Gradle with one batch of checks (single Glob over the paths below, or parallel existence checks — avoid redundant sequential walks):

  • settings.gradle, settings.gradle.kts, build.gradle, build.gradle.kts (repo root), gradle/wrapper/gradle-wrapper.properties

If any Gradle signal matches → Gradle is in play. `pom.xml` indicates Maven. Set PROJECT_PROFILE.java_build.build_tool from this table:

Conditionbuild_toolNotes
Gradle signals presentgradleWire targets to Gradle commands below.
No Gradle, pom.xml presentmavenWire targets to Maven commands below.
Gradle and pom.xmlgradleSet java_build.mixed_maven_gradle: true and append a warning to PROJECT_PROFILE.warnings (both builds present; recipes follow Gradle — user confirms authoritative build).

Concrete JVM Entrypoint: Persist the detected entrypoint in PROJECT_PROFILE.build_entrypoint based on wrapper presence:

  • If build_tool is gradle: use ./gradlew if gradlew or gradle/wrapper/gradle-wrapper.properties exists, else fallback to gradle.
  • If build_tool is maven: use ./mvnw if mvnw or .mvn/wrapper/maven-wrapper.properties exists, else fallback to mvn.

Single source of truth: The predicate above is the same rule the JVM templates implement in shell (ENTRYPOINT / entrypoint — test ./gradlew or gradle/wrapper/gradle-wrapper.properties; test ./mvnw or .mvn/wrapper/maven-wrapper.properties). When generating or enhancing build files, set PROJECT_PROFILE.build_entrypoint to the result those tests imply (./gradlew vs gradle, ./mvnw vs mvn). Do not emit a different entrypoint string than that predicate unless the user overrides (e.g. Makefile ENTRYPOINT=…). Templates re-resolve at recipe runtime so clones stay correct without editing.

Version catalog: If gradle/libs.versions.toml exists, set java_build.has_version_catalog and document PROJECT_PROFILE.build_entrypoint / catalog usage in comments where helpful.

Commands to wire into Makefile / Taskfile / Just for JVM (same role as npm run build / pytest for other stacks; use gradlew.bat on Windows):

GoalGradleMaven
Full compile + checks<build_entrypoint> build<build_entrypoint> verify
Unit / integration tests<build_entrypoint> test<build_entrypoint> test
Verification (tests + static analysis where configured)<build_entrypoint> check<build_entrypoint> verify
Package only<build_entrypoint> assemble (or jar / bootJar)<build_entrypoint> package
Dev server — Spring Boot (see §2.3)<build_entrypoint> bootRun<build_entrypoint> spring-boot:run
Dev server — Quarkus<build_entrypoint> quarkusDev<build_entrypoint> quarkus:dev
Dev server — Micronaut<build_entrypoint> run<build_entrypoint> mn:run
Dev server — Vert.x<build_entrypoint> vertxRun<build_entrypoint> vertx:run
Spring Boot — runnable JAR<build_entrypoint> bootJar<build_entrypoint> package (spring-boot repackage)
Clean<build_entrypoint> clean<build_entrypoint> clean
Multi-module<build_entrypoint> :subproject:build<build_entrypoint> -pl module -am package

`dev` target (templates + generated files): Resolve the framework dev task/goal from the same signals as §2.3, fixed priority (first match wins): Quarkus → Micronaut → Vert.x → Spring Boot. Scan Gradle: build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts, gradle/libs.versions.toml with the same grep -E patterns you use for §2.3 (quarkus / io.quarkus; micronaut / io.micronaut; Vert.x Gradle plugin — vertx-plugin or io.vertx.vertx; Spring Boot — fallback). Scan Maven: pom.xml only; Vert.x Maven — vertx-maven-plugin or io.reactiverse. If the repo root is an aggregator and detection misses, override the template’s dev task variable (same idea as `JVM_MODULE`).

Templates: JVM Makefile/Taskfile/Just ship a fixed catalog: `lint` → Gradle check / Maven verify; `fmt` → spotlessApply / spotless:apply; `lint-checkstyle`, `lint-spotbugs`, `lint-pmd`, `lint-spotless` (Taskfile lint:*); `db-migrate-liquibase`, `db-migrate-flyway` (Taskfile db:migrate:*). Multi-module: `module-*` with `JVM_MODULE`. Step 5 removes catalog entries the repo does not wire (see JVM template rules).

2.3 Framework Detection

For Node.js projects, check package.json dependencies for:

  • next → Next.js
  • nuxt → Nuxt
  • @remix-run/node → Remix
  • express → Express
  • fastify → Fastify
  • hono → Hono
  • @nestjs/core → NestJS

For Python projects, check pyproject.toml or imports for:

  • fastapi → FastAPI
  • django → Django
  • flask → Flask

For PHP projects, check composer.json require for:

  • laravel/framework → Laravel
  • symfony/framework-bundle → Symfony
  • slim/slim → Slim
  • cakephp/cakephp → CakePHP

For Go projects, check go.mod for:

  • gin-gonic/gin → Gin
  • labstack/echo → Echo
  • gofiber/fiber → Fiber
  • go-chi/chi → Chi

For Rust projects, read Cargo.toml (workspace members and [dependencies] / [workspace.dependencies]) for:

  • axum → Axum
  • actix-web → Actix Web
  • rocket → Rocket
  • warp → Warp

For Ruby projects, read Gemfile for:

  • rails → Ruby on Rails
  • sinatra → Sinatra
  • hanami → Hanami
  • roda → Roda

For Java / JVM projects, read pom.xml, build.gradle*, and gradle/libs.versions.toml (when present) for dependencies and plugins — same discovery depth as package.json for Node:

  • spring-boot, spring-boot-starter, spring-boot-parent → Spring Boot
  • grpc, protobuf, spring-grpc or *.proto in repo → gRPC / protobuf
  • quarkus, io.quarkus → Quarkus
  • micronaut → Micronaut
  • vertx / Vert.x stack → Vert.x
  • liquibase in deps or db.changelog* → Liquibase (see §2.6)
  • Flyway org.flywaydb / flyway-core / flyway-maven-plugin / Flyway Gradle plugin in pom.xml, build.gradle*, or gradle/libs.versions.toml → Flyway (see §2.6)
  • Prefer Jakarta (jakarta.*) for Java 9+ / Spring Boot 3+; flag legacy javax.* migration if both appear

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationFailed, 63 of 100Degrading. 1 run. Evaluated 7 months ago.

Source

Popularity

Repository stars
672
Repository forks
63
Repository npm downloads, 7 days
470
7-day trend score
48

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 13 May 2026, 5 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lee-to/ai-factory/aif-build-automation/badge)](https://verified-skill.com/skills/lee-to/ai-factory/aif-build-automation)

Something wrong with this skill or its page? Tell us.