yaml-linting
Files
SKILL.mdagentsreferencesscripts
Install
Install the containing plugin
/plugin install ci-cd@llm-skills
Invoke this skill after installation
/ci-cd:yaml-linting
This skill is bundled inside ci-cd. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-ci-dev.
SKILL.md
name: yaml-linting description: > Lint YAML files using yamllint in a Docker container. Validate YAML syntax, style, and configuration without installing yamllint locally.
YAML Linting
Validate YAML files for syntax errors and style violations using yamllint in Docker. This skill provides a containerized approach to linting YAML files without requiring local tool installation.
Intent Router
Load reference files for depth on specific topics:
| Topic | File | Load when... |
|---|---|---|
| Setup & Installation | references/install-and-setup.md | Getting started with Docker and yamllint |
| Quick Reference | references/quick-reference.md | Need common flags and commands |
| Configuration | references/configuration.md | Customizing linting rules |
| Troubleshooting | references/troubleshooting.md | Debugging linting errors |
Quick Start
Basic Linting Workflow
- Lint a single file — Use Docker to run yamllint on a specific file
- Lint a directory — Recursively lint all YAML files in a directory
- Apply custom rules — Create a
.yamllintconfig file in the project root
Common Commands
# Lint a single file
docker run --rm -v "$(pwd):/data" pipelinecomponents/yamllint yamllint /data/file.yml
# Lint entire directory
docker run --rm -v "$(pwd):/data" pipelinecomponents/yamllint yamllint /data
# Lint with specific format (JSON, parsable)
docker run --rm -v "$(pwd):/data" pipelinecomponents/yamllint yamllint -f parsable /data
# Lint with custom config
docker run --rm -v "$(pwd):/data" pipelinecomponents/yamllint yamllint -c /data/.yamllint /data
Configuration
yamllint automatically detects .yamllint.yml or .yamllint config files in the mounted directory.
Common rules include:
line-length: Maximum line length (default 80)indentation: Indentation style (spaces, tabs)truthy: Enforce explicittrue/falseinstead ofyes/no
For detailed config options, load the Configuration reference.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | No errors found |
| 1 | Linting errors detected |
| 2 | Invalid configuration or unreadable files |
# Troubleshoot: run with parsable output to locate exact line/column of errors
docker run --rm -v "$(pwd):/data" pipelinecomponents/yamllint \
yamllint -f parsable /data/file.yml
Related References
- Load Quick Reference for command flags and common patterns
- Load Configuration to customize linting rules and extend yamllint
- Load Troubleshooting when linting fails or produces unexpected results