gitlab-yamllint-reference-tags

Configure yamllint to allow GitLab CI custom tags like !reference.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/cajias/claude-skills --skill gitlab-yamllint-reference-tags
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gitlab-yamllint-reference-tags
Source: https://github.com/cajias/claude-skills/tree/main/skills/gitlab-yamllint-reference-tags
Command: npx skills add https://github.com/cajias/claude-skills --skill gitlab-yamllint-reference-tags

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you resolve yamllint failures on GitLab CI files when valid GitLab-specific YAML tags like !reference are flagged as errors. It is useful when pre-commit hooks, local linting, or CI validation disagree with GitLab's own parser.

Core Features & Use Cases

  • GitLab CI Compatibility: Configure yamllint to accept GitLab custom tags without breaking valid pipelines.
  • Pre-commit and CI Fixes: Update linting setup so repositories stop rejecting correct .gitlab-ci.yml syntax.
  • Practical Example: If a pipeline job uses shared script references and yamllint reports an unknown tag, this Skill shows how to adjust lint rules or apply targeted overrides.

Quick Start

Ask the assistant to fix my yamllint configuration so GitLab CI files using !reference tags validate correctly.

Frequently Asked Questions about gitlab-yamllint-reference-tags

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does yamllint fail on GitLab CI files using !reference tags?

Yamllint fails on GitLab CI files because it does not recognize GitLab-specific custom YAML tags like !reference as valid syntax, flagging them as errors during local lint checks or pre-commit hooks despite GitLab's parser accepting them.

How do I configure yamllint to allow custom tags in .gitlab-ci.yml?

You can configure yamllint to allow custom tags by applying custom tag allowlisting or targeted rule overrides, ensuring GitLab-specific syntax like !reference passes linting without triggering false errors in your pre-commit setup.

Can I use this to fix yamllint pre-commit hook failures for GitLab pipelines?

Yes, this applies directly to pre-commit hook failures by updating your linting configuration so that repositories stop rejecting correct .gitlab-ci.yml syntax used in valid GitLab CI pipelines.

What is the best way to validate .gitlab-ci.yml locally without false yamllint errors?

The best way to validate .gitlab-ci.yml locally without false errors is to adjust your yamllint rules with custom tag allowlisting, aligning local lint checks and CI validation with GitLab's own parser behavior.

Does yamllint support GitLab CI custom tags out of the box?

No, yamllint does not support GitLab CI custom tags out of the box. It requires custom tag allowlisting or specific rule overrides to prevent it from rejecting valid GitLab-specific YAML syntax.