mcpField
N
ns-gitlab-ci-generator

ns-gitlab-ci-generator

github.com/nextstage-brasilCloud & DevOps0180 installsUpdated 6d ago
Repository

About ns-gitlab-ci-generator

A skill for generating or adjusting `.gitlab-ci.yml` for SaaS projects with backend and frontend components. It adapts a supplied template to repository paths, tests, images, lockfiles, and branch-based deployment rules.

Key features

  1. 01Copies a baseline CI template
  2. 02Adapts the end-to-end test directory
  3. 03Matches images and test commands
  4. 04Configures branch deployment rules
  5. 05Checks YAML and job layout

Use cases

  1. 01Create GitLab CI for a SaaS repository
  2. 02Set up branch-based testing and deployment
  3. 03Adapt CI jobs to a project layout

Install

Copy the command and run it in a terminal.

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

After installing, type/ns-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 .gitlab-ci.yml for backend + frontend SaaS layouts.

Session boot

Load .nextstage-harness/rules/infra-rules.mdc, backend-tests-rules.mdc, e2e-tests-rules.mdc when present. Read 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

  • 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 .gitlab-ci.yml

Paths are repo-relative (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 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

  • ns-e2e-tests — E2E folder conventions
  • ns-spec-driven references/e2e-test-task-generator.md — planning E2E scope

Comments

Markdown supported