mcpField
G
gitlab-ci-generator

gitlab-ci-generator

github.com/nextstage-brasilCloud & DevOps046 installsUpdated 5d ago
Repository

About gitlab-ci-generator

A skill for generating and adapting `.gitlab-ci.yml` pipelines for backend-and-frontend SaaS products. It uses a supplied template, checks repository-specific paths and commands, documents CI variable names, and validates the resulting YAML and job layout.

Key features

  1. 01Copy a baseline pipeline template
  2. 02Adapt paths, images, and test commands
  3. 03Configure branch-based deployment rules
  4. 04Document CI variable names
  5. 05Lint YAML and check job layout

Use cases

  1. 01Set up CI for a backend-and-frontend SaaS
  2. 02Adjust pipelines for repository folder layouts
  3. 03Align test and build jobs with project manifests
  4. 04Check pipeline configuration before use

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/nextstage-brasil/skills --skill gitlab-ci-generator

After installing, type/gitlab-ci-generatorin Claude Code to confirm it loaded.

Bundled filesevals/evals.jsonreferences/templates/gitlab-ci.template.yml

Details

From the project README

GitLab CI Generator

Produce {product_root}/.gitlab-ci.yml for backend + frontend SaaS layouts.

Harness discovery

Load {harness}/rules/infra-rules.mdc, backend-tests-rules.mdc, e2e-tests-rules.mdc when present. Read {product_root}/docker-compose.yml.

When to use

  • Create or adjust .gitlab-ci.yml
  • product_class saas or intelligent_saas (backend + frontend required)
  • Branch-based test/build/deploy

Out of scope

  • agent_runtime-only pipelines
  • Cloud provisioning beyond template contract

Inputs

  • {product_root} confirmed
  • Target branches (minimum: develop, homolog, main)
  • E2E folder name (testes-cypress, tests-e2e, or frontend/cypress)

Workflow

A — Copy baseline

Copy references/templates/gitlab-ci.template.yml to {product_root}/.gitlab-ci.yml

For separate product repos: paths are relative to product root (backend/, frontend/).

B — Mandatory adaptations
ItemAction
E2E folderMatch product folder in changes: and job cd
PHP imageAlign to backend Dockerfile
Test commandsMatch composer.json / package.json
Lockfileyarn.lock vs package-lock.json in cache key
Deploy branchesAdjust regex if not main/homolog/develop
E2E disabledRemove e2e jobs from deploy needs or document RUN_REMOTE_E2E=false

Do not copy another product's CI file — use this template only.

C — GitLab CI variables

Document in optional {product_root}/docs/context/ci-cd-notes.md:

  • ENV_BACKEND, ENV_FRONTEND, test DB vars, RUN_REMOTE_E2E, GCP keys — names only, no secret values
D — Validate

Lint YAML; confirm jobs match repo layout.

References

FileWhen
references/templates/gitlab-ci.template.ymlBaseline pipeline

Related skills

  • code-e2e-tests — E2E folder conventions
  • pm-e2e-test-generator — planning E2E scope

Comments

Markdown supported