[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DRW6JTZNY4M293545EP4ES":3,"skill-same:01M6DRW6JTZNY4M293545EP4ES":102},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":53},"01M6DRW6JTZNY4M293545EP4ES","gitlab-ci-generator",null,"Create, generate, or scaffold .gitlab-ci.yml pipelines, stages, and jobs.","AntifragileTech\u002Fantifragile-claude-code","AntifragileTech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F174357194?v=4","01M6DQCYMK4CDSQQAN0ZC72NTV","01M6DQCYS9YPW1WKMQ5TJMPQ43",9,"MIT","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27],"gitlab","ci","gitlab ci","gitlab ci generator","scaffold","create","generate","gitlab-ci","pipelines","jobs","2026-11-10 10:12:30",false,"---\nname: gitlab-ci-generator\ndescription: Create, generate, or scaffold .gitlab-ci.yml pipelines, stages, and jobs.\n---\n\n# GitLab CI\u002FCD Pipeline Generator\n\n## Overview\n\nGenerate production-ready GitLab CI\u002FCD pipeline configurations following current best practices, security standards, and naming conventions. All generated resources are automatically validated using the devops-skills:gitlab-ci-validator skill to ensure syntax correctness and compliance with best practices.\n\n---\n\n## Trigger Phrases\n\nUse this skill when the user asks for GitLab CI\u002FCD generation requests such as:\n- \"Create a `.gitlab-ci.yml` for...\"\n- \"Build a GitLab pipeline for Node\u002FPython\u002FJava...\"\n- \"Add Docker build and deploy jobs in GitLab CI\"\n- \"Set up GitLab parent-child or multi-project pipelines\"\n- \"Include SAST\u002Fdependency scanning templates in GitLab CI\"\n\n## Execution Model\n\nFollow this deterministic flow in order:\n1. Classify request complexity (`targeted`, `lightweight`, or `full`).\n2. Load only the required reference tier for that complexity.\n3. Output the matching response profile for the selected mode.\n4. For complete pipeline generation, start from the closest template and customize.\n5. Validate complete pipelines with strict Critical\u002FHigh gates.\n6. Present output with validation status and template\u002Fversion notes.\n\nIf tooling is unavailable, use the documented fallback branch and report it explicitly.\n\n## Mode Routing (Quick Decision)\n\n| Request shape | Mode | Required references | Output profile |\n|---------------|------|---------------------|----------------|\n| Simple single-file pipeline with common jobs\u002Fstages and low risk | **Lightweight** | Tier 1 (+ Tier 2 only if needed) | Lightweight confirmation + compact final sections |\n| Multi-environment deploy, advanced `rules`, includes\u002Ftemplates, security\u002Fcompliance-sensitive workflow, or unclear\u002Frisky requirement | **Full** | Tier 1 + Tier 2 (Tier 3 only if needed) | Full confirmation + full final sections |\n| Review\u002FQ&A\u002Fsnippet\u002Ffocused fix (not full file generation) | **Targeted** | Only directly relevant files | Concise targeted response (no full boilerplate) |\n\nWhen uncertain on a complete-generation request, route to **Full** mode.\n\n## MANDATORY PRE-GENERATION STEPS\n\n**CRITICAL:** Before generating any complete GitLab CI\u002FCD pipeline, complete these steps.\n\n### Step 1: Classify Complexity (REQUIRED)\n\n| Mode | Use When | Minimum Confirmation |\n|------|----------|----------------------|\n| **Targeted** | Review\u002FQ&A\u002Fsnippet\u002Ffocused fix where full pipeline generation is not requested | Concise targeted response |\n| **Lightweight** | Simple single-file pipeline, common stages\u002Fjobs, no advanced GitLab features, no sensitive deploy\u002Fsecurity customization | Lightweight confirmation |\n| **Full** | Multi-environment deploys, includes\u002Ftemplates, advanced `rules` logic, security scanning customization, compliance-sensitive workflows, or any unclear\u002Frisky request | Full confirmation |\n\nWhen uncertain on a complete-generation request, default to **Full** mode.\n\n### Step 2: Load References by Tier (REQUIRED)\n\nUse an open\u002Fread action to load references based on the selected mode.\n\n**Targeted mode (review\u002FQ&A\u002Fsnippet\u002Ffocused fix):**\n- Load only directly relevant references\u002Ftemplates for the scoped request.\n- Do not enforce Full-generation Tier 1\u002FTier 2 checklist items.\n\n**Tier 1 (Required for complete pipeline generation in Lightweight and Full modes):**\n1. `references\u002Fbest-practices.md` - baseline security, performance, naming\n2. `references\u002Fcommon-patterns.md` - starting pattern selection\n3. Matching template from `assets\u002Ftemplates\u002F`:\n   - Docker pipelines -> `assets\u002Ftemplates\u002Fdocker-build.yml`\n   - Kubernetes deployments -> `assets\u002Ftemplates\u002Fkubernetes-deploy.yml`\n   - Multi-project pipelines -> `assets\u002Ftemplates\u002Fmulti-project.yml`\n   - Basic pipelines -> `assets\u002Ftemplates\u002Fbasic-pipeline.yml`\n\n**Tier 2 (Required for Full mode; optional for Lightweight mode):**\n1. `references\u002Fgitlab-ci-reference.md` - keyword\u002Fsyntax edge cases\n2. `references\u002Fsecurity-guidelines.md` - security-sensitive controls\n\n**Tier 3 (Conditional external docs lookup):**\n- Use only when local references do not cover requested features or version-specific behavior.\n- Follow the lookup flow in \"Handling GitLab CI\u002FCD Documentation Lookup.\"\n\n**If a required local reference or template is unavailable:**\n- Report the exact missing path.\n- Continue with available references and mark assumptions explicitly.\n- Do not claim production-ready confidence until missing critical inputs are resolved.\n\n### Step 3: Confirm Understanding (EXPLICIT OUTPUT REQUIRED)\n\n#### Lightweight Confirmation Mode\n\nUse for simple requests only.\n\n**Required format:**\n```markdown\n## Reference Analysis Complete (Lightweight)\n\n**Pattern:** [Pattern name] from common-patterns.md\n**Template:** [Template file]\n**Key standards to enforce:**\n- [2-3 concrete standards]\n```\n\n**Example:**\n```markdown\n## Reference Analysis Complete (Lightweight)\n\n**Pattern:** Basic Build-Test-Deploy from common-patterns.md\n**Template:** assets\u002Ftemplates\u002Fbasic-pipeline.yml\n**Key standards to enforce:**\n- Pin runtime image versions (no `:latest`)\n- Add explicit job timeouts\n- Use `rules` instead of deprecated `only`\u002F`except`\n```\n\n#### Full Confirmation Mode\n\nUse for complex or security-sensitive requests.\n\n**Required format:**\n```markdown\n## Reference Analysis Complete (Full)\n\n**Pipeline Pattern Identified:** [Pattern name] from common-patterns.md\n- [Brief description of why this pattern fits]\n\n**Best Practices to Apply:**\n- [List 3-5 key best practices relevant to this pipeline]\n\n**Security Guidelines:**\n- [List security measures to implement]\n\n**Template Foundation:** [Template file name]\n- [What will be customized from this template]\n```\n\n**Example:**\n```markdown\n## Reference Analysis Complete (Full)\n\n**Pipeline Pattern Identified:** Docker Build + Kubernetes Deployment from common-patterns.md\n- User needs containerized deployment to K8s clusters with staging\u002Fproduction environments\n\n**Best Practices to Apply:**\n- Pin all Docker images to specific versions (not `:latest`)\n- Use caching for pip dependencies\n- Implement DAG optimization with `needs` keyword\n- Set explicit timeout on all jobs (15-20 minutes)\n- Use `resource_group` for deployment jobs\n\n**Security Guidelines:**\n- Use masked CI\u002FCD variables for secrets (KUBE_CONTEXT, registry credentials)\n- Include container scanning with Trivy\n- Never expose secrets in logs\n\n**Template Foundation:** assets\u002Ftemplates\u002Fdocker-build.yml + assets\u002Ftemplates\u002Fkubernetes-deploy.yml\n- Combine Docker build pattern with K8s kubectl deployment\n- Add Python-specific test jobs\n```\n\n**Skipping confirmation is not allowed for complete pipeline generation.**\n\n---\n\n## Core Capabilities\n\n### 1. Generate Basic CI\u002FCD Pipelines\n\nCreate complete, production-ready `.gitlab-ci.yml` files with proper structure, security best practices, and efficient CI\u002FCD patterns.\n\n**When to use:**\n- User requests: \"Create a GitLab pipeline for...\", \"Build a CI\u002FCD pipeline...\", \"Generate GitLab CI config...\"\n- Scenarios: CI\u002FCD pipelines, automated testing, build automation, deployment pipelines\n\n**Process:**\n1. Understand the user's requirements (what needs to be automated)\n2. Identify stages, jobs, dependencies, and artifacts\n3. Use `assets\u002Ftemplates\u002Fbasic-pipeline.yml` as structural foundation\n4. Reference `references\u002Fbest-practices.md` for implementation patterns\n5. Reference `references\u002Fcommon-patterns.md` for standard pipeline patterns\n6. Generate the pipeline following these principles:\n   - Use semantic stage and job names\n   - Pin Docker images to specific versions (not :latest)\n   - Implement proper secrets management with masked variables\n   - Use caching for dependencies to improve performance\n   - Implement proper artifact handling with expiration\n   - Use `needs` keyword for DAG optimization when appropriate\n   - Add proper error handling with retry and allow_failure\n   - Use `rules` instead of deprecated only\u002Fexcept\n   - **Set explicit `timeout` for all jobs** (10-30 minutes typically)\n   - Add meaningful job descriptions in comments\n7. **ALWAYS validate** the generated pipeline using the devops-skills:gitlab-ci-validator skill\n8. If validation fails, fix the issues and re-validate\n\n**Example structure:**\n```yaml\n# Basic CI\u002FCD Pipeline\n# Builds, tests, and deploys the application\n\nstages:\n  - build\n  - test\n  - deploy\n\n# Global variables\nvariables:\n  NODE_VERSION: \"20\"\n  DOCKER_DRIVER: overlay2\n\n# Default settings for all jobs\ndefault:\n  image: node:20-alpine\n  timeout: 20 minutes  # Default timeout for all jobs\n  cache:\n    key: ${CI_COMMIT_REF_SLUG}\n    paths:\n      - node_modules\u002F\n  before_script:\n    - echo \"Starting job ${CI_JOB_NAME}\"\n  tags:\n    - docker\n  interruptible: true\n\n# Build stage - Compiles the application\nbuild-application:\n  stage: build\n  timeout: 15 minutes\n  script:\n    - npm ci\n    - npm run build\n  artifacts:\n    paths:\n      - dist\u002F\n    expire_in: 1 hour\n  rules:\n    - changes:\n        - src\u002F**\u002F*\n        - package*.json\n      when: always\n    - when: on_success\n\n# Test stage\ntest-unit:\n  stage: test\n  needs: [build-application]\n  script:\n    - npm run test:unit\n  coverage: '\u002FCoverage: \\d+\\.\\d+%\u002F'\n  artifacts:\n    reports:\n      junit: junit.xml\n      coverage_report:\n        coverage_format: cobertura\n        path: coverage\u002Fcobertura-coverage.xml\n\ntest-lint:\n  stage: test\n  needs: []  # Can run immediately\n  script:\n    - npm run lint\n  allow_failure: true\n\n# Deploy stage\ndeploy-staging:\n  stage: deploy\n  needs: [build-application, test-unit]\n  script:\n    - npm run deploy:staging\n  environment:\n    name: staging\n    url: https:\u002F\u002Fstaging.example.com\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"develop\"\n  when: manual\n\ndeploy-production:\n  stage: deploy\n  needs: [build-application, test-unit]\n  script:\n    - npm run deploy:production\n  environment:\n    name: production\n    url: https:\u002F\u002Fexample.com\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n  when: manual\n  resource_group: production\n```\n\n### 2. Generate Docker Build Pipelines\n\nCreate pipelines for building, testing, and pushing Docker images to container registries.\n\n**When to use:**\n- User requests: \"Create a Docker build pipeline...\", \"Build and push Docker images...\"\n- Scenarios: Container builds, multi-stage Docker builds, registry pushes\n\n**Process:**\n1. Understand the Docker build requirements (base images, registries, tags)\n2. Use `assets\u002Ftemplates\u002Fdocker-build.yml` as foundation\n3. Implement Docker-in-Docker or Kaniko for builds\n4. Configure registry authentication\n5. Implement image tagging strategy\n6. Add security scanning if needed\n7. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example:**\n```yaml\nstages:\n  - build\n  - scan\n  - push\n\nvariables:\n  DOCKER_DRIVER: overlay2\n  IMAGE_NAME: $CI_REGISTRY_IMAGE\n  IMAGE_TAG: $CI_COMMIT_SHORT_SHA\n\n# Build Docker image\ndocker-build:\n  stage: build\n  image: docker:24-dind\n  timeout: 20 minutes\n  services:\n    - docker:24-dind\n  before_script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n  script:\n    - docker build\n        --cache-from $IMAGE_NAME:latest\n        --tag $IMAGE_NAME:$IMAGE_TAG\n        --tag $IMAGE_NAME:latest\n        .\n    - docker push $IMAGE_NAME:$IMAGE_TAG\n    - docker push $IMAGE_NAME:latest\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n  retry:\n    max: 2\n    when:\n      - runner_system_failure\n\n# Scan for vulnerabilities\ncontainer-scan:\n  stage: scan\n  image: aquasec\u002Ftrivy:0.49.0\n  timeout: 15 minutes\n  script:\n    - trivy image --exit-code 0 --severity HIGH,CRITICAL $IMAGE_NAME:$IMAGE_TAG\n  needs: [docker-build]\n  allow_failure: true\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n```\n\n### 3. Generate Kubernetes Deployment Pipelines\n\nCreate pipelines that deploy applications to Kubernetes clusters.\n\n**When to use:**\n- User requests: \"Deploy to Kubernetes...\", \"Create K8s deployment pipeline...\"\n- Scenarios: Kubernetes deployments, Helm deployments, kubectl operations\n\n**Process:**\n1. Identify the Kubernetes deployment method (kubectl, Helm, Kustomize)\n2. Use `assets\u002Ftemplates\u002Fkubernetes-deploy.yml` as foundation\n3. Configure cluster authentication (service accounts, kubeconfig)\n4. Implement proper environment management\n5. Add rollback capabilities\n6. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example:**\n```yaml\nstages:\n  - build\n  - deploy\n\n# Kubernetes deployment job\ndeploy-k8s:\n  stage: deploy\n  image: bitnami\u002Fkubectl:1.29\n  timeout: 10 minutes\n  before_script:\n    - kubectl config use-context $KUBE_CONTEXT\n  script:\n    - kubectl set image deployment\u002Fmyapp myapp=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA -n $KUBE_NAMESPACE\n    - kubectl rollout status deployment\u002Fmyapp -n $KUBE_NAMESPACE --timeout=5m\n  environment:\n    name: production\n    url: https:\u002F\u002Fexample.com\n    kubernetes:\n      namespace: production\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n      when: manual\n  resource_group: k8s-production\n  retry:\n    max: 2\n    when:\n      - runner_system_failure\n```\n\n### 4. Generate Multi-Project Pipelines\n\nCreate pipelines that trigger other projects or use parent-child pipeline patterns.\n\n**When to use:**\n- User requests: \"Create multi-project pipeline...\", \"Trigger other pipelines...\"\n- Scenarios: Monorepos, microservices, orchestration pipelines\n\n**Process:**\n1. Identify the pipeline orchestration needs\n2. Use `assets\u002Ftemplates\u002Fmulti-project.yml` or parent-child templates\n3. Configure proper artifact passing\n4. Implement parallel execution where appropriate\n5. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example (Parent-Child):**\n```yaml\n# Parent pipeline\nstages:\n  - trigger\n\ngenerate-child-pipeline:\n  stage: trigger\n  script:\n    - echo \"Generating child pipeline config\"\n    - |\n      cat > child-pipeline.yml \u003C\u003CEOF\n      stages:\n        - build\n\n      child-job:\n        stage: build\n        script:\n          - echo \"Running child job\"\n      EOF\n  artifacts:\n    paths:\n      - child-pipeline.yml\n\ntrigger-child:\n  stage: trigger\n  trigger:\n    include:\n      - artifact: child-pipeline.yml\n        job: generate-child-pipeline\n    strategy: depend\n  needs: [generate-child-pipeline]\n```\n\n### 5. Generate Template-Based Configurations\n\nCreate reusable templates using extends, YAML anchors, and includes.\n\n**When to use:**\n- User requests: \"Create reusable templates...\", \"Build modular pipeline config...\"\n- Scenarios: Template libraries, DRY configurations, shared CI\u002FCD logic\n\n**Process:**\n1. Identify common patterns to extract\n2. Create hidden jobs (prefixed with .)\n3. Use `extends` keyword for inheritance\n4. Organize into separate files with `include`\n5. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example:**\n```yaml\n# Hidden template jobs (include timeout in templates)\n.node-template:\n  image: node:20-alpine\n  timeout: 15 minutes  # Default timeout for jobs using this template\n  cache:\n    key: ${CI_COMMIT_REF_SLUG}\n    paths:\n      - node_modules\u002F\n  before_script:\n    - npm ci\n  interruptible: true\n\n.deploy-template:\n  timeout: 10 minutes  # Deploy jobs should have explicit timeout\n  before_script:\n    - echo \"Deploying to ${ENVIRONMENT}\"\n  after_script:\n    - echo \"Deployment complete\"\n  retry:\n    max: 2\n    when:\n      - runner_system_failure\n      - stuck_or_timeout_failure\n  interruptible: false  # Deploys should not be interrupted\n\n# Actual jobs using templates\nbuild:\n  extends: .node-template\n  stage: build\n  script:\n    - npm run build\n\ndeploy-staging:\n  extends: .deploy-template\n  stage: deploy\n  variables:\n    ENVIRONMENT: staging\n  script:\n    - .\u002Fdeploy.sh staging\n  resource_group: staging\n```\n\n### 6. Handling GitLab CI\u002FCD Documentation Lookup\n\nUse this flow only when local references do not cover requested features or version-sensitive behavior.\n\n**Detection:**\n- User mentions specific GitLab features (e.g., \"Auto DevOps\", \"SAST\", \"dependency scanning\")\n- User requests integration with GitLab templates\n- Pipeline requires specific GitLab runner features\n\n**Process:**\n\n1. **Identify the feature:**\n   - Extract the GitLab feature or template name\n   - Determine if version-specific information is needed\n\n2. **Check local references first (Tier 1\u002FTier 2):**\n   - `references\u002Fcommon-patterns.md`\n   - `references\u002Fgitlab-ci-reference.md`\n   - `references\u002Fsecurity-guidelines.md`\n\n3. **Use Context7 first when external lookup is needed:**\n   - Resolve library: `mcp__context7__resolve-library-id`\n   - Query docs: `mcp__context7__query-docs`\n   - Prefer GitLab official\u002Flibrary docs over secondary sources\n\n4. **Fallback to web search when Context7 is unavailable or insufficient:**\n   - Use `web.search_query`\n   - Query pattern: `\"GitLab CI\u002FCD [feature] documentation\"`\n   - Prefer results from `docs.gitlab.com`\n\n5. **Open and extract from specific docs pages when needed:**\n   - Use `web.open` for selected documentation pages\n   - Capture required syntax, variables, and version constraints\n\n6. **Analyze discovered documentation for:**\n   - Current recommended approach\n   - Required variables and configuration\n   - Template include syntax\n   - Best practices and security recommendations\n   - Example usage\n\n7. **If network tools are unavailable (offline\u002Fconstrained environment):**\n   - Continue using local references only\n   - State that external version verification could not be performed\n   - Add a version-assumption note in the final output\n\n8. **Generate pipeline using discovered information:**\n   - Use correct template include syntax\n   - Configure required variables\n   - Add security best practices\n   - Include comments about versions and choices\n\n**Example with GitLab templates:**\n```yaml\n# Include GitLab's security templates (use Jobs\u002F prefix for current templates)\ninclude:\n  - template: Jobs\u002FSAST.gitlab-ci.yml\n  - template: Jobs\u002FDependency-Scanning.gitlab-ci.yml\n\n# Customize SAST behavior via global variables\n# Note: Set variables globally rather than overriding template jobs\n# to avoid validation issues with partial job definitions\nvariables:\n  SAST_EXCLUDED_PATHS: \"spec, test, tests, tmp, node_modules\"\n  DS_EXCLUDED_PATHS: \"node_modules, vendor\"\n  SECURE_LOG_LEVEL: \"info\"\n```\n\n> **Important:** When using `include` with GitLab templates, the included jobs are\n> fully defined in the template. If you need to customize them, prefer setting\n> variables globally rather than creating partial job overrides (which will fail\n> local validation because the validator cannot resolve the included template).\n> GitLab merges the configuration at runtime, but local validators only see\n> your `.gitlab-ci.yml` file.\n\n## Validation Workflow\n\n**CRITICAL:** Every generated GitLab CI\u002FCD configuration MUST be validated before presenting to the user.\n\n### Validation Process\n\n1. **Primary validation path:** after generating a complete pipeline, invoke the `devops-skills:gitlab-ci-validator` skill:\n   ```\n   Skill: devops-skills:gitlab-ci-validator\n   ```\n\n2. **Script fallback path (if validator skill cannot be invoked):**\n   ```bash\n   PIPELINE_FILE=\"\u003Cgenerated-output-path>\"\n   ```\n   - Set `PIPELINE_FILE` to the exact generated file path (for example, `pipelines\u002Freview.yml` or `.gitlab-ci.yml`).\n   - Fail fast if that file does not exist:\n     ```bash\n     if [[ ! -f \"$PIPELINE_FILE\" ]]; then\n       echo \"ERROR: CI file not found: $PIPELINE_FILE\" >&2\n       exit 1\n     fi\n     ```\n   ```bash\n   # From repository root\n   bash devops-skills-plugin\u002Fskills\u002Fgitlab-ci-validator\u002Fscripts\u002Fvalidate_gitlab_ci.sh \"$PIPELINE_FILE\"\n   ```\n   ```bash\n   # From skills\u002Fgitlab-ci-generator directory\n   bash ..\u002Fgitlab-ci-validator\u002Fscripts\u002Fvalidate_gitlab_ci.sh \"$PIPELINE_FILE\"\n   ```\n   - If the script is not executable:\n     ```bash\n     chmod +x devops-skills-plugin\u002Fskills\u002Fgitlab-ci-validator\u002Fscripts\u002Fvalidate_gitlab_ci.sh\n     ```\n   - Optional API lint fallback when GitLab project context is available:\n     ```bash\n     jq --null-input --arg yaml \"$(\u003C\"$PIPELINE_FILE\")\" '.content=$yaml' \\\n     | curl --header \"Content-Type: application\u002Fjson\" \\\n       --url \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\u002Fprojects\u002F:id\u002Fci\u002Flint?include_merged_yaml=true\" \\\n       --data @-\n     ```\n\n3. **Manual fallback path (only if both primary and script paths are unavailable):**\n   - Run manual checks for YAML validity, stage\u002Fjob references, and obvious secret exposure.\n   - Mark output as `Validation status: Manual fallback (not fully verified)`.\n   - Do not claim production-ready status if Critical\u002FHigh risk cannot be confidently ruled out.\n\n4. **The validator skill\u002Fscript checks:**\n   - Validate YAML syntax\n   - Check GitLab CI\u002FCD schema compliance\n   - Verify job references and dependencies\n   - Check for best practices violations\n   - Perform security scanning\n   - Report any errors, warnings, or issues\n\n5. **Analyze validation results and take action based on severity:**\n\n   | Severity | Action Required |\n   |----------|-----------------|\n   | **CRITICAL** | MUST fix before presenting. Pipeline is broken or severely insecure. |\n   | **HIGH** | MUST fix before presenting. Significant security or functionality issues. |\n   | **MEDIUM** | SHOULD fix before presenting. Apply fixes or explain why not applicable. |\n   | **LOW** | MAY fix or acknowledge. Inform user of recommendations. |\n   | **SUGGESTIONS** | Review and apply if beneficial. No fix required. |\n\n6. **Fix-and-Revalidate Loop (MANDATORY for Critical\u002FHigh issues):**\n   ```\n   While validation has CRITICAL or HIGH issues:\n     1. Edit the generated file to fix the issue\n     2. Re-run validation\n     3. Repeat until no CRITICAL or HIGH issues remain\n   ```\n\n7. **Before presenting to user, ensure:**\n   - Zero CRITICAL issues\n   - Zero HIGH issues\n   - MEDIUM issues either fixed OR explained why they're acceptable\n   - LOW issues and suggestions acknowledged\n\n8. **When presenting the validated configuration:**\n   - State validation status clearly\n   - State validation path used (skill, script fallback, or manual fallback)\n   - List any remaining MEDIUM\u002FLOW issues with explanations\n   - Include template\u002Fversion freshness notes\n   - Provide usage instructions\n   - Mention any trade-offs made\n\n**Critical\u002FHigh gate is strict and never optional for production-ready claims.**\n\n### Validation Pass Criteria\n\n**Pipeline is READY to present when:**\n- ✅ Validation path executed (validator skill or script fallback)\n- ✅ Syntax validation: PASSED\n- ✅ Security scan: No CRITICAL or HIGH issues\n- ✅ Best practices: Reviewed (warnings acceptable with explanation)\n\n**Pipeline is NOT READY when:**\n- ❌ Any syntax errors exist\n- ❌ Any CRITICAL security issues exist\n- ❌ Any HIGH security issues exist\n- ❌ Job references are broken\n- ❌ Only manual fallback was used and Critical\u002FHigh risks cannot be ruled out\n\n### When to Skip Validation\n\nOnly skip validation when:\n- Generating partial code snippets (not complete files)\n- Creating examples for documentation purposes\n- User explicitly requests to skip validation\n\n### Handling MEDIUM Severity Issues (REQUIRED OUTPUT)\n\nWhen the validator reports MEDIUM severity issues, you MUST either fix them OR explain why they're acceptable. This explanation is REQUIRED in your output.\n\n**Required format for MEDIUM issue handling:**\n```\n## Validation Issues Addressed\n\n### MEDIUM Severity Issues\n\n| Issue | Status | Explanation |\n|-------|--------|-------------|\n| [Issue code] | Fixed\u002FAcceptable | [Why it was fixed OR why it's acceptable] |\n```\n\n**Example MEDIUM issue explanations:**\n\n```\n## Validation Issues Addressed\n\n### MEDIUM Severity Issues\n\n| Issue | Status | Explanation |\n|-------|--------|-------------|\n| `image-variable-no-digest` | Acceptable | Using `python:${PYTHON_VERSION}-alpine` allows flexible version management via CI\u002FCD variables. The PYTHON_VERSION variable is controlled internally and pinned to \"3.12\". SHA digest pinning would require updating the digest with every image update, adding maintenance burden without significant security benefit for this use case. |\n| `pip-without-hashes` | Acceptable | This pipeline installs well-known packages (pytest, flake8) from PyPI. Using `--require-hashes` would require maintaining hash files for all transitive dependencies. For internal CI\u002FCD, the security trade-off is acceptable. For higher security environments, consider using a private PyPI mirror with verified packages. |\n| `git-strategy-none` | Acceptable | The `stop-staging` and `rollback-production` jobs use `GIT_STRATEGY: none` because they only run kubectl commands that don't require source code. The scripts are inline in the YAML (not from the repo), so there's no risk of executing untrusted code. |\n```\n\n**When to FIX vs ACCEPT:**\n\n| Scenario | Action |\n|----------|--------|\n| Production\u002Fhigh-security environment | FIX the issue |\n| Issue has simple fix with no downside | FIX the issue |\n| Fix adds significant complexity | ACCEPT with explanation |\n| Fix requires external changes (e.g., CI\u002FCD variables) | ACCEPT with explanation |\n| Issue is false positive for this context | ACCEPT with explanation |\n\n### Reviewing Suggestions (REQUIRED OUTPUT)\n\nWhen the validator provides suggestions, you MUST briefly acknowledge them and explain whether they should be applied.\n\n**Required format:**\n```\n## Validator Suggestions Review\n\n| Suggestion | Recommendation | Reason |\n|------------|----------------|--------|\n| [suggestion] | Apply\u002FSkip | [Why] |\n```\n\n**Example suggestions review:**\n\n```\n## Validator Suggestions Review\n\n| Suggestion | Recommendation | Reason |\n|------------|----------------|--------|\n| `missing-retry` on test jobs | Skip | Test jobs are deterministic and don't interact with external services. Retry would mask flaky tests rather than fail fast. |\n| `parallel-opportunity` for test-unit | Apply if beneficial | Could be added if pytest supports sharding. Add `parallel: 3` with `pytest --shard=${CI_NODE_INDEX}\u002F${CI_NODE_TOTAL}` if test suite is large enough to benefit. |\n| `dag-optimization` for stop-staging | Skip | This job is manual and only runs on environment cleanup. DAG optimization wouldn't provide meaningful speedup. |\n| `no-dependency-proxy` | Apply for production | Consider using `$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX` to avoid Docker Hub rate limits. Requires GitLab Premium. |\n| `environment-no-url` for rollback | Skip | Rollback jobs don't deploy new versions, so a URL would be misleading. |\n| `missing-coverage` for lint job | Skip | Linting doesn't produce coverage data. This is a false positive. |\n```\n\n### Template and Version Notes (REQUIRED OUTPUT)\n\nAfter validation results, include a concise freshness note for templates and documentation assumptions.\n\n**Required format:**\n```markdown\n## Template and Version Notes\n\n- **Template base:** [assets\u002Ftemplates\u002F\u003Cfile>.yml]\n- **Template customization scope:** [what changed from template]\n- **Version\u002Fdoc basis:** [Context7, docs.gitlab.com, or local references only]\n- **Freshness note:** [exact date checked, or \"external lookup unavailable\"]\n- **Version-sensitive assumptions:** [if any]\n```\n\n**Example:**\n```markdown\n## Template and Version Notes\n\n- **Template base:** assets\u002Ftemplates\u002Fdocker-build.yml\n- **Template customization scope:** Added unit-test stage and environment-specific deploy rules\n- **Version\u002Fdoc basis:** docs.gitlab.com include-template docs + local references\n- **Freshness note:** Verified template syntax on 2026-02-28\n- **Version-sensitive assumptions:** Uses `Jobs\u002FSAST.gitlab-ci.yml` template path\n```\n\n### Usage Instructions Template (REQUIRED OUTPUT)\n\nAfter presenting the validated pipeline, you MUST provide usage instructions. This is NOT optional.\n\n**Required format:**\n```\n## Usage Instructions\n\n### Required CI\u002FCD Variables\n\nConfigure these variables in **Settings → CI\u002FCD → Variables**:\n\n| Variable | Description | Masked | Protected |\n|----------|-------------|--------|-----------|\n| [VARIABLE_NAME] | [Description] | Yes\u002FNo | Yes\u002FNo |\n\n### Setup Steps\n\n1. [First setup step]\n2. [Second setup step]\n...\n\n### Pipeline Behavior\n\n- **On push to `develop`:** [What happens]\n- **On push to `main`:** [What happens]\n- **On tag `vX.Y.Z`:** [What happens]\n\n### Customization\n\n[Any customization notes]\n```\n\n**Example usage instructions:**\n\n```\n## Usage Instructions\n\n### Required CI\u002FCD Variables\n\nConfigure these variables in **Settings → CI\u002FCD → Variables**:\n\n| Variable | Description | Masked | Protected |\n|----------|-------------|--------|-----------|\n| `KUBE_CONTEXT` | Kubernetes cluster context name | No | Yes |\n| `KUBE_NAMESPACE_STAGING` | Staging namespace (default: staging) | No | No |\n| `KUBE_NAMESPACE_PRODUCTION` | Production namespace (default: production) | No | Yes |\n\n**Note:** `CI_REGISTRY_USER`, `CI_REGISTRY_PASSWORD`, and `CI_REGISTRY` are automatically provided by GitLab.\n\n### Kubernetes Integration Setup\n\n1. **Enable Kubernetes integration** in **Settings → Infrastructure → Kubernetes clusters**\n2. **Add your cluster** using the agent-based or certificate-based method\n3. **Create namespaces** for staging and production if they don't exist:\n   ```bash\n   kubectl create namespace staging\n   kubectl create namespace production\n   ```\n4. **Ensure deployment exists** in the target namespaces before running the pipeline\n\n### Pipeline Behavior\n\n- **On push to `develop`:** Runs tests → builds Docker image → deploys to staging automatically\n- **On push to `main`:** Runs tests → builds Docker image → manual deployment to production\n- **On tag `vX.Y.Z`:** Runs tests → builds Docker image → manual deployment to production\n\n### Customization\n\n- Update `APP_NAME` variable to match your Kubernetes deployment name\n- Modify environment URLs in `deploy-staging` and `deploy-production` jobs\n- Add Helm deployment by uncommenting the Helm jobs in the template\n```\n\n## Best Practices to Enforce\n\nReference `references\u002Fbest-practices.md` for comprehensive guidelines. Key principles:\n\n### Mandatory Standards\n\n1. **Security First:**\n   - Pin Docker images to specific versions (not :latest)\n   - Use masked variables for secrets ($CI_REGISTRY_PASSWORD should be masked)\n   - Never expose secrets in logs\n   - Validate inputs and sanitize variables\n   - Use protected variables for sensitive environments\n\n2. **Performance:**\n   - Implement caching for dependencies (ALWAYS for npm, pip, maven, etc.)\n   - Use `needs` keyword for DAG optimization (ALWAYS when jobs have dependencies)\n   - Set artifact expiration to avoid storage bloat (ALWAYS set `expire_in`)\n   - Use `parallel` execution *when applicable* (only if test framework supports sharding)\n   - Minimize unnecessary artifact passing (use `artifacts: false` in `needs` when not needed)\n\n3. **Reliability:**\n   - **Set explicit `timeout` for ALL jobs** (prevents hanging jobs, typically 10-30 minutes)\n     - Even when using `default` or `extends` for timeout inheritance, add explicit `timeout` to each job\n     - This improves readability and avoids validator warnings about missing timeout\n     - Example: A job using `.deploy-template` should still have `timeout: 15 minutes` explicitly set\n   - Add retry logic for flaky operations (network calls, external API interactions)\n   - Use `allow_failure` appropriately for non-critical jobs (linting, optional scans)\n   - Use `resource_group` for deployment jobs (prevents concurrent deployments)\n   - Add `interruptible: true` for test jobs (allows cancellation when new commits push)\n\n4. **Naming:**\n   - Job names: Descriptive, kebab-case (e.g., \"build-application\", \"test-unit\")\n   - Stage names: Short, clear (e.g., \"build\", \"test\", \"deploy\")\n   - Variable names: UPPER_SNAKE_CASE for environment variables\n   - Environment names: lowercase (e.g., \"production\", \"staging\")\n\n5. **Configuration Organization:**\n   - Use `extends` for reusable configuration (PREFERRED over YAML anchors for GitLab CI)\n   - Use `include` for modular pipeline files (organize large pipelines into multiple files)\n   - Use `rules` instead of deprecated only\u002Fexcept (ALWAYS)\n   - Define `default` settings for common configurations (image, timeout, cache, tags)\n   - Use YAML anchors *only when necessary* for complex repeated structures within a single file\n     - Note: `extends` is preferred because it provides better visualization in GitLab UI\n\n6. **Error Handling:**\n   - Set appropriate timeout values (ALWAYS - prevents hanging jobs)\n   - Configure retry behavior for flaky operations (network calls, external APIs)\n   - Use `allow_failure: true` for non-blocking jobs (linting, optional scans)\n   - Add cleanup steps with `after_script` *when needed* (e.g., stopping test containers, cleanup)\n   - Implement notification mechanisms *when required* (e.g., Slack integration for deployment failures)\n\n## Resources\n\n### References (Tiered Loading)\n\n- `references\u002Fbest-practices.md` (**Tier 1: required for all**) - Comprehensive GitLab CI\u002FCD best practices\n  - Security patterns, performance optimization\n  - Pipeline design, configuration organization\n  - Common patterns and anti-patterns\n  - **Use this:** When implementing any GitLab CI\u002FCD resource\n\n- `references\u002Fcommon-patterns.md` (**Tier 1: required for all**) - Frequently used pipeline patterns\n  - Basic CI pipeline patterns\n  - Docker build and push patterns\n  - Deployment patterns (K8s, cloud platforms)\n  - Multi-project and parent-child patterns\n  - **Use this:** When selecting which pattern to use\n\n- `references\u002Fgitlab-ci-reference.md` (**Tier 2: required for Full mode**) - GitLab CI\u002FCD YAML syntax reference\n  - Complete keyword reference\n  - Job configuration options\n  - Rules and conditional execution\n  - Variables and environments\n  - **Use this:** For syntax and keyword details\n\n- `references\u002Fsecurity-guidelines.md` (**Tier 2: required for Full mode**) - Security best practices\n  - Secrets management\n  - Image security\n  - Script security\n  - Artifact security\n  - **Use this:** For security-sensitive configurations\n\n### Assets (Templates to Customize)\n\n- `assets\u002Ftemplates\u002Fbasic-pipeline.yml` - Complete basic pipeline template\n- `assets\u002Ftemplates\u002Fdocker-build.yml` - Docker build pipeline template\n- `assets\u002Ftemplates\u002Fkubernetes-deploy.yml` - Kubernetes deployment template\n- `assets\u002Ftemplates\u002Fmulti-project.yml` - Multi-project orchestration template\n\n**How to use templates:**\n1. Copy the relevant template structure\n2. Replace all `[PLACEHOLDERS]` with actual values\n3. Customize logic based on user requirements\n4. Remove unnecessary sections\n5. Validate the result\n\n## Typical Workflow Example\n\n**User request:** \"Create a CI\u002FCD pipeline for a Node.js app with testing and Docker deployment\"\n\n**Process:**\n1. ✅ Understand requirements:\n   - Node.js application\n   - Run tests (unit, lint)\n   - Build Docker image\n   - Deploy to container registry\n   - Trigger on push and merge requests\n\n2. ✅ Reference resources:\n   - Check `references\u002Fbest-practices.md` for pipeline structure\n   - Check `references\u002Fcommon-patterns.md` for Node.js + Docker pattern\n   - Use `assets\u002Ftemplates\u002Fdocker-build.yml` as base\n\n3. ✅ Generate pipeline:\n   - Define stages (build, test, dockerize, deploy)\n   - Create build job with caching\n   - Create test jobs (unit, lint) with needs optimization\n   - Create Docker build job\n   - Add proper artifact management\n   - Pin Docker images to versions\n   - Include proper secrets handling\n\n4. ✅ Validate:\n   - Invoke `devops-skills:gitlab-ci-validator` skill\n   - Fix any reported issues\n   - Re-validate if needed\n\n5. ✅ Present to user:\n   - Show validated pipeline\n   - Explain key sections\n   - Provide usage instructions\n   - Mention successful validation\n\n## Common Pipeline Patterns\n\n### Basic Three-Stage Pipeline\n```yaml\nstages:\n  - build\n  - test\n  - deploy\n\nbuild-job:\n  stage: build\n  script: make build\n\ntest-job:\n  stage: test\n  script: make test\n\ndeploy-job:\n  stage: deploy\n  script: make deploy\n  when: manual\n```\n\n### DAG Pipeline with Needs\n```yaml\nstages:\n  - build\n  - test\n  - deploy\n\nbuild-frontend:\n  stage: build\n  script: npm run build:frontend\n\nbuild-backend:\n  stage: build\n  script: npm run build:backend\n\ntest-frontend:\n  stage: test\n  needs: [build-frontend]\n  script: npm test:frontend\n\ntest-backend:\n  stage: test\n  needs: [build-backend]\n  script: npm test:backend\n\ndeploy:\n  stage: deploy\n  needs: [test-frontend, test-backend]\n  script: make deploy\n```\n\n### Conditional Execution with Rules\n```yaml\ndeploy-staging:\n  script: deploy staging\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"develop\"\n      when: always\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n      when: manual\n\ndeploy-production:\n  script: deploy production\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n      when: manual\n    - when: never\n```\n\n### Matrix Parallel Jobs\n```yaml\ntest:\n  parallel:\n    matrix:\n      - NODE_VERSION: ['18', '20', '22']\n        OS: ['ubuntu', 'alpine']\n  image: node:${NODE_VERSION}-${OS}\n  script:\n    - npm test\n```\n\n## Error Messages and Troubleshooting\n\n### If devops-skills:gitlab-ci-validator reports errors:\n\n1. **Syntax errors:** Fix YAML formatting, indentation, or structure\n2. **Job reference errors:** Ensure referenced jobs exist in needs\u002Fdependencies\n3. **Stage errors:** Verify all job stages are defined in stages list\n4. **Rule errors:** Check rules syntax and variable references\n5. **Security warnings:** Address hardcoded secrets and image pinning\n\n### If GitLab documentation is not found:\n\n1. Try Context7 first: `mcp__context7__resolve-library-id` -> `mcp__context7__query-docs`\n2. If needed, run `web.search_query` scoped to `docs.gitlab.com`\n3. Open specific pages with `web.open` and extract only required syntax\u002Fvariables\n4. If offline, continue with local references and add version-assumption notes\n\n---\n\n## PRE-DELIVERY CHECKLIST\n\n**MANDATORY:** Before presenting ANY generated pipeline to the user, verify ALL items:\n\n### Mode and References\n- [ ] Complexity mode selected (`Targeted`, `Lightweight`, or `Full`)\n- [ ] For **Targeted** mode: only directly relevant files\u002Freferences loaded\n- [ ] For **Lightweight\u002FFull** modes: read `references\u002Fbest-practices.md` before generating\n- [ ] For **Lightweight\u002FFull** modes: read `references\u002Fcommon-patterns.md` before generating\n- [ ] For **Lightweight\u002FFull** modes: read appropriate template from `assets\u002Ftemplates\u002F` for the pipeline type\n- [ ] For **Full** mode: read `references\u002Fgitlab-ci-reference.md`\n- [ ] For **Full** mode: read `references\u002Fsecurity-guidelines.md`\n- [ ] **Output explicit confirmation statement** for Lightweight\u002FFull modes\n\n### Generation Standards Applied\n- [ ] All Docker images pinned to specific versions (no `:latest`)\n- [ ] All jobs have explicit `timeout` (10-30 minutes typically)\n- [ ] `default` block includes `timeout` if defined\n- [ ] Hidden templates (`.template-name`) include `timeout`\n- [ ] Caching configured for dependency installation\n- [ ] `needs` keyword used for DAG optimization where appropriate\n- [ ] `rules` used (not deprecated `only`\u002F`except`)\n- [ ] `resource_group` configured for deployment jobs\n- [ ] Artifacts have `expire_in` set\n- [ ] Secrets use masked CI\u002FCD variables (not hardcoded)\n\n### Validation Completed\n- [ ] Validation executed via `devops-skills:gitlab-ci-validator` or script fallback\n- [ ] Zero CRITICAL issues\n- [ ] Zero HIGH issues\n- [ ] **MEDIUM issues addressed** (fixed OR explained in output using required format)\n- [ ] **LOW issues acknowledged** (listed in output)\n- [ ] **Suggestions reviewed** (using required format)\n- [ ] Re-validated after any fixes\n- [ ] If only manual fallback was available: output marked as not fully verified\n\n### Presentation Ready\n- [ ] Validation status stated clearly\n- [ ] Validation path stated clearly (skill, script fallback, or manual fallback)\n- [ ] **MEDIUM\u002FLOW issues explained** (with table format)\n- [ ] **Suggestions review provided** (with table format)\n- [ ] **Template and version notes provided** (with required format)\n- [ ] **Usage instructions provided** (with required sections)\n- [ ] Key sections explained\n\n**If any checkbox is unchecked, DO NOT present the pipeline. Complete the missing steps first.**\n\n### Required Output Sections\n\nUse the smallest valid output profile for the selected mode.\n\n**Full mode (complete\u002Fcomplex pipeline):**\n1. **Reference Analysis Complete** (from Step 3)\n2. **Generated Pipeline** (the `.gitlab-ci.yml` content)\n3. **Validation Results Summary** (pass\u002Ffail status)\n4. **Validation Issues Addressed** (MEDIUM issues table)\n5. **Validator Suggestions Review** (suggestions table)\n6. **Template and Version Notes** (template base + freshness\u002Fversion assumptions)\n7. **Usage Instructions** (variables, setup, behavior)\n\n**Lightweight mode (complete\u002Fsimple pipeline):**\n1. **Reference Analysis Complete (Lightweight)**\n2. **Generated Pipeline**\n3. **Validation Results Summary**\n4. **Template and Version Notes**\n5. **Usage Instructions**\n- Add **Validation Issues Addressed** only when MEDIUM issues exist.\n- Add **Validator Suggestions Review** only when suggestions are present.\n\n**Targeted mode (review\u002FQ&A\u002Fsnippet\u002Ffocused fix):**\n- Provide only the directly requested artifact\u002Fanswer and a concise rationale.\n- Include validation\u002Ffallback disclosure if validation was not run.\n- Do not force full pipeline-generation sections.\n\n## Done Criteria\n\nThis skill execution is done when:\n- Simple requests use **Lightweight mode** without unnecessary Tier 2 loading.\n- Complex requests use **Full mode** with Tier 2 references and complete confirmation.\n- Validation enforces strict Critical\u002FHigh gates before production-ready claims.\n- Output includes template\u002Fversion freshness notes plus usage instructions.\n- Any fallback path is explicit and does not hide verification gaps.\n\n---\n\n## Summary\n\nAlways follow this sequence when generating GitLab CI\u002FCD pipelines:\n\n1. **Classify Complexity** - choose `Targeted`, `Lightweight`, or `Full` mode.\n2. **Load References** - use tiered loading:\n   - For `Targeted` mode, load only directly relevant files.\n   - For `Lightweight\u002FFull` modes, load:\n     - `references\u002Fbest-practices.md`\n     - `references\u002Fcommon-patterns.md`\n     - Plus the appropriate template from `assets\u002Ftemplates\u002F`\n   - For `Full` mode, also load:\n     - `references\u002Fgitlab-ci-reference.md`\n     - `references\u002Fsecurity-guidelines.md`\n3. **Confirm** - Output targeted response or Lightweight\u002FFull reference analysis as required by mode.\n4. **Generate** - Use templates and follow standards (security, caching, naming, explicit timeout on ALL jobs).\n5. **Lookup Docs When Needed** - Context7 first, then `web.search_query`\u002F`web.open`, with offline fallback notes when constrained.\n6. **Validate** - Use `devops-skills:gitlab-ci-validator`, script fallback if needed.\n7. **Fix** - Resolve all Critical\u002FHigh issues, address Medium issues.\n8. **Verify Checklist** - Confirm all pre-delivery checklist items.\n9. **Present** - Deliver output with validation summary, template\u002Fversion notes, and usage instructions.\n\nGenerate GitLab CI\u002FCD pipelines that are:\n- ✅ Secure with pinned images and proper secrets handling\n- ✅ Following current best practices and conventions\n- ✅ Using proper configuration organization (extends, includes)\n- ✅ Optimized for performance (caching, needs, DAG)\n- ✅ Properly documented with usage instructions\n- ✅ Validated with zero Critical\u002FHigh issues\n- ✅ Production-ready and maintainable\n","# GitLab CI\u002FCD Pipeline Generator\n\n## Overview\n\nGenerate production-ready GitLab CI\u002FCD pipeline configurations following current best practices, security standards, and naming conventions. All generated resources are automatically validated using the devops-skills:gitlab-ci-validator skill to ensure syntax correctness and compliance with best practices.\n\n---\n\n## Trigger Phrases\n\nUse this skill when the user asks for GitLab CI\u002FCD generation requests such as:\n- \"Create a `.gitlab-ci.yml` for...\"\n- \"Build a GitLab pipeline for Node\u002FPython\u002FJava...\"\n- \"Add Docker build and deploy jobs in GitLab CI\"\n- \"Set up GitLab parent-child or multi-project pipelines\"\n- \"Include SAST\u002Fdependency scanning templates in GitLab CI\"\n\n## Execution Model\n\nFollow this deterministic flow in order:\n1. Classify request complexity (`targeted`, `lightweight`, or `full`).\n2. Load only the required reference tier for that complexity.\n3. Output the matching response profile for the selected mode.\n4. For complete pipeline generation, start from the closest template and customize.\n5. Validate complete pipelines with strict Critical\u002FHigh gates.\n6. Present output with validation status and template\u002Fversion notes.\n\nIf tooling is unavailable, use the documented fallback branch and report it explicitly.\n\n## Mode Routing (Quick Decision)\n\n| Request shape | Mode | Required references | Output profile |\n|---------------|------|---------------------|----------------|\n| Simple single-file pipeline with common jobs\u002Fstages and low risk | **Lightweight** | Tier 1 (+ Tier 2 only if needed) | Lightweight confirmation + compact final sections |\n| Multi-environment deploy, advanced `rules`, includes\u002Ftemplates, security\u002Fcompliance-sensitive workflow, or unclear\u002Frisky requirement | **Full** | Tier 1 + Tier 2 (Tier 3 only if needed) | Full confirmation + full final sections |\n| Review\u002FQ&A\u002Fsnippet\u002Ffocused fix (not full file generation) | **Targeted** | Only directly relevant files | Concise targeted response (no full boilerplate) |\n\nWhen uncertain on a complete-generation request, route to **Full** mode.\n\n## MANDATORY PRE-GENERATION STEPS\n\n**CRITICAL:** Before generating any complete GitLab CI\u002FCD pipeline, complete these steps.\n\n### Step 1: Classify Complexity (REQUIRED)\n\n| Mode | Use When | Minimum Confirmation |\n|------|----------|----------------------|\n| **Targeted** | Review\u002FQ&A\u002Fsnippet\u002Ffocused fix where full pipeline generation is not requested | Concise targeted response |\n| **Lightweight** | Simple single-file pipeline, common stages\u002Fjobs, no advanced GitLab features, no sensitive deploy\u002Fsecurity customization | Lightweight confirmation |\n| **Full** | Multi-environment deploys, includes\u002Ftemplates, advanced `rules` logic, security scanning customization, compliance-sensitive workflows, or any unclear\u002Frisky request | Full confirmation |\n\nWhen uncertain on a complete-generation request, default to **Full** mode.\n\n### Step 2: Load References by Tier (REQUIRED)\n\nUse an open\u002Fread action to load references based on the selected mode.\n\n**Targeted mode (review\u002FQ&A\u002Fsnippet\u002Ffocused fix):**\n- Load only directly relevant references\u002Ftemplates for the scoped request.\n- Do not enforce Full-generation Tier 1\u002FTier 2 checklist items.\n\n**Tier 1 (Required for complete pipeline generation in Lightweight and Full modes):**\n1. `references\u002Fbest-practices.md` - baseline security, performance, naming\n2. `references\u002Fcommon-patterns.md` - starting pattern selection\n3. Matching template from `assets\u002Ftemplates\u002F`:\n   - Docker pipelines -> `assets\u002Ftemplates\u002Fdocker-build.yml`\n   - Kubernetes deployments -> `assets\u002Ftemplates\u002Fkubernetes-deploy.yml`\n   - Multi-project pipelines -> `assets\u002Ftemplates\u002Fmulti-project.yml`\n   - Basic pipelines -> `assets\u002Ftemplates\u002Fbasic-pipeline.yml`\n\n**Tier 2 (Required for Full mode; optional for Lightweight mode):**\n1. `references\u002Fgitlab-ci-reference.md` - keyword\u002Fsyntax edge cases\n2. `references\u002Fsecurity-guidelines.md` - security-sensitive controls\n\n**Tier 3 (Conditional external docs lookup):**\n- Use only when local references do not cover requested features or version-specific behavior.\n- Follow the lookup flow in \"Handling GitLab CI\u002FCD Documentation Lookup.\"\n\n**If a required local reference or template is unavailable:**\n- Report the exact missing path.\n- Continue with available references and mark assumptions explicitly.\n- Do not claim production-ready confidence until missing critical inputs are resolved.\n\n### Step 3: Confirm Understanding (EXPLICIT OUTPUT REQUIRED)\n\n#### Lightweight Confirmation Mode\n\nUse for simple requests only.\n\n**Required format:**\n```markdown\n## Reference Analysis Complete (Lightweight)\n\n**Pattern:** [Pattern name] from common-patterns.md\n**Template:** [Template file]\n**Key standards to enforce:**\n- [2-3 concrete standards]\n```\n\n**Example:**\n```markdown\n## Reference Analysis Complete (Lightweight)\n\n**Pattern:** Basic Build-Test-Deploy from common-patterns.md\n**Template:** assets\u002Ftemplates\u002Fbasic-pipeline.yml\n**Key standards to enforce:**\n- Pin runtime image versions (no `:latest`)\n- Add explicit job timeouts\n- Use `rules` instead of deprecated `only`\u002F`except`\n```\n\n#### Full Confirmation Mode\n\nUse for complex or security-sensitive requests.\n\n**Required format:**\n```markdown\n## Reference Analysis Complete (Full)\n\n**Pipeline Pattern Identified:** [Pattern name] from common-patterns.md\n- [Brief description of why this pattern fits]\n\n**Best Practices to Apply:**\n- [List 3-5 key best practices relevant to this pipeline]\n\n**Security Guidelines:**\n- [List security measures to implement]\n\n**Template Foundation:** [Template file name]\n- [What will be customized from this template]\n```\n\n**Example:**\n```markdown\n## Reference Analysis Complete (Full)\n\n**Pipeline Pattern Identified:** Docker Build + Kubernetes Deployment from common-patterns.md\n- User needs containerized deployment to K8s clusters with staging\u002Fproduction environments\n\n**Best Practices to Apply:**\n- Pin all Docker images to specific versions (not `:latest`)\n- Use caching for pip dependencies\n- Implement DAG optimization with `needs` keyword\n- Set explicit timeout on all jobs (15-20 minutes)\n- Use `resource_group` for deployment jobs\n\n**Security Guidelines:**\n- Use masked CI\u002FCD variables for secrets (KUBE_CONTEXT, registry credentials)\n- Include container scanning with Trivy\n- Never expose secrets in logs\n\n**Template Foundation:** assets\u002Ftemplates\u002Fdocker-build.yml + assets\u002Ftemplates\u002Fkubernetes-deploy.yml\n- Combine Docker build pattern with K8s kubectl deployment\n- Add Python-specific test jobs\n```\n\n**Skipping confirmation is not allowed for complete pipeline generation.**\n\n---\n\n## Core Capabilities\n\n### 1. Generate Basic CI\u002FCD Pipelines\n\nCreate complete, production-ready `.gitlab-ci.yml` files with proper structure, security best practices, and efficient CI\u002FCD patterns.\n\n**When to use:**\n- User requests: \"Create a GitLab pipeline for...\", \"Build a CI\u002FCD pipeline...\", \"Generate GitLab CI config...\"\n- Scenarios: CI\u002FCD pipelines, automated testing, build automation, deployment pipelines\n\n**Process:**\n1. Understand the user's requirements (what needs to be automated)\n2. Identify stages, jobs, dependencies, and artifacts\n3. Use `assets\u002Ftemplates\u002Fbasic-pipeline.yml` as structural foundation\n4. Reference `references\u002Fbest-practices.md` for implementation patterns\n5. Reference `references\u002Fcommon-patterns.md` for standard pipeline patterns\n6. Generate the pipeline following these principles:\n   - Use semantic stage and job names\n   - Pin Docker images to specific versions (not :latest)\n   - Implement proper secrets management with masked variables\n   - Use caching for dependencies to improve performance\n   - Implement proper artifact handling with expiration\n   - Use `needs` keyword for DAG optimization when appropriate\n   - Add proper error handling with retry and allow_failure\n   - Use `rules` instead of deprecated only\u002Fexcept\n   - **Set explicit `timeout` for all jobs** (10-30 minutes typically)\n   - Add meaningful job descriptions in comments\n7. **ALWAYS validate** the generated pipeline using the devops-skills:gitlab-ci-validator skill\n8. If validation fails, fix the issues and re-validate\n\n**Example structure:**\n```yaml\n# Basic CI\u002FCD Pipeline\n# Builds, tests, and deploys the application\n\nstages:\n  - build\n  - test\n  - deploy\n\n# Global variables\nvariables:\n  NODE_VERSION: \"20\"\n  DOCKER_DRIVER: overlay2\n\n# Default settings for all jobs\ndefault:\n  image: node:20-alpine\n  timeout: 20 minutes  # Default timeout for all jobs\n  cache:\n    key: ${CI_COMMIT_REF_SLUG}\n    paths:\n      - node_modules\u002F\n  before_script:\n    - echo \"Starting job ${CI_JOB_NAME}\"\n  tags:\n    - docker\n  interruptible: true\n\n# Build stage - Compiles the application\nbuild-application:\n  stage: build\n  timeout: 15 minutes\n  script:\n    - npm ci\n    - npm run build\n  artifacts:\n    paths:\n      - dist\u002F\n    expire_in: 1 hour\n  rules:\n    - changes:\n        - src\u002F**\u002F*\n        - package*.json\n      when: always\n    - when: on_success\n\n# Test stage\ntest-unit:\n  stage: test\n  needs: [build-application]\n  script:\n    - npm run test:unit\n  coverage: '\u002FCoverage: \\d+\\.\\d+%\u002F'\n  artifacts:\n    reports:\n      junit: junit.xml\n      coverage_report:\n        coverage_format: cobertura\n        path: coverage\u002Fcobertura-coverage.xml\n\ntest-lint:\n  stage: test\n  needs: []  # Can run immediately\n  script:\n    - npm run lint\n  allow_failure: true\n\n# Deploy stage\ndeploy-staging:\n  stage: deploy\n  needs: [build-application, test-unit]\n  script:\n    - npm run deploy:staging\n  environment:\n    name: staging\n    url: https:\u002F\u002Fstaging.example.com\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"develop\"\n  when: manual\n\ndeploy-production:\n  stage: deploy\n  needs: [build-application, test-unit]\n  script:\n    - npm run deploy:production\n  environment:\n    name: production\n    url: https:\u002F\u002Fexample.com\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n  when: manual\n  resource_group: production\n```\n\n### 2. Generate Docker Build Pipelines\n\nCreate pipelines for building, testing, and pushing Docker images to container registries.\n\n**When to use:**\n- User requests: \"Create a Docker build pipeline...\", \"Build and push Docker images...\"\n- Scenarios: Container builds, multi-stage Docker builds, registry pushes\n\n**Process:**\n1. Understand the Docker build requirements (base images, registries, tags)\n2. Use `assets\u002Ftemplates\u002Fdocker-build.yml` as foundation\n3. Implement Docker-in-Docker or Kaniko for builds\n4. Configure registry authentication\n5. Implement image tagging strategy\n6. Add security scanning if needed\n7. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example:**\n```yaml\nstages:\n  - build\n  - scan\n  - push\n\nvariables:\n  DOCKER_DRIVER: overlay2\n  IMAGE_NAME: $CI_REGISTRY_IMAGE\n  IMAGE_TAG: $CI_COMMIT_SHORT_SHA\n\n# Build Docker image\ndocker-build:\n  stage: build\n  image: docker:24-dind\n  timeout: 20 minutes\n  services:\n    - docker:24-dind\n  before_script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n  script:\n    - docker build\n        --cache-from $IMAGE_NAME:latest\n        --tag $IMAGE_NAME:$IMAGE_TAG\n        --tag $IMAGE_NAME:latest\n        .\n    - docker push $IMAGE_NAME:$IMAGE_TAG\n    - docker push $IMAGE_NAME:latest\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n  retry:\n    max: 2\n    when:\n      - runner_system_failure\n\n# Scan for vulnerabilities\ncontainer-scan:\n  stage: scan\n  image: aquasec\u002Ftrivy:0.49.0\n  timeout: 15 minutes\n  script:\n    - trivy image --exit-code 0 --severity HIGH,CRITICAL $IMAGE_NAME:$IMAGE_TAG\n  needs: [docker-build]\n  allow_failure: true\n  rules:\n    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH\n```\n\n### 3. Generate Kubernetes Deployment Pipelines\n\nCreate pipelines that deploy applications to Kubernetes clusters.\n\n**When to use:**\n- User requests: \"Deploy to Kubernetes...\", \"Create K8s deployment pipeline...\"\n- Scenarios: Kubernetes deployments, Helm deployments, kubectl operations\n\n**Process:**\n1. Identify the Kubernetes deployment method (kubectl, Helm, Kustomize)\n2. Use `assets\u002Ftemplates\u002Fkubernetes-deploy.yml` as foundation\n3. Configure cluster authentication (service accounts, kubeconfig)\n4. Implement proper environment management\n5. Add rollback capabilities\n6. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example:**\n```yaml\nstages:\n  - build\n  - deploy\n\n# Kubernetes deployment job\ndeploy-k8s:\n  stage: deploy\n  image: bitnami\u002Fkubectl:1.29\n  timeout: 10 minutes\n  before_script:\n    - kubectl config use-context $KUBE_CONTEXT\n  script:\n    - kubectl set image deployment\u002Fmyapp myapp=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA -n $KUBE_NAMESPACE\n    - kubectl rollout status deployment\u002Fmyapp -n $KUBE_NAMESPACE --timeout=5m\n  environment:\n    name: production\n    url: https:\u002F\u002Fexample.com\n    kubernetes:\n      namespace: production\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n      when: manual\n  resource_group: k8s-production\n  retry:\n    max: 2\n    when:\n      - runner_system_failure\n```\n\n### 4. Generate Multi-Project Pipelines\n\nCreate pipelines that trigger other projects or use parent-child pipeline patterns.\n\n**When to use:**\n- User requests: \"Create multi-project pipeline...\", \"Trigger other pipelines...\"\n- Scenarios: Monorepos, microservices, orchestration pipelines\n\n**Process:**\n1. Identify the pipeline orchestration needs\n2. Use `assets\u002Ftemplates\u002Fmulti-project.yml` or parent-child templates\n3. Configure proper artifact passing\n4. Implement parallel execution where appropriate\n5. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example (Parent-Child):**\n```yaml\n# Parent pipeline\nstages:\n  - trigger\n\ngenerate-child-pipeline:\n  stage: trigger\n  script:\n    - echo \"Generating child pipeline config\"\n    - |\n      cat > child-pipeline.yml \u003C\u003CEOF\n      stages:\n        - build\n\n      child-job:\n        stage: build\n        script:\n          - echo \"Running child job\"\n      EOF\n  artifacts:\n    paths:\n      - child-pipeline.yml\n\ntrigger-child:\n  stage: trigger\n  trigger:\n    include:\n      - artifact: child-pipeline.yml\n        job: generate-child-pipeline\n    strategy: depend\n  needs: [generate-child-pipeline]\n```\n\n### 5. Generate Template-Based Configurations\n\nCreate reusable templates using extends, YAML anchors, and includes.\n\n**When to use:**\n- User requests: \"Create reusable templates...\", \"Build modular pipeline config...\"\n- Scenarios: Template libraries, DRY configurations, shared CI\u002FCD logic\n\n**Process:**\n1. Identify common patterns to extract\n2. Create hidden jobs (prefixed with .)\n3. Use `extends` keyword for inheritance\n4. Organize into separate files with `include`\n5. **ALWAYS validate** using devops-skills:gitlab-ci-validator skill\n\n**Example:**\n```yaml\n# Hidden template jobs (include timeout in templates)\n.node-template:\n  image: node:20-alpine\n  timeout: 15 minutes  # Default timeout for jobs using this template\n  cache:\n    key: ${CI_COMMIT_REF_SLUG}\n    paths:\n      - node_modules\u002F\n  before_script:\n    - npm ci\n  interruptible: true\n\n.deploy-template:\n  timeout: 10 minutes  # Deploy jobs should have explicit timeout\n  before_script:\n    - echo \"Deploying to ${ENVIRONMENT}\"\n  after_script:\n    - echo \"Deployment complete\"\n  retry:\n    max: 2\n    when:\n      - runner_system_failure\n      - stuck_or_timeout_failure\n  interruptible: false  # Deploys should not be interrupted\n\n# Actual jobs using templates\nbuild:\n  extends: .node-template\n  stage: build\n  script:\n    - npm run build\n\ndeploy-staging:\n  extends: .deploy-template\n  stage: deploy\n  variables:\n    ENVIRONMENT: staging\n  script:\n    - .\u002Fdeploy.sh staging\n  resource_group: staging\n```\n\n### 6. Handling GitLab CI\u002FCD Documentation Lookup\n\nUse this flow only when local references do not cover requested features or version-sensitive behavior.\n\n**Detection:**\n- User mentions specific GitLab features (e.g., \"Auto DevOps\", \"SAST\", \"dependency scanning\")\n- User requests integration with GitLab templates\n- Pipeline requires specific GitLab runner features\n\n**Process:**\n\n1. **Identify the feature:**\n   - Extract the GitLab feature or template name\n   - Determine if version-specific information is needed\n\n2. **Check local references first (Tier 1\u002FTier 2):**\n   - `references\u002Fcommon-patterns.md`\n   - `references\u002Fgitlab-ci-reference.md`\n   - `references\u002Fsecurity-guidelines.md`\n\n3. **Use Context7 first when external lookup is needed:**\n   - Resolve library: `mcp__context7__resolve-library-id`\n   - Query docs: `mcp__context7__query-docs`\n   - Prefer GitLab official\u002Flibrary docs over secondary sources\n\n4. **Fallback to web search when Context7 is unavailable or insufficient:**\n   - Use `web.search_query`\n   - Query pattern: `\"GitLab CI\u002FCD [feature] documentation\"`\n   - Prefer results from `docs.gitlab.com`\n\n5. **Open and extract from specific docs pages when needed:**\n   - Use `web.open` for selected documentation pages\n   - Capture required syntax, variables, and version constraints\n\n6. **Analyze discovered documentation for:**\n   - Current recommended approach\n   - Required variables and configuration\n   - Template include syntax\n   - Best practices and security recommendations\n   - Example usage\n\n7. **If network tools are unavailable (offline\u002Fconstrained environment):**\n   - Continue using local references only\n   - State that external version verification could not be performed\n   - Add a version-assumption note in the final output\n\n8. **Generate pipeline using discovered information:**\n   - Use correct template include syntax\n   - Configure required variables\n   - Add security best practices\n   - Include comments about versions and choices\n\n**Example with GitLab templates:**\n```yaml\n# Include GitLab's security templates (use Jobs\u002F prefix for current templates)\ninclude:\n  - template: Jobs\u002FSAST.gitlab-ci.yml\n  - template: Jobs\u002FDependency-Scanning.gitlab-ci.yml\n\n# Customize SAST behavior via global variables\n# Note: Set variables globally rather than overriding template jobs\n# to avoid validation issues with partial job definitions\nvariables:\n  SAST_EXCLUDED_PATHS: \"spec, test, tests, tmp, node_modules\"\n  DS_EXCLUDED_PATHS: \"node_modules, vendor\"\n  SECURE_LOG_LEVEL: \"info\"\n```\n\n> **Important:** When using `include` with GitLab templates, the included jobs are\n> fully defined in the template. If you need to customize them, prefer setting\n> variables globally rather than creating partial job overrides (which will fail\n> local validation because the validator cannot resolve the included template).\n> GitLab merges the configuration at runtime, but local validators only see\n> your `.gitlab-ci.yml` file.\n\n## Validation Workflow\n\n**CRITICAL:** Every generated GitLab CI\u002FCD configuration MUST be validated before presenting to the user.\n\n### Validation Process\n\n1. **Primary validation path:** after generating a complete pipeline, invoke the `devops-skills:gitlab-ci-validator` skill:\n   ```\n   Skill: devops-skills:gitlab-ci-validator\n   ```\n\n2. **Script fallback path (if validator skill cannot be invoked):**\n   ```bash\n   PIPELINE_FILE=\"\u003Cgenerated-output-path>\"\n   ```\n   - Set `PIPELINE_FILE` to the exact generated file path (for example, `pipelines\u002Freview.yml` or `.gitlab-ci.yml`).\n   - Fail fast if that file does not exist:\n     ```bash\n     if [[ ! -f \"$PIPELINE_FILE\" ]]; then\n       echo \"ERROR: CI file not found: $PIPELINE_FILE\" >&2\n       exit 1\n     fi\n     ```\n   ```bash\n   # From repository root\n   bash devops-skills-plugin\u002Fskills\u002Fgitlab-ci-validator\u002Fscripts\u002Fvalidate_gitlab_ci.sh \"$PIPELINE_FILE\"\n   ```\n   ```bash\n   # From skills\u002Fgitlab-ci-generator directory\n   bash ..\u002Fgitlab-ci-validator\u002Fscripts\u002Fvalidate_gitlab_ci.sh \"$PIPELINE_FILE\"\n   ```\n   - If the script is not executable:\n     ```bash\n     chmod +x devops-skills-plugin\u002Fskills\u002Fgitlab-ci-validator\u002Fscripts\u002Fvalidate_gitlab_ci.sh\n     ```\n   - Optional API lint fallback when GitLab project context is available:\n     ```bash\n     jq --null-input --arg yaml \"$(\u003C\"$PIPELINE_FILE\")\" '.content=$yaml' \\\n     | curl --header \"Content-Type: application\u002Fjson\" \\\n       --url \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\u002Fprojects\u002F:id\u002Fci\u002Flint?include_merged_yaml=true\" \\\n       --data @-\n     ```\n\n3. **Manual fallback path (only if both primary and script paths are unavailable):**\n   - Run manual checks for YAML validity, stage\u002Fjob references, and obvious secret exposure.\n   - Mark output as `Validation status: Manual fallback (not fully verified)`.\n   - Do not claim production-ready status if Critical\u002FHigh risk cannot be confidently ruled out.\n\n4. **The validator skill\u002Fscript checks:**\n   - Validate YAML syntax\n   - Check GitLab CI\u002FCD schema compliance\n   - Verify job references and dependencies\n   - Check for best practices violations\n   - Perform security scanning\n   - Report any errors, warnings, or issues\n\n5. **Analyze validation results and take action based on severity:**\n\n   | Severity | Action Required |\n   |----------|-----------------|\n   | **CRITICAL** | MUST fix before presenting. Pipeline is broken or severely insecure. |\n   | **HIGH** | MUST fix before presenting. Significant security or functionality issues. |\n   | **MEDIUM** | SHOULD fix before presenting. Apply fixes or explain why not applicable. |\n   | **LOW** | MAY fix or acknowledge. Inform user of recommendations. |\n   | **SUGGESTIONS** | Review and apply if beneficial. No fix required. |\n\n6. **Fix-and-Revalidate Loop (MANDATORY for Critical\u002FHigh issues):**\n   ```\n   While validation has CRITICAL or HIGH issues:\n     1. Edit the generated file to fix the issue\n     2. Re-run validation\n     3. Repeat until no CRITICAL or HIGH issues remain\n   ```\n\n7. **Before presenting to user, ensure:**\n   - Zero CRITICAL issues\n   - Zero HIGH issues\n   - MEDIUM issues either fixed OR explained why they're acceptable\n   - LOW issues and suggestions acknowledged\n\n8. **When presenting the validated configuration:**\n   - State validation status clearly\n   - State validation path used (skill, script fallback, or manual fallback)\n   - List any remaining MEDIUM\u002FLOW issues with explanations\n   - Include template\u002Fversion freshness notes\n   - Provide usage instructions\n   - Mention any trade-offs made\n\n**Critical\u002FHigh gate is strict and never optional for production-ready claims.**\n\n### Validation Pass Criteria\n\n**Pipeline is READY to present when:**\n- ✅ Validation path executed (validator skill or script fallback)\n- ✅ Syntax validation: PASSED\n- ✅ Security scan: No CRITICAL or HIGH issues\n- ✅ Best practices: Reviewed (warnings acceptable with explanation)\n\n**Pipeline is NOT READY when:**\n- ❌ Any syntax errors exist\n- ❌ Any CRITICAL security issues exist\n- ❌ Any HIGH security issues exist\n- ❌ Job references are broken\n- ❌ Only manual fallback was used and Critical\u002FHigh risks cannot be ruled out\n\n### When to Skip Validation\n\nOnly skip validation when:\n- Generating partial code snippets (not complete files)\n- Creating examples for documentation purposes\n- User explicitly requests to skip validation\n\n### Handling MEDIUM Severity Issues (REQUIRED OUTPUT)\n\nWhen the validator reports MEDIUM severity issues, you MUST either fix them OR explain why they're acceptable. This explanation is REQUIRED in your output.\n\n**Required format for MEDIUM issue handling:**\n```\n## Validation Issues Addressed\n\n### MEDIUM Severity Issues\n\n| Issue | Status | Explanation |\n|-------|--------|-------------|\n| [Issue code] | Fixed\u002FAcceptable | [Why it was fixed OR why it's acceptable] |\n```\n\n**Example MEDIUM issue explanations:**\n\n```\n## Validation Issues Addressed\n\n### MEDIUM Severity Issues\n\n| Issue | Status | Explanation |\n|-------|--------|-------------|\n| `image-variable-no-digest` | Acceptable | Using `python:${PYTHON_VERSION}-alpine` allows flexible version management via CI\u002FCD variables. The PYTHON_VERSION variable is controlled internally and pinned to \"3.12\". SHA digest pinning would require updating the digest with every image update, adding maintenance burden without significant security benefit for this use case. |\n| `pip-without-hashes` | Acceptable | This pipeline installs well-known packages (pytest, flake8) from PyPI. Using `--require-hashes` would require maintaining hash files for all transitive dependencies. For internal CI\u002FCD, the security trade-off is acceptable. For higher security environments, consider using a private PyPI mirror with verified packages. |\n| `git-strategy-none` | Acceptable | The `stop-staging` and `rollback-production` jobs use `GIT_STRATEGY: none` because they only run kubectl commands that don't require source code. The scripts are inline in the YAML (not from the repo), so there's no risk of executing untrusted code. |\n```\n\n**When to FIX vs ACCEPT:**\n\n| Scenario | Action |\n|----------|--------|\n| Production\u002Fhigh-security environment | FIX the issue |\n| Issue has simple fix with no downside | FIX the issue |\n| Fix adds significant complexity | ACCEPT with explanation |\n| Fix requires external changes (e.g., CI\u002FCD variables) | ACCEPT with explanation |\n| Issue is false positive for this context | ACCEPT with explanation |\n\n### Reviewing Suggestions (REQUIRED OUTPUT)\n\nWhen the validator provides suggestions, you MUST briefly acknowledge them and explain whether they should be applied.\n\n**Required format:**\n```\n## Validator Suggestions Review\n\n| Suggestion | Recommendation | Reason |\n|------------|----------------|--------|\n| [suggestion] | Apply\u002FSkip | [Why] |\n```\n\n**Example suggestions review:**\n\n```\n## Validator Suggestions Review\n\n| Suggestion | Recommendation | Reason |\n|------------|----------------|--------|\n| `missing-retry` on test jobs | Skip | Test jobs are deterministic and don't interact with external services. Retry would mask flaky tests rather than fail fast. |\n| `parallel-opportunity` for test-unit | Apply if beneficial | Could be added if pytest supports sharding. Add `parallel: 3` with `pytest --shard=${CI_NODE_INDEX}\u002F${CI_NODE_TOTAL}` if test suite is large enough to benefit. |\n| `dag-optimization` for stop-staging | Skip | This job is manual and only runs on environment cleanup. DAG optimization wouldn't provide meaningful speedup. |\n| `no-dependency-proxy` | Apply for production | Consider using `$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX` to avoid Docker Hub rate limits. Requires GitLab Premium. |\n| `environment-no-url` for rollback | Skip | Rollback jobs don't deploy new versions, so a URL would be misleading. |\n| `missing-coverage` for lint job | Skip | Linting doesn't produce coverage data. This is a false positive. |\n```\n\n### Template and Version Notes (REQUIRED OUTPUT)\n\nAfter validation results, include a concise freshness note for templates and documentation assumptions.\n\n**Required format:**\n```markdown\n## Template and Version Notes\n\n- **Template base:** [assets\u002Ftemplates\u002F\u003Cfile>.yml]\n- **Template customization scope:** [what changed from template]\n- **Version\u002Fdoc basis:** [Context7, docs.gitlab.com, or local references only]\n- **Freshness note:** [exact date checked, or \"external lookup unavailable\"]\n- **Version-sensitive assumptions:** [if any]\n```\n\n**Example:**\n```markdown\n## Template and Version Notes\n\n- **Template base:** assets\u002Ftemplates\u002Fdocker-build.yml\n- **Template customization scope:** Added unit-test stage and environment-specific deploy rules\n- **Version\u002Fdoc basis:** docs.gitlab.com include-template docs + local references\n- **Freshness note:** Verified template syntax on 2026-02-28\n- **Version-sensitive assumptions:** Uses `Jobs\u002FSAST.gitlab-ci.yml` template path\n```\n\n### Usage Instructions Template (REQUIRED OUTPUT)\n\nAfter presenting the validated pipeline, you MUST provide usage instructions. This is NOT optional.\n\n**Required format:**\n```\n## Usage Instructions\n\n### Required CI\u002FCD Variables\n\nConfigure these variables in **Settings → CI\u002FCD → Variables**:\n\n| Variable | Description | Masked | Protected |\n|----------|-------------|--------|-----------|\n| [VARIABLE_NAME] | [Description] | Yes\u002FNo | Yes\u002FNo |\n\n### Setup Steps\n\n1. [First setup step]\n2. [Second setup step]\n...\n\n### Pipeline Behavior\n\n- **On push to `develop`:** [What happens]\n- **On push to `main`:** [What happens]\n- **On tag `vX.Y.Z`:** [What happens]\n\n### Customization\n\n[Any customization notes]\n```\n\n**Example usage instructions:**\n\n```\n## Usage Instructions\n\n### Required CI\u002FCD Variables\n\nConfigure these variables in **Settings → CI\u002FCD → Variables**:\n\n| Variable | Description | Masked | Protected |\n|----------|-------------|--------|-----------|\n| `KUBE_CONTEXT` | Kubernetes cluster context name | No | Yes |\n| `KUBE_NAMESPACE_STAGING` | Staging namespace (default: staging) | No | No |\n| `KUBE_NAMESPACE_PRODUCTION` | Production namespace (default: production) | No | Yes |\n\n**Note:** `CI_REGISTRY_USER`, `CI_REGISTRY_PASSWORD`, and `CI_REGISTRY` are automatically provided by GitLab.\n\n### Kubernetes Integration Setup\n\n1. **Enable Kubernetes integration** in **Settings → Infrastructure → Kubernetes clusters**\n2. **Add your cluster** using the agent-based or certificate-based method\n3. **Create namespaces** for staging and production if they don't exist:\n   ```bash\n   kubectl create namespace staging\n   kubectl create namespace production\n   ```\n4. **Ensure deployment exists** in the target namespaces before running the pipeline\n\n### Pipeline Behavior\n\n- **On push to `develop`:** Runs tests → builds Docker image → deploys to staging automatically\n- **On push to `main`:** Runs tests → builds Docker image → manual deployment to production\n- **On tag `vX.Y.Z`:** Runs tests → builds Docker image → manual deployment to production\n\n### Customization\n\n- Update `APP_NAME` variable to match your Kubernetes deployment name\n- Modify environment URLs in `deploy-staging` and `deploy-production` jobs\n- Add Helm deployment by uncommenting the Helm jobs in the template\n```\n\n## Best Practices to Enforce\n\nReference `references\u002Fbest-practices.md` for comprehensive guidelines. Key principles:\n\n### Mandatory Standards\n\n1. **Security First:**\n   - Pin Docker images to specific versions (not :latest)\n   - Use masked variables for secrets ($CI_REGISTRY_PASSWORD should be masked)\n   - Never expose secrets in logs\n   - Validate inputs and sanitize variables\n   - Use protected variables for sensitive environments\n\n2. **Performance:**\n   - Implement caching for dependencies (ALWAYS for npm, pip, maven, etc.)\n   - Use `needs` keyword for DAG optimization (ALWAYS when jobs have dependencies)\n   - Set artifact expiration to avoid storage bloat (ALWAYS set `expire_in`)\n   - Use `parallel` execution *when applicable* (only if test framework supports sharding)\n   - Minimize unnecessary artifact passing (use `artifacts: false` in `needs` when not needed)\n\n3. **Reliability:**\n   - **Set explicit `timeout` for ALL jobs** (prevents hanging jobs, typically 10-30 minutes)\n     - Even when using `default` or `extends` for timeout inheritance, add explicit `timeout` to each job\n     - This improves readability and avoids validator warnings about missing timeout\n     - Example: A job using `.deploy-template` should still have `timeout: 15 minutes` explicitly set\n   - Add retry logic for flaky operations (network calls, external API interactions)\n   - Use `allow_failure` appropriately for non-critical jobs (linting, optional scans)\n   - Use `resource_group` for deployment jobs (prevents concurrent deployments)\n   - Add `interruptible: true` for test jobs (allows cancellation when new commits push)\n\n4. **Naming:**\n   - Job names: Descriptive, kebab-case (e.g., \"build-application\", \"test-unit\")\n   - Stage names: Short, clear (e.g., \"build\", \"test\", \"deploy\")\n   - Variable names: UPPER_SNAKE_CASE for environment variables\n   - Environment names: lowercase (e.g., \"production\", \"staging\")\n\n5. **Configuration Organization:**\n   - Use `extends` for reusable configuration (PREFERRED over YAML anchors for GitLab CI)\n   - Use `include` for modular pipeline files (organize large pipelines into multiple files)\n   - Use `rules` instead of deprecated only\u002Fexcept (ALWAYS)\n   - Define `default` settings for common configurations (image, timeout, cache, tags)\n   - Use YAML anchors *only when necessary* for complex repeated structures within a single file\n     - Note: `extends` is preferred because it provides better visualization in GitLab UI\n\n6. **Error Handling:**\n   - Set appropriate timeout values (ALWAYS - prevents hanging jobs)\n   - Configure retry behavior for flaky operations (network calls, external APIs)\n   - Use `allow_failure: true` for non-blocking jobs (linting, optional scans)\n   - Add cleanup steps with `after_script` *when needed* (e.g., stopping test containers, cleanup)\n   - Implement notification mechanisms *when required* (e.g., Slack integration for deployment failures)\n\n## Resources\n\n### References (Tiered Loading)\n\n- `references\u002Fbest-practices.md` (**Tier 1: required for all**) - Comprehensive GitLab CI\u002FCD best practices\n  - Security patterns, performance optimization\n  - Pipeline design, configuration organization\n  - Common patterns and anti-patterns\n  - **Use this:** When implementing any GitLab CI\u002FCD resource\n\n- `references\u002Fcommon-patterns.md` (**Tier 1: required for all**) - Frequently used pipeline patterns\n  - Basic CI pipeline patterns\n  - Docker build and push patterns\n  - Deployment patterns (K8s, cloud platforms)\n  - Multi-project and parent-child patterns\n  - **Use this:** When selecting which pattern to use\n\n- `references\u002Fgitlab-ci-reference.md` (**Tier 2: required for Full mode**) - GitLab CI\u002FCD YAML syntax reference\n  - Complete keyword reference\n  - Job configuration options\n  - Rules and conditional execution\n  - Variables and environments\n  - **Use this:** For syntax and keyword details\n\n- `references\u002Fsecurity-guidelines.md` (**Tier 2: required for Full mode**) - Security best practices\n  - Secrets management\n  - Image security\n  - Script security\n  - Artifact security\n  - **Use this:** For security-sensitive configurations\n\n### Assets (Templates to Customize)\n\n- `assets\u002Ftemplates\u002Fbasic-pipeline.yml` - Complete basic pipeline template\n- `assets\u002Ftemplates\u002Fdocker-build.yml` - Docker build pipeline template\n- `assets\u002Ftemplates\u002Fkubernetes-deploy.yml` - Kubernetes deployment template\n- `assets\u002Ftemplates\u002Fmulti-project.yml` - Multi-project orchestration template\n\n**How to use templates:**\n1. Copy the relevant template structure\n2. Replace all `[PLACEHOLDERS]` with actual values\n3. Customize logic based on user requirements\n4. Remove unnecessary sections\n5. Validate the result\n\n## Typical Workflow Example\n\n**User request:** \"Create a CI\u002FCD pipeline for a Node.js app with testing and Docker deployment\"\n\n**Process:**\n1. ✅ Understand requirements:\n   - Node.js application\n   - Run tests (unit, lint)\n   - Build Docker image\n   - Deploy to container registry\n   - Trigger on push and merge requests\n\n2. ✅ Reference resources:\n   - Check `references\u002Fbest-practices.md` for pipeline structure\n   - Check `references\u002Fcommon-patterns.md` for Node.js + Docker pattern\n   - Use `assets\u002Ftemplates\u002Fdocker-build.yml` as base\n\n3. ✅ Generate pipeline:\n   - Define stages (build, test, dockerize, deploy)\n   - Create build job with caching\n   - Create test jobs (unit, lint) with needs optimization\n   - Create Docker build job\n   - Add proper artifact management\n   - Pin Docker images to versions\n   - Include proper secrets handling\n\n4. ✅ Validate:\n   - Invoke `devops-skills:gitlab-ci-validator` skill\n   - Fix any reported issues\n   - Re-validate if needed\n\n5. ✅ Present to user:\n   - Show validated pipeline\n   - Explain key sections\n   - Provide usage instructions\n   - Mention successful validation\n\n## Common Pipeline Patterns\n\n### Basic Three-Stage Pipeline\n```yaml\nstages:\n  - build\n  - test\n  - deploy\n\nbuild-job:\n  stage: build\n  script: make build\n\ntest-job:\n  stage: test\n  script: make test\n\ndeploy-job:\n  stage: deploy\n  script: make deploy\n  when: manual\n```\n\n### DAG Pipeline with Needs\n```yaml\nstages:\n  - build\n  - test\n  - deploy\n\nbuild-frontend:\n  stage: build\n  script: npm run build:frontend\n\nbuild-backend:\n  stage: build\n  script: npm run build:backend\n\ntest-frontend:\n  stage: test\n  needs: [build-frontend]\n  script: npm test:frontend\n\ntest-backend:\n  stage: test\n  needs: [build-backend]\n  script: npm test:backend\n\ndeploy:\n  stage: deploy\n  needs: [test-frontend, test-backend]\n  script: make deploy\n```\n\n### Conditional Execution with Rules\n```yaml\ndeploy-staging:\n  script: deploy staging\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"develop\"\n      when: always\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n      when: manual\n\ndeploy-production:\n  script: deploy production\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n      when: manual\n    - when: never\n```\n\n### Matrix Parallel Jobs\n```yaml\ntest:\n  parallel:\n    matrix:\n      - NODE_VERSION: ['18', '20', '22']\n        OS: ['ubuntu', 'alpine']\n  image: node:${NODE_VERSION}-${OS}\n  script:\n    - npm test\n```\n\n## Error Messages and Troubleshooting\n\n### If devops-skills:gitlab-ci-validator reports errors:\n\n1. **Syntax errors:** Fix YAML formatting, indentation, or structure\n2. **Job reference errors:** Ensure referenced jobs exist in needs\u002Fdependencies\n3. **Stage errors:** Verify all job stages are defined in stages list\n4. **Rule errors:** Check rules syntax and variable references\n5. **Security warnings:** Address hardcoded secrets and image pinning\n\n### If GitLab documentation is not found:\n\n1. Try Context7 first: `mcp__context7__resolve-library-id` -> `mcp__context7__query-docs`\n2. If needed, run `web.search_query` scoped to `docs.gitlab.com`\n3. Open specific pages with `web.open` and extract only required syntax\u002Fvariables\n4. If offline, continue with local references and add version-assumption notes\n\n---\n\n## PRE-DELIVERY CHECKLIST\n\n**MANDATORY:** Before presenting ANY generated pipeline to the user, verify ALL items:\n\n### Mode and References\n- [ ] Complexity mode selected (`Targeted`, `Lightweight`, or `Full`)\n- [ ] For **Targeted** mode: only directly relevant files\u002Freferences loaded\n- [ ] For **Lightweight\u002FFull** modes: read `references\u002Fbest-practices.md` before generating\n- [ ] For **Lightweight\u002FFull** modes: read `references\u002Fcommon-patterns.md` before generating\n- [ ] For **Lightweight\u002FFull** modes: read appropriate template from `assets\u002Ftemplates\u002F` for the pipeline type\n- [ ] For **Full** mode: read `references\u002Fgitlab-ci-reference.md`\n- [ ] For **Full** mode: read `references\u002Fsecurity-guidelines.md`\n- [ ] **Output explicit confirmation statement** for Lightweight\u002FFull modes\n\n### Generation Standards Applied\n- [ ] All Docker images pinned to specific versions (no `:latest`)\n- [ ] All jobs have explicit `timeout` (10-30 minutes typically)\n- [ ] `default` block includes `timeout` if defined\n- [ ] Hidden templates (`.template-name`) include `timeout`\n- [ ] Caching configured for dependency installation\n- [ ] `needs` keyword used for DAG optimization where appropriate\n- [ ] `rules` used (not deprecated `only`\u002F`except`)\n- [ ] `resource_group` configured for deployment jobs\n- [ ] Artifacts have `expire_in` set\n- [ ] Secrets use masked CI\u002FCD variables (not hardcoded)\n\n### Validation Completed\n- [ ] Validation executed via `devops-skills:gitlab-ci-validator` or script fallback\n- [ ] Zero CRITICAL issues\n- [ ] Zero HIGH issues\n- [ ] **MEDIUM issues addressed** (fixed OR explained in output using required format)\n- [ ] **LOW issues acknowledged** (listed in output)\n- [ ] **Suggestions reviewed** (using required format)\n- [ ] Re-validated after any fixes\n- [ ] If only manual fallback was available: output marked as not fully verified\n\n### Presentation Ready\n- [ ] Validation status stated clearly\n- [ ] Validation path stated clearly (skill, script fallback, or manual fallback)\n- [ ] **MEDIUM\u002FLOW issues explained** (with table format)\n- [ ] **Suggestions review provided** (with table format)\n- [ ] **Template and version notes provided** (with required format)\n- [ ] **Usage instructions provided** (with required sections)\n- [ ] Key sections explained\n\n**If any checkbox is unchecked, DO NOT present the pipeline. Complete the missing steps first.**\n\n### Required Output Sections\n\nUse the smallest valid output profile for the selected mode.\n\n**Full mode (complete\u002Fcomplex pipeline):**\n1. **Reference Analysis Complete** (from Step 3)\n2. **Generated Pipeline** (the `.gitlab-ci.yml` content)\n3. **Validation Results Summary** (pass\u002Ffail status)\n4. **Validation Issues Addressed** (MEDIUM issues table)\n5. **Validator Suggestions Review** (suggestions table)\n6. **Template and Version Notes** (template base + freshness\u002Fversion assumptions)\n7. **Usage Instructions** (variables, setup, behavior)\n\n**Lightweight mode (complete\u002Fsimple pipeline):**\n1. **Reference Analysis Complete (Lightweight)**\n2. **Generated Pipeline**\n3. **Validation Results Summary**\n4. **Template and Version Notes**\n5. **Usage Instructions**\n- Add **Validation Issues Addressed** only when MEDIUM issues exist.\n- Add **Validator Suggestions Review** only when suggestions are present.\n\n**Targeted mode (review\u002FQ&A\u002Fsnippet\u002Ffocused fix):**\n- Provide only the directly requested artifact\u002Fanswer and a concise rationale.\n- Include validation\u002Ffallback disclosure if validation was not run.\n- Do not force full pipeline-generation sections.\n\n## Done Criteria\n\nThis skill execution is done when:\n- Simple requests use **Lightweight mode** without unnecessary Tier 2 loading.\n- Complex requests use **Full mode** with Tier 2 references and complete confirmation.\n- Validation enforces strict Critical\u002FHigh gates before production-ready claims.\n- Output includes template\u002Fversion freshness notes plus usage instructions.\n- Any fallback path is explicit and does not hide verification gaps.\n\n---\n\n## Summary\n\nAlways follow this sequence when generating GitLab CI\u002FCD pipelines:\n\n1. **Classify Complexity** - choose `Targeted`, `Lightweight`, or `Full` mode.\n2. **Load References** - use tiered loading:\n   - For `Targeted` mode, load only directly relevant files.\n   - For `Lightweight\u002FFull` modes, load:\n     - `references\u002Fbest-practices.md`\n     - `references\u002Fcommon-patterns.md`\n     - Plus the appropriate template from `assets\u002Ftemplates\u002F`\n   - For `Full` mode, also load:\n     - `references\u002Fgitlab-ci-reference.md`\n     - `references\u002Fsecurity-guidelines.md`\n3. **Confirm** - Output targeted response or Lightweight\u002FFull reference analysis as required by mode.\n4. **Generate** - Use templates and follow standards (security, caching, naming, explicit timeout on ALL jobs).\n5. **Lookup Docs When Needed** - Context7 first, then `web.search_query`\u002F`web.open`, with offline fallback notes when constrained.\n6. **Validate** - Use `devops-skills:gitlab-ci-validator`, script fallback if needed.\n7. **Fix** - Resolve all Critical\u002FHigh issues, address Medium issues.\n8. **Verify Checklist** - Confirm all pre-delivery checklist items.\n9. **Present** - Deliver output with validation summary, template\u002Fversion notes, and usage instructions.\n\nGenerate GitLab CI\u002FCD pipelines that are:\n- ✅ Secure with pinned images and proper secrets handling\n- ✅ Following current best practices and conventions\n- ✅ Using proper configuration organization (extends, includes)\n- ✅ Optimized for performance (caching, needs, DAG)\n- ✅ Properly documented with usage instructions\n- ✅ Validated with zero Critical\u002FHigh issues\n- ✅ Production-ready and maintainable\n",{"name":5,"description":7},"master","c73386b305dec167db7654e0e6feacb462d4f9dc","assets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator",1,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code","https:\u002F\u002Fgithub.com\u002FAntifragileTech","2026-10-02 14:22:14",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add AntifragileTech\u002Fantifragile-claude-code --skill gitlab-ci-generator",{"tool":46,"command":47},"bunx","bunx skills add AntifragileTech\u002Fantifragile-claude-code --skill gitlab-ci-generator",{"tool":49,"command":50},"pnpm","pnpm dlx skills add AntifragileTech\u002Fantifragile-claude-code --skill gitlab-ci-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002FSKILL.md",true,[54,60,66,70,74,78,84,88,92,96],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},".gitignore","OTHER","其他",107,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002F.gitignore",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"assets\u002Ftemplates\u002Fbasic-pipeline.yml","ASSET","资产文件",7860,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Fassets\u002Ftemplates\u002Fbasic-pipeline.yml",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"assets\u002Ftemplates\u002Fdocker-build.yml",8763,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Fassets\u002Ftemplates\u002Fdocker-build.yml",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"assets\u002Ftemplates\u002Fkubernetes-deploy.yml",11088,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Fassets\u002Ftemplates\u002Fkubernetes-deploy.yml",{"path":75,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":76,"sourceHtmlUrl":77},"assets\u002Ftemplates\u002Fmulti-project.yml",8393,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Fassets\u002Ftemplates\u002Fmulti-project.yml",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fbest-practices.md","REFERENCE","参考文档",17359,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Freferences\u002Fbest-practices.md",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fcommon-patterns.md",20125,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Freferences\u002Fcommon-patterns.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fgitlab-ci-reference.md",18295,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Freferences\u002Fgitlab-ci-reference.md",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fsecurity-guidelines.md",15914,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Freferences\u002Fsecurity-guidelines.md",{"path":97,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":100,"sourceHtmlUrl":101},"tests\u002Ftest_skill_contract.py","SCRIPT","脚本",4613,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdevops\u002Fgitlab-ci-generator\u002Ftests\u002Ftest_skill_contract.py",[103,116,129,142,155,168],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":28},"01M6DT9Q6VYA615SCXR757TZZ7","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-skills\u002FSKILL.md",[],[110,111,112,113,114,115],"writing skills","writing","use","editing","work","deployment",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":28},"01M6DT9GFHDNY90P41WGAE1TV0","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-plans\u002FSKILL.md",[],[123,124,111,125,126,112,127,128],"plans","writing plans","requirements","task","code","spec",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":28},"01M6DT9C6PFGD86WS3HY7YE3XG","docs:write-concisely","Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwrite-concisely\u002FSKILL.md",[],[136,137,138,139,140,141,111],"docs:write concisely","write","docs","read","Rules","documentation",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":28},"01M6DT98AWQ27P0N1CG97WAG66","kaizen:why","Iterative Five Whys root cause analysis drilling from symptoms to fundamentals","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwhy\u002FSKILL.md",[],[144,149,150,151,152,153,154],"why","kaizen","issue","five whys","analysis","root cause analysis",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":28},"01M6DT93EH25NAX19R3WGE1P53","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-loop\u002FSKILL.md",[],[162,163,164,165,127,166,167],"verification loop","verification","loop","sessions","claude code sessions","system",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":28},"01M6DT90GW7Z7VCN98P9DVYSNC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-before-completion\u002FSKILL.md",[],[175,163,176,114,112,177,178,179],"verification before completion","commands","evidence","claim","complete"]