Token导航 LogoToken导航

Agent Skill · 研究检索

aif-build-automation(aif 构建自动化)

aif-build-automation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

aif-build-automation 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为可写文件;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 51,212。

总安装 588周安装 24GitHub Stars 535下载 188核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:aif-build-automation(aif 构建自动化)
来源仓库:https://github.com/lee-to/ai-factory
仓库路径:skills/aif-build-automation
安装命令:
npx skills add https://github.com/lee-to/ai-factory --skill aif-build-automation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lee-to/ai-factory --skill aif-build-automation

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

aif-build-automation 自动生成构建配置文件,适配多语言和框架项目。适用于新项目初始化、CI/CD 搭建和自动化脚本生成。支持 Makefile、Justfile 和 Magefile 等多种模板输出。通过 GitHub 安装,需根据项目语言匹配对应模板。使用前应核对项目结构与目标工具兼容性。

来源仓库内路径:skills/aif-build-automation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lee-to/ai-factory --skill aif-build-automation;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要可写文件,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

aif-build-automation 怎么安装?

在终端执行 npx skills add https://github.com/lee-to/ai-factory --skill aif-build-automation。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

aif-build-automation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

aif-build-automation 需要什么权限?

权限级别是可写文件。该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

aif-build-automation 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

aif-build-automation 用的人多吗?

公开数据是累计安装 588 次,近一周安装 24 次,下载 188 次,GitHub 535 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

aif-build-automation 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
aif-build-automation

aif 构建自动化 · 本页

588535可写文件未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

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. Run these checks using Glob and Grep:

2.1 Primary Language

Check for these files (first match wins):

FileLanguage
go.modGo
package.jsonNode.js / JavaScript / TypeScript
pyproject.toml or setup.py or setup.cfgPython
Cargo.tomlRust
composer.jsonPHP
GemfileRuby
build.gradle or pom.xmlJava/Kotlin
*.csproj or *.slnC# /.NET

2.2 Package Manager

Check lock files:

FilePackage Manager
bun.lockbbun
pnpm-lock.yamlpnpm
yarn.lockyarn
package-lock.jsonnpm
poetry.lockpoetry
uv.lockuv
Pipfile.lockpipenv

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

2.4 Docker (Deep Scan)

Glob: Dockerfile, Dockerfile.*, docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml, .dockerignore

If any exist, set HAS_DOCKER=true and perform a deeper analysis:

Read the Dockerfile(s) to detect:

  • Multi-stage builds (separate dev / prod stages) → DOCKER_MULTISTAGE=true
  • Exposed ports → DOCKER_PORTS (e.g., 3000, 8080)
  • Base image → DOCKER_BASE (e.g., node:20-alpine, golang:1.22)
  • Entrypoint/CMD → understand how the app is started inside the container

Read docker-compose / compose file to detect:

  • Service names → DOCKER_SERVICES (e.g., app, db, redis, worker)
  • Volume mounts → understand dev vs prod setup
  • Profiles (if any) → dev, production, test
  • Dependency services (postgres, redis, rabbitmq, etc.) → DOCKER_DEPS

Store as DOCKER_PROFILE:

  • has_compose: boolean
  • has_multistage: boolean
  • services: list of service names
  • deps: list of infrastructure services (db, cache, queue)
  • ports: exposed ports
  • has_dev_stage: boolean (Dockerfile has a dev or development stage)

2.5 CI/CD

Glob: .github/workflows/*.yml, .gitlab-ci.yml, .circleci/config.yml, Jenkinsfile, .travis.yml

Note which CI system is in use.

2.6 Database & Migrations

Search for migration tools:

Grep: prisma|drizzle|knex|typeorm|sequelize|alembic|django.*migrate|goose|migrate|atlas|sqlx

Check for:

  • prisma/schema.prisma → Prisma
  • drizzle.config.ts → Drizzle
  • alembic/ directory → Alembic
  • migrations/ directory → Generic migrations

2.7 Test Framework

LanguageCheck For
Node.jsjest, vitest, mocha, ava in package.json
Pythonpytest in pyproject.toml/requirements, unittest imports
GoGo has built-in testing; check for testify in go.mod
RustBuilt-in; check for integration test directory tests/

2.8 Linters & Formatters

Glob: .eslintrc*, eslint.config.*, .prettierrc*, biome.json, .golangci.yml, .golangci.yaml
Grep in pyproject.toml: ruff|black|flake8|pylint|isort

2.9 Monorepo Detection

Glob: turbo.json, nx.json, lerna.json, pnpm-workspace.yaml

Summary

Build a PROJECT_PROFILE object with:

  • language: primary language
  • package_manager: detected PM
  • framework: detected framework (if any)
  • has_docker: boolean
  • docker_profile: DOCKER_PROFILE object (if has_docker)
  • ci_system: detected CI (if any)
  • has_migrations: boolean + tool name
  • test_framework: detected test runner
  • linters: list of detected linters
  • is_monorepo: boolean
  • has_dev_server: boolean (framework with dev server)

Step 3: Read Best Practices

Read the best practices reference for the chosen tool:

Read skills/build-automation/references/BEST-PRACTICES.md

Focus on the section matching TARGET_TOOL:

  • Makefile → Section 1
  • Taskfile → Section 2
  • Justfile → Section 3
  • Magefile → Section 4

Also read the "Cross-Cutting Concerns" section for standard targets.


Step 4: Select & Read Template

Pick the closest matching template based on language + TARGET_TOOL:

ToolGoNode.jsPythonPHPOther
Makefilemakefile-go.mkmakefile-node.mkmakefile-python.mkmakefile-php.mkUse closest match
Taskfiletaskfile-go.ymltaskfile-node.ymltaskfile-python.ymltaskfile-php.ymlUse closest match
Justfilejustfile-gojustfile-nodejustfile-pythonjustfile-phpUse closest match
Magefilemagefile-basic.gomagefile-full.gomagefile-full.goN/A (use Makefile)magefile-basic.go

For Magefile: use magefile-full.go if HAS_DOCKER or has_migrations is true, otherwise magefile-basic.go.

For PHP + Magefile: Mage is Go-specific and not applicable to PHP projects. If the user explicitly requested mage for a PHP project, explain this and suggest Makefile as the closest alternative (universal, no install needed). Ask via AskUserQuestion whether to proceed with Makefile instead.

Read the selected template:

Read skills/build-automation/templates/<selected-template>

Step 5: Generate or Enhance File

Mode B — Generate New File

Using the PROJECT_PROFILE, best practices, and template as reference, generate a customized build file from scratch.

Generation Rules
  1. Start with the tool's required preamble (from best practices)
  2. Include all standard targets: help/default, build, test, lint, clean, dev, fmt
  3. Add conditional targets based on project profile:

- Docker targets → only if has_docker - Database targets → only if has_migrations (use correct migration tool) - Deploy targets → only if CI/CD detected - Generate target → only if code generation detected - Typecheck target → only if TypeScript or mypy detected

  1. Use correct package manager commands (not hardcoded npm/pip/go)
  2. Include CI aggregate target that runs lint + test + build
  3. Follow the template's structure for organization and grouping
  4. Adapt variable names to match the actual project (module name, binary name, source dirs)
  5. Include version/commit/build-time detection via git
  6. Docker-aware targets — if has_docker, generate a dedicated Docker section (see below)
Docker-Aware Target Generation

When has_docker is true, generate two layers of commands:

Layer 1 — Container lifecycle (always when Docker detected):

TargetPurpose
docker-build or docker:buildBuild the Docker image
docker-run or docker:runRun the container
docker-stop or docker:stopStop running containers
docker-logs or docker:logsTail container logs
docker-push or docker:pushPush image to registry
docker-clean or docker:cleanRemove images and stopped containers

Layer 2 — Dev vs Production separation (when compose or multistage detected):

##@ Docker — Development
docker-dev:          ## Start all services in dev mode (with hot reload, mounted volumes)
docker-dev-build:    ## Rebuild dev containers
docker-dev-down:     ## Stop dev environment and remove volumes

##@ Docker — Production
docker-prod-build:   ## Build production image (optimized, multi-stage)
docker-prod-run:     ## Run production container locally for testing
docker-prod-push:    ## Push production image to registry

Generation logic:

  • If has_compose → use docker compose commands (not docker-compose)
  • If compose has profiles → use --profile dev / --profile production
  • If has_multistage → use --target dev for dev builds, no target (or --target production) for prod
  • If docker_profile.deps exist (db, redis, etc.) → add infra-up / infra-down targets to start/stop only infrastructure services without the app
  • If compose detected → docker-dev should run docker compose up with correct profile/services
  • If no compose but Dockerfile → docker-dev should run docker build --target dev + docker run with volume mounts

Layer 3 — Container-based commands (mirror host commands via container):

When the project is Docker-based, also generate container-exec variants so that users who run everything in Docker can use the same targets:

# Run tests inside the container
docker-test:         ## Run tests inside the Docker container
  docker compose exec app [test command]

# Run linter inside the container
docker-lint:         ## Run linter inside the Docker container
  docker compose exec app [lint command]

# Open shell in the container
docker-shell:        ## Open a shell inside the running container
  docker compose exec app sh

Only generate docker-* exec variants if the project appears to be Docker-first (compose file mounts source code as volumes, or no local language runtime setup is apparent).

Customization from Project Profile
  • Binary name: Use the actual project name from go.mod, package.json, or directory name
  • Source directory: Use actual src dir (e.g., src/, app/, cmd/)
  • Dev server command: Match the framework's dev server (e.g., next dev, uvicorn --reload, air)
  • Test command: Match the detected test runner
  • Lint command: Match the detected linters
  • Migration commands: Match the detected migration tool exactly
  • Port numbers: Use framework defaults (3000 for Node, 8000 for Python, 8080 for Go)

Mode A — Enhance Existing File

When MODE = "enhance", do NOT replace the file from scratch. Instead, analyze it and improve it surgically.

5A.1 Analyze Existing File

Compare EXISTING_CONTENT against the PROJECT_PROFILE and best practices. Build a gap analysis:

Missing preamble/config — Check if the file has the recommended preamble:

  • Makefile: SHELL:= bash, .ONESHELL, .SHELLFLAGS, .DELETE_ON_ERROR, MAKEFLAGS
  • Taskfile: version: '3', output:, dotenv:
  • Justfile: set shell, set dotenv-load, set export
  • Magefile: //go:build mage, proper imports

Missing standard targets — Check which of these are absent:

  • help / default (self-documenting)
  • build, test, lint, clean, dev, fmt
  • ci (aggregate target)

Missing project-specific targets — Based on PROJECT_PROFILE, check for:

  • Docker targets (if has_docker but no docker targets in file)
  • Database/migration targets (if has_migrations but no db targets)
  • Typecheck target (if TypeScript/mypy detected but no typecheck target)
  • Generate target (if code generation tools detected)
  • Coverage target (if test target exists but no coverage variant)

Quality issues — Check for anti-patterns from best practices:

  • Targets without descriptions/documentation
  • Missing .PHONY declarations (Makefile)
  • Hardcoded tool paths that should be variables
  • Missing version/commit detection
  • No self-documenting help target
5A.2 Plan Changes

Build a list of specific changes to make:

CHANGES = [
  { type: "add_preamble", detail: "Add .SHELLFLAGS and .DELETE_ON_ERROR" },
  { type: "add_target", name: "docker-build", detail: "Dockerfile detected but no docker target" },
  { type: "add_target", name: "help", detail: "No self-documenting help target" },
  { type: "fix_quality", detail: "Add ## comments to 3 targets missing descriptions" },
  { type: "add_variable", detail: "Add VERSION/COMMIT detection via git" },
  ...
]
5A.3 Apply Changes
  • Preserve the existing structure — Keep the user's ordering, naming, and style
  • Preserve existing targets exactly — Do NOT modify working targets unless fixing a clear bug or adding a missing description
  • Add new targets in the appropriate section — Follow the existing grouping pattern (if the file uses ##@ sections, add to matching section; if no sections, append logically)
  • Add missing preamble lines at the top, before existing content
  • Add missing variables near existing variable declarations
  • Use the template as reference for the syntax of new targets, but adapt to match the style already present in the file (e.g., if existing Makefile uses tabs + simple recipes, don't introduce complex multi-line scripts)

Quality Checks (Both Modes)

Before writing the file, verify:

  • All targets have descriptions/documentation (## comments, desc:, [doc()], doc comments)
  • No hardcoded paths that should be variables
  • Package manager detection is correct
  • Self-documenting help target is included
  • .PHONY declarations for all non-file targets (Makefile only)
  • Dangerous operations have confirmations (Justfile) or warnings

Step 6: Write File & Report

6.1 Write the File

Mode B (Generate New):

Write the generated content using the Write tool:

ToolOutput Path
MakefileMakefile
TaskfileTaskfile.yml
Justfilejustfile
Magefilemagefile.go

Mode A (Enhance Existing):

Write the enhanced content to the same path where the existing file was found (preserving the original filename casing and location). The file is updated in-place — no need to ask about overwriting since we're improving, not replacing.

6.2 Display Summary

Display summary using format from references/SUMMARY-FORMAT.md. Shows targets table, project profile used, and quick start command for Mode B (generate), or what changed + new/existing targets for Mode A (enhance). Include installation hints if the tool requires setup.


Step 7: Project Documentation Integration

After writing the build file, integrate quick commands into project docs. For detailed integration procedures (README, AGENTS.md, existing markdown) → read references/DOC-INTEGRATION.md

Brief: scan for existing command sections, update or append quick reference, suggest AGENTS.md creation if missing.

Artifact Ownership and Config Policy

  • Primary ownership: generated or enhanced build automation files (Makefile, Taskfile.yml, justfile, magefile.go).
  • Allowed companion updates: quick command snippets in existing docs or AGENTS.md when directly tied to the generated build workflow.
  • Config policy: config-agnostic by design. This skill uses repository detection and fixed AI Factory context files rather than config.yaml.

平台分布

Codex

34.25%
按下载量换算64

Claude

31.22%
按下载量换算59

Cursor

16.87%
按下载量换算32

Gemini CLI

9.86%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills