Departments / devops / pipeline-builder

pipeline-builder

Use when a repository needs a new CI/CD pipeline or a major revision to an existing one. Generates GitHub Actions, Azure DevOps, or GitLab CI YAML tailored to the project stack (Node, Python, Go, container) with matrix builds, caching, artifact publishing, and environment-gated deploys.

Department

DevOps

Safety

writes-local
Writes locally

Supported stacks

github-actionsazure-devopsgitlab-ci

When to use

Do not use for platform-wide shared runner configuration or org-level policy; that is infra, not a pipeline.

Inputs

Outputs

Tool dependencies

Procedure

1. Detect the CI system and project stack

Two detections happen here: which CI system to emit for, and what language/toolchain the pipeline must build.

First, determine the target CI system. Declared preference in the user’s request overrides detection.

ls .github/workflows/ 2>/dev/null                     # GitHub Actions in use
cat azure-pipelines.yml .azure-pipelines.yml 2>/dev/null | head  # Azure DevOps
cat .gitlab-ci.yml 2>/dev/null | head                 # GitLab CI
git remote -v 2>/dev/null                             # github.com / dev.azure.com / gitlab.com host hint
ls .circleci/ Jenkinsfile 2>/dev/null                 # CircleCI / Jenkins as incumbent
ls .drone.yml .buildkite/ bitbucket-pipelines.yml 2>/dev/null  # other CIs

This skill supports github-actions, azure-devops, and gitlab-ci. If detection shows:

Second, identify the project stack:

2. Draft the stage graph

All platforms follow the same logical stages:

lint -> test (matrix) -> build -> scan -> publish -> deploy(staging) -> deploy(prod, gated)

For monorepos, replicate per affected package using path filters.

3. Generate platform YAML

Pick the reference file for the target platform and compose snippets:

Always include:

4. Validate

actionlint .github/workflows/*.yml
yamllint -s .gitlab-ci.yml
az pipelines validate --organization https://dev.azure.com/$ORG --project $PROJECT --yaml-path azure-pipelines.yml

Run the lint step and fix every warning (no shellcheck disables left behind).

5. Provision environments and secrets

Document required secrets/variables in a table in the repo README. Never inline secrets in YAML.

gh secret set REGISTRY_TOKEN -b "$TOKEN" -R acme/checkout-api
gh api -X PUT repos/acme/checkout-api/environments/production -f 'wait_timer=0' \
  -F 'reviewers[][type]=Team' -F 'reviewers[][id]=1234'

6. Smoke the pipeline

Examples

Example 1 — Node service with GitHub Actions

Inputs: platform=github-actions, stack=node, package_manager=pnpm, test_matrix={os: [ubuntu-latest], node: [20]}, registry=ghcr.io, deploy_targets=[staging, {prod, approvers:[sre]}].

Generates .github/workflows/ci.yml (lint + test + build), .github/workflows/release.yml (semantic-release + GHCR push), and .github/workflows/deploy.yml (environment-gated EKS deploy via OIDC). See references/github-actions-patterns.md for the full reusable workflow.

Example 2 — Python monorepo with GitLab CI

Inputs: platform=gitlab-ci, stack=python, package_manager=uv, monorepo_paths=["services/api/**", "services/worker/**"], registry=registry.gitlab.com.

Generates .gitlab-ci.yml that include:s ci/python.yml and uses rules: changes: per path, a shared test template with cache keyed on uv.lock, and needs: DAG edges so build:api and build:worker run in parallel after their respective test jobs. Prod deploy uses a manual when: manual gate and environment: production.

Constraints

Quality checks

Customise for your organisation

pipeline-builder

The LLM will rewrite this skill for your environment. Your API key and form inputs stay in your browser — only the skill and your environment go to OpenRouter.

One line. Be specific — cloud, language, framework, orchestrator.

Free text that steers the rewrite. Leave blank if nothing specific.

cost estimate: