A skill for detecting and fixing malformed YAML syntax in configuration files, particularly SKILL.md frontmatter
This skill helps you identify and fix malformed YAML syntax, particularly in SKILL.md files and other configuration files with YAML frontmatter. It detects common issues like unclosed brackets, invalid characters, incorrect indentation, and other syntax errors.
When a user provides YAML content that may be malformed:
1. **Parse and Validate**
- Attempt to parse the YAML frontmatter
- Identify specific syntax errors (unclosed brackets, quotes, invalid indentation, etc.)
- Note the line number where errors occur
2. **Diagnose Issues**
- Check for common problems:
- Unclosed brackets `[`, `]`, `{`, `}`
- Unclosed quotes `"` or `'`
- Incorrect indentation (YAML requires 2-space indentation)
- Invalid characters or escape sequences
- Missing colons after keys
- Improper list formatting
3. **Provide Corrected Version**
- Fix all identified syntax errors
- Ensure proper YAML structure with `---` delimiters
- Validate required fields are present (name, description, version, etc.)
- Ensure values are properly quoted if they contain special characters
4. **Explain the Fix**
- Point out what was wrong
- Explain why the correction works
- Provide tips to avoid similar issues
**Input:**
```yaml
---
name: [invalid yaml with unclosed bracket
description: This YAML is malformed
---
```
**Output:**
```yaml
---
name: "Valid YAML Skill Name"
description: "This YAML is now properly formatted"
version: "1.0.0"
runtimes:
- claude-code
category: development
tags:
- example
---
```
**Explanation:**
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/yaml-syntax-validator/raw