/enterprise-harness-engineering:gitlab-cifrom enterprise-harness-engineering
Creates and reviews .gitlab-ci.yml files following GitLab CI best practices, DRY/SSOT patterns, and company standards including ArgoCD GitOps integration.
Ships in enterprise-harness-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create and review .gitlab-ci.yml files. Based on GitLab CI official best practices, DRY/SSOT design patterns, and company standards.
Applicable scenarios:
.gitlab-ci.yml for new projects.gitlab-ci.ymlCreation mode: Confirm project tech stack and deployment approach → generate configuration based on rules below → self-check against all rules.
Review mode: Read .gitlab-ci.yml and files referenced by include: → check against rules item by item (annotate ID) → output report:
| Tag | Purpose |
|---|---|
sonar-scanner | General CI tasks |
Set uniformly via default.tags:
default:
tags:
- sonar-scanner
Manage image versions uniformly via top-level variables:; hard-coding in jobs is prohibited:
variables:
PYTHON_IMAGE: python:3.11-slim
NODE_IMAGE: node:20-slim
GO_IMAGE: golang:1.22-alpine
CI is only responsible for Build & Test & Publish; deployment is triggered via ArgoCD GitOps:
Red line: Directly running kubectl apply / helm install to production environments from CI is prohibited.
D1: default: for shared configuration
tags, image, interruptible, retry, and other cross-job shared configuration must go in default:; repeating in each job is prohibited.
D2: extends: to eliminate job duplication
When multiple jobs share the same configuration, extract a hidden job (.job-name) as a base class; child jobs inherit via extends:.
D3: YAML anchors to reuse data blocks
Use YAML anchors (&anchor / *anchor) for duplicated pure data (such as rules: condition lists).
D4: !reference for selective reuse
When only a specific property of a job needs reuse (not the entire job), use !reference [.job, attribute].
S1: include: to reference shared templates
Company-level CI templates must be referenced from your-org/ci-templates via include:project:; copy-pasting is prohibited:
include:
- project: your-org/ci-templates
ref: main
file:
- /.gitlab-ci/jobs/mr-doc-check.yml
S2: variables: for centralized mutable values
Image versions, service names, regions, and other mutable values must be defined as top-level variables:; hard-coding in script: is prohibited.
S3: workflow:rules: for unified pipeline trigger strategy
Use workflow:rules: at the top of the file to define when to create pipelines, avoiding each job defining redundant trigger conditions separately.
| ID | Rule | Severity |
|---|---|---|
| R1 | Use rules: instead of only:/except: (deprecated) | Must Fix |
| R2 | Use needs: to build DAG and reduce pipeline time | Suggested |
| R3 | Define workflow:rules: to avoid duplicate pipelines | Suggested |
| R4 | stages: order is logical (lint → build → test → publish → deploy) | Suggested |
| ID | Rule | Severity |
|---|---|---|
| R5 | All jobs set reasonable timeout: | Suggested |
| R6 | Network-dependent jobs configure retry: + when: conditions | Suggested |
| R7 | Non-deployment jobs set interruptible: true | Suggested |
| R8 | Jobs requiring resource cleanup use after_script: | Optional |
| ID | Rule | Severity |
|---|---|---|
| R9 | No hard-coded secrets/credentials in yml | Must Fix |
| R10 | Sensitive variables use CI/CD Variables (masked + protected) | Must Fix |
| R11 | Production deployment jobs restricted to protected branches/tags | Must Fix |
| ID | Rule | Severity |
|---|---|---|
| R12 | artifacts: set expire_in: to prevent storage bloat | Suggested |
| R13 | cache: configured with correct key: and policy: | Suggested |
| R14 | Large test suites use parallel: for sharding | Optional |
| R15 | Deployment jobs use resource_group: to prevent concurrent conflicts | Suggested |
build-frontend:
stage: build
image: node:20-slim
tags:
- sonar-scanner
script:
- npm ci
- npm run build
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
build-backend:
stage: build
image: golang:1.22-alpine
tags:
- sonar-scanner
script:
- go build ./...
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
test-frontend:
stage: test
image: node:20-slim
tags:
- sonar-scanner
script:
- npm test
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
Issues: tags repeated 3 times (violates D1), rules repeated 3 times (violates D3), images hard-coded (violates S2).
deploy:
stage: deploy
only:
- main
script:
- kubectl apply -f k8s/ --kubeconfig /tmp/kubeconfig
variables:
IMAGE: registry.example.com/my-service:latest
Issues: Uses only: deprecated syntax (R1), directly runs kubectl apply to the cluster (ArgoCD red line), latest tag is not traceable (S2).
# Copied lint configuration from another project
lint:
stage: lint
image: golangci/golangci-lint:v1.55
script:
- golangci-lint run
tags:
- sonar-scanner
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
allow_failure: true
# 30 lines of identical configuration repeated across 5 projects...
Issues: Should be extracted to your-org/ci-templates (violates S1); cross-project maintenance cost is high, changes require 5 modifications.
variables:
NODE_IMAGE: node:20-slim
GO_IMAGE: golang:1.22-alpine
default:
tags:
- sonar-scanner
interruptible: true
retry:
max: 2
when:
- runner_system_failure
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "main"'
.mr-only:
rules: &mr-rules
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
include:
- project: your-org/ci-templates
ref: main
file:
- /.gitlab-ci/jobs/mr-doc-check.yml
stages:
- build
- test
- publish
build-frontend:
stage: build
image: $NODE_IMAGE
rules: *mr-rules
script:
- npm ci
- npm run build
artifacts:
paths: [dist/]
expire_in: 1 day
build-backend:
stage: build
image: $GO_IMAGE
rules: *mr-rules
script:
- go build ./...
test-frontend:
stage: test
image: $NODE_IMAGE
rules: *mr-rules
needs: [build-frontend]
script:
- npm test
coverage: '/coverage: \d+\.\d+%/'
Strengths:
default: unifies tags/retry/interruptible (D1)&mr-rules reuses trigger conditions (D3)variables: manages image versions (S2)include: references company templates (S1)workflow:rules: unifies trigger strategy (S3)needs: accelerates DAG (R2)artifacts:expire_in: controls storage (R12)publish:
stage: publish
image: docker:24
services:
- docker:24-dind
script:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
gitops-update:
stage: deploy
image: alpine/git:latest
script:
- git clone https://gitlab-ci-token:${GITOPS_TOKEN}@gitlab.example.com/your-org/gitops.git
- cd gitops/apps/my-service
- "sed -i 's|image:.*|image: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}|' values.yaml"
- git commit -am "chore: update my-service to ${CI_COMMIT_SHA}"
- git push
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
resource_group: production
Strengths: CI only builds and pushes images; deployment is triggered by updating the GitOps repo for ArgoCD (separation of concerns). $CI_COMMIT_SHA ensures image traceability. resource_group: prevents concurrent deployments (R15).
| Scenario | Condition |
|---|---|
| Minimal project | Only lint/test with no deployment needs — ArgoCD integration may be omitted |
| Legacy project migration | only:/except: may be temporarily retained during migration; a migration plan is required |
| One-off scripts | Temporary CI jobs may be simplified; must annotate # TODO: cleanup |
What SKILL.md sets; muted values are Claude Code's defaults
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./", skills.3: Invalid string: must start with "./", skills.4: Invalid string: must start with "./", skills.5: Invalid string: must start with "./", skills.6: Invalid string: must start with "./", skills.7: Invalid string: must start with "./", skills.8: Invalid string: must start with "./", skills.9: Invalid string: must start with "./", skills.10: Invalid string: must start with "./", skills.11: Invalid string: must start with "./", skills.12: Invalid string: must start with "./", skills.13: Invalid string: must start with "./", skills.14: Invalid string: must start with "./", skills.15: Invalid string: must start with "./", skills.16: Invalid string: must start with "./", skills.17: Invalid string: must start with "./", skills.18: Invalid string: must start with "./", skills.19: Invalid string: must start with "./", s…
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./", skills.3: Invalid string: must start with "./", skills.4: Invalid string: must start with "./", skills.5: Invalid string: must start with "./", skills.6: Invalid string: must start with "./", skills.7: Invalid string: must start with "./", skills.8: Invalid string: must start with "./", skills.9: Invalid string: must start with "./", skills.10: Invalid string: must start with "./", skills.11: Invalid string: must start with "./", skills.12: Invalid string: must start with "./", skills.13: Invalid string: must start with "./", skills.14: Invalid string: must start with "./", skills.15: Invalid string: must start with "./", skills.16: Invalid string: must start with "./", skills.17: Invalid string: must start with "./", skills.18: Invalid string: must start with "./", skills.19: Invalid string: must start with "./", s…
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
25 skills in this plugin
/architectUse when designing a new feature or system, making architecture decisions, writing technical design docs, or structuring project documentation. Triggers on "design", "architecture", "technical design", "ADR", "system decomposition", "how should I structure this", "设计方案", "架构设计", "技术方案", "文档体系", "写 User Story", "写文档". Also use when reviewing existing architecture docs or asking "where should I put this doc?"/clean-cacheBatch-scan workspace Flutter/Android/iOS/Node.js projects, report cache usage, and perform tiered cleanup to free disk space. Triggers when the user says "clean cache", "disk space low", "free up space", or similar./code-reviewUse when reviewing code changes — MR/PR review, local commits, or uncommitted changes. Reviews document compliance, content quality (architecture soundness, test completeness, observability coverage), and end-to-end consistency (User Story ↔ design ↔ code ↔ tests ↔ observability). Triggers on "review MR", "review this commit", "review my changes", "code review", "help me review"./code-submitCross-platform code submission workflow - Lint check, non-destructive review, manual verification document, smart staging, clean commit, MR creation. Auto-detects project type (Android/iOS/backend) and adapts to the corresponding lint/build tools. Triggers when the user says "submit code", "prepare to submit", "submit", "start submission flow", or "code submit"./dev-workflowStandard R&D process orchestrator — guides the full development lifecycle from User Story to CD. Invoke when user says "start a new feature", "new requirement", "我要开发一个新功能", "开始需求", "next step?", "研发流程", or resumes work on an existing feature. Also invoke proactively when any non-trivial feature work begins, even if the user just says "let's build X". Do NOT invoke for one-off bug fixes, hotpatches, or purely exploratory tasks with no deliverable./doc-writingWrite documents using the HWPR/AWOR framework -- separating human value judgments from AI-expanded content so critical information is not buried. Triggers when the user requests writing, rewriting, or reviewing document quality.Other plugins' skills for the same job