mcpField
Y
yaml-validator

yaml-validator

github.com/d-o-hubTesting & quality1335 installsUpdated today
Repository

About yaml-validator

yaml-validator is a skill for checking YAML syntax, structure, and schema compliance. It also outlines common errors and project configuration practices for developers working with YAML files.

Key features

  1. 01Syntax, structure, and schema checks
  2. 02yamllint command examples
  3. 03Common YAML issue guidance
  4. 04Project .yamllint.yml settings
  5. 05GitHub Actions checklist

Use cases

  1. 01Check YAML files before committing
  2. 02Troubleshoot indentation and duplicate keys
  3. 03Set project-level yamllint rules

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill yaml-validator

After installing, type/yaml-validatorin Claude Code to confirm it loaded.

Details

From the project README

YAML Validator

Validate YAML files for syntax, structure, and schema compliance.

Common Issues

IssueFix
Mixed tabs/spacesConvert to 2-space indentation
Missing colonAdd : after key
Special chars unquotedQuote strings with :, {, }, [, ]
Duplicate keysRemove or merge
Boolean-looking stringsQuote yes, no, on, off
Trailing spacesRemove with sed -i 's/[[:space:]]*$//'

Validation Commands

# Install yamllint
pip install yamllint

# Validate single file
yamllint file.yml

# Check all YAML files
yamllint .

# Python fallback
python3 -c "import yaml; yaml.safe_load(open('file.yml'))"

Project .yamllint Config

Create .yamllint.yml in project root with 2-space indentation, 120 line length max, enable trailing-spaces and key-duplicates rules.

GitHub Actions Checklist

  • Valid on: trigger (push, pull_request, schedule)
  • Correct runs-on value (ubuntu-latest, macos-latest)
  • Proper steps: list structure
  • Modern action versions (v3/v4, not v1/v2)

Best Practices

DO
  • Use 2 spaces for indentation
  • Quote strings with special characters
  • Validate before committing
  • Keep lines under 120 characters
  • End files with newline
DON'T
  • Use tabs for indentation
  • Leave trailing spaces
  • Use duplicate keys
  • Mix YAML 1.1 and 1.2 features

Comments

Markdown supported