lee-to/ai-factory/aif-ci
- community
Checking that the SKILL.md file is still in the repository.
Generate CI/CD pipeline (GitHub Actions / GitLab CI) with linting, static analysis, tests, security. Use when user says "ci", "setup ci", "github actions", "gitlab ci", "pipeline".
Install
npx vskill@latest install lee-to/ai-factory/aif-ciSKILL.md
CI — Pipeline Configuration Generator
Analyze a project and generate production-grade CI/CD pipeline configuration for GitHub Actions or GitLab CI. Generates separate jobs for linting, static analysis, tests, and security scanning — adapted to the project's language, framework, and existing tooling.
Three modes based on what exists:
| What exists | Mode | Action | |
|---|---|---|---|
| No CI config | generate | Create pipeline from scratch with interactive setup | |
| CI config exists but incomplete | enhance | Audit & improve, add missing jobs | |
| Full CI config | audit | Audit against best practices, fix gaps |
Step 0: Load Project Context
Read the project description if available:
Store project context for later steps. If absent, Step 2 detects everything.
Read `.ai-factory/skill-context/aif-ci/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 generated
CI workflow files and audit reports. Templates in this skill are base structures. If a skill-context rule says "CI MUST include step X" or "workflow MUST have job Y" — you MUST augment the templates accordingly. Generating CI config 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 CI & Determine Mode
1.1 Scan for Existing CI Configuration
Classify found files:
HAS_GITHUB_ACTIONS:.github/workflows/contains YAML filesHAS_GITLAB_CI:.gitlab-ci.ymlexistsHAS_OTHER_CI: CircleCI, Jenkins, Travis, or Bitbucket detected
1.2 Determine Mode
If `$ARGUMENTS` contains `--enhance` -> set MODE = "enhance" regardless.
Path A: No CI config exists (!HAS_GITHUB_ACTIONS && !HAS_GITLAB_CI && !HAS_OTHER_CI):
- Set
MODE = "generate" - Proceed to Step 1.3: Interactive Setup
Path B: CI config exists but is incomplete (e.g., has only tests, no linting):
- Set
MODE = "enhance" - Read all existing CI files -> store as
EXISTING_CONTENT - Log: "Found existing CI configuration. Will analyze and add missing jobs."
Path C: Full CI setup (has linting + tests + static analysis):
- Set
MODE = "audit" - Read all existing CI files -> store as
EXISTING_CONTENT - Log: "Found complete CI setup. Will audit against best practices and fix gaps."
1.3 Interactive Setup (Generate Mode Only)
Determine CI platform from $ARGUMENTS or ask:
If $ARGUMENTS contains github -> set PLATFORM = "github" If $ARGUMENTS contains gitlab -> set PLATFORM = "gitlab"
Otherwise:
Ask about optional features:
Store choices:
PLATFORM: github | gitlabWANT_SECURITY: booleanWANT_COVERAGE: booleanWANT_MATRIX: boolean
1.4 Read Existing Files (Enhance / Audit Modes)
Read all existing CI files and store as EXISTING_CONTENT:
- All
.github/workflows/*.ymlfiles .gitlab-ci.yml- Any included GitLab CI files (check
include:directives)
Determine PLATFORM from existing files.
Step 2: Deep Project Analysis
Scan the project thoroughly — every decision in the generated pipeline depends on this profile.
2.1 Language & Runtime
| File | Language | |
|---|---|---|
composer.json | PHP | |
package.json | Node.js / TypeScript | |
pyproject.toml / setup.py / setup.cfg | Python | |
go.mod | Go | |
Cargo.toml | Rust | |
pom.xml | Java (Maven) | |
build.gradle / build.gradle.kts | Java/Kotlin (Gradle) |
2.2 Language Version
Detect the project's language version to use in CI:
| Language | Version Source | Example | |
|---|---|---|---|
| PHP | composer.json -> require.php | >=8.2 -> ['8.2', '8.3', '8.4'] | |
| Node.js | package.json -> engines.node, .nvmrc, .node-version | >=18 -> [18, 20, 22] | |
| Python | pyproject.toml -> requires-python, .python-version | >=3.11 -> ['3.11', '3.12', '3.13'] | |
| Go | go.mod -> go directive | go 1.23 -> '1.23' | |
| Rust | Cargo.toml -> rust-version, rust-toolchain.toml | 1.82 -> '1.82' | |
| Java | pom.xml -> maven.compiler.source, build.gradle -> sourceCompatibility | 17 -> [17, 21] |
For matrix builds: use the minimum version from the project config as the lowest, and include the latest stable version. For non-matrix builds: use the latest version that satisfies the constraint.
2.3 Package Manager & Lock File
| File | Package Manager | Install Command | |
|---|---|---|---|
composer.lock | Composer | composer install --no-interaction --prefer-dist | |
bun.lockb | Bun | bun install --frozen-lockfile | |
pnpm-lock.yaml | pnpm | pnpm install --frozen-lockfile | |
yarn.lock | Yarn | yarn install --frozen-lockfile | |
package-lock.json | npm | npm ci | |
uv.lock | uv | uv sync --all-extras --dev | |
poetry.lock | Poetry | poetry install | |
Pipfile.lock | Pipenv | pipenv install --dev | |
requirements.txt | pip | pip install -r requirements.txt | |
go.sum | Go modules | go mod download | |
Cargo.lock | Cargo | (built-in) |
Store: PACKAGE_MANAGER, LOCK_FILE, INSTALL_CMD.
2.4–2.7 Tool Detection
Detect project tools by scanning config files and dependencies. For the complete tool-to-command mapping → read references/TOOL-COMMANDS.md
Categories: Linters & Formatters (PHP-CS-Fixer, ESLint, Prettier, Biome, Ruff, golangci-lint, clippy, Checkstyle), Static Analysis (PHPStan, Psalm, Rector, mypy, tsc), Test Frameworks (PHPUnit, Pest, Jest, Vitest, pytest, go test, cargo test) with coverage flags, Security Audit (composer audit, npm audit, pip-audit, govulncheck, cargo audit).
2.8 Services Detection
Check if tests require external services (database, Redis, etc.):
If services are needed, they will be configured in the CI pipeline as service containers.
2.9 Build Output
Does the project have a build step?
| Language | Has Build | Build Command | |
|---|---|---|---|
Node.js (with build script) | Yes | npm run build / pnpm build | |
| Go | Yes | go build ./... | |
| Rust | Yes | cargo build --release | |
| Java | Yes | mvn package -DskipTests -B / ./gradlew assemble | |
| PHP | Usually no | — | |
| Python | Usually no | — |
Summary
Build PROJECT_PROFILE:
language,language_version,language_versions(for matrix)package_manager,lock_file,install_cmdlinters: list of {name, command, config_file}static_analyzers: list of {name, command}test_framework,test_cmd,coverage_cmdsecurity_tools: list of {name, command}has_build_step,build_cmdhas_typescript: boolean (for typecheck job)services_needed: list of services for CIsource_dir: main source directory (src/, app/, lib/)
Step 3: Read Best Practices & Templates
Select templates matching the platform and language:
GitHub Actions:
| Language | Template | |
|---|---|---|
| PHP | templates/github/php.yml | |
| Node.js | templates/github/node.yml | |
| Python | templates/github/python.yml | |
| Go | templates/github/go.yml | |
| Rust | templates/github/rust.yml | |
| Java | templates/github/java.yml |
GitLab CI:
| Language | Template | |
|---|---|---|
| PHP | templates/gitlab/php.yml | |
| Node.js | templates/gitlab/node.yml | |
| Python | templates/gitlab/python.yml | |
| Go | templates/gitlab/go.yml | |
| Rust | templates/gitlab/rust.yml | |
| Java | templates/gitlab/java.yml |
Read the selected template:
Step 4: Generate Pipeline (Generate Mode)
Using the PROJECT_PROFILE, best practices, and template as a base, generate a customized CI pipeline.
4.1 GitHub Actions Generation
One workflow per concern — each file has its own triggers, permissions, concurrency:
| File | Name | Jobs | When to create | |
|---|---|---|---|---|
lint.yml | Lint | code-style, static-analysis, rector | Linters or SA detected | |
tests.yml | Tests | tests (+ service containers) | Always | |
build.yml | Build | build | has_build_step | |
security.yml | Security | dependency-audit, dependency-review | WANT_SECURITY |
Why one file per concern:
- Each check is a separate status check in PR — instantly see what failed
- Independent triggers — security on schedule, tests on push/PR, build only after tests
- Independent permissions — security may need
security-events: write - Can disable/re-run one workflow without touching others
- Branch protection rules can require specific workflows (e.g. require
testsbut notsecurity)
When to keep single file: Only for very small projects with just lint + tests (2 jobs). As soon as there are 3+ concerns — split.
Every workflow gets the same header pattern:
Per-file job organization:
`lint.yml` — all code quality checks in parallel:
| Job | Purpose | When to include | |
|---|---|---|---|
code-style | Formatting (CS-Fixer, Prettier, Ruff format, rustfmt) | Formatter detected | |
lint | Linting (ESLint, Ruff check, Clippy, golangci-lint) | Linter detected | |
static-analysis | Type checking / SA (PHPStan, Psalm, mypy, tsc) | SA tools detected | |
rector | Rector dry-run (PHP only) | Rector detected |
All jobs run in parallel (no needs). If only one tool detected (e.g. Go with just golangci-lint) — single job in the file is fine.
`tests.yml` — test suite:
| Job | Purpose | When to include | |
|---|---|---|---|
tests | Unit/integration tests | Always | |
tests-<service> | Tests requiring service containers | services_needed detected |
Matrix builds (multiple language versions) only in this file.
`build.yml` — build verification:
| Job | Purpose | Notes | |
|---|---|---|---|
build | Verify compilation/bundling | Can depend on external workflow via workflow_run or just run independently |
`security.yml` — security scanning:
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 reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aif-ci/SKILL.md
Popularity
- Repository stars
- 660
- Repository forks
- 62
- Repository npm downloads, 7 days
- 535
- 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 9 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
[](https://verified-skill.com/skills/lee-to/ai-factory/aif-ci)