Agent Skill
2/7/2026

gitlab-ci

GitLab CI skill: integrate automated tests (web/api/mobile/perf) with consistent artifacts.

W
willyu1007
0GitHub Stars
1Views
npx skills add willyu1007/Skill_Template_Module

SKILL.md

Namegitlab-ci
DescriptionGitLab CI skill: integrate automated tests (web/api/mobile/perf) with consistent artifacts.

name: gitlab-ci description: GitLab CI skill: integrate automated tests (web/api/mobile/perf) with consistent artifacts.

GitLab CI Integration (workflow)

Operating mode (token-efficient)

  • Treat gitlab-ci as a router + governor.
  • Do not load multiple procedures. Select exactly one procedure below and follow the chosen procedure end-to-end.

Routing (pick one procedure)

TaskOpen the procedureOptional templates
Enable/adjust test jobs (web/api/mobile/perf)reference/procedures/enable-test-jobs.mdreference/templates/gitlab-ci/
Standardize artifacts + reportingreference/procedures/artifacts-and-reporting.md
Troubleshoot CI failuresreference/procedures/troubleshoot.md

Shared non-negotiables (apply to all procedures)

  1. Test command contract

    • Each suite must have a single deterministic command runnable in CI.
    • Template repo baseline commands:
      • node .ai/scripts/lint-skills.mjs --strict
      • node .ai/scripts/lint-docs.mjs
      • node .ai/tests/run.mjs --suite <suite>
    • For project test suites, define equivalent deterministic commands (examples):
      • API (Newman): pnpm test:api / npm run test:api
      • Web (Playwright): pnpm test:e2e:playwright / npm run test:e2e:playwright
      • Web (Cypress): pnpm test:e2e:cypress / npm run test:e2e:cypress
      • Perf (k6): k6 run ... (or containerized runner)
      • Mobile: pnpm test:mobile:<detox|maestro|appium> / custom runner script
    • Commands must:
      • exit non-zero on test failures
      • write evidence/artifacts to a predictable directory (e.g. .ai/.tmp/test-evidence/ for the template repo, or artifacts/<suite>/ for app suites)
  2. Artifacts are mandatory

    • Always upload artifacts/evidence even on failure: artifacts/ or .ai/.tmp/test-evidence/
    • Keep artifacts size-bounded (videos/traces on failure only when possible).
  3. Secrets management

    • Use GitLab CI variables (masked/protected).
    • Never echo secrets in logs.
  4. Gating policy

    • MR gating should run only fast, stable suites.
    • Heavy suites (mobile, load/stress) should be scheduled or manually triggered.

Minimal inputs before changing CI

  • Whether .gitlab-ci.yml already exists and how the file is structured (includes, stages)
  • Which suites are MR-gated vs scheduled
  • Required CI variables and how they map to env vars
  • Runner constraints (Docker executor, macOS runners for iOS, etc.)

Verification

  • If you changed skills:

    • node .ai/scripts/lint-skills.mjs --strict
    • node .ai/skills/features/ci/gitlab-ci/scripts/validate-skill.mjs
  • If you changed .gitlab-ci.yml:

    • Trigger a pipeline and confirm:
      • correct suite execution
      • artifacts retained
      • failures show clear signals

Boundaries

  • Do not hardcode secrets or base URLs in .gitlab-ci.yml.
  • Do not make MR gating flaky; move unstable suites to scheduled runs.
Skills Info
Original Name:gitlab-ciAuthor:willyu1007