yaml-linting
Files
SKILL.mdagentsreferencesscripts
Install
Install only this skill with npx skills
npx skills add alisonaquinas/llm-ci-dev --skill 'yaml-linting' -g -y
Install the containing skill bundle
/plugin install ci-cd@llm-skills
This skill is bundled inside ci-cd. Use
npx skills when you only want this skill, or install the bundle once to make every included skill available through the plugin marketplace flow. Browse the full skill bundle repository at github.com/alisonaquinas/llm-ci-dev.Invoke
Invoke this skill after installation
/ci-cd:yaml-linting
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