Complete YAML & Frontmatter Guide
YAML (YAML Ain't Markup Language) is a human-friendly data format that represents structured key-value settings, lists, and nested objects using clean 2-space indentation instead of JSON's curly braces and trailing commas. Every valid YAML document compiles directly into standard JSON/object data that software and AI agents read automatically.
Powers Docker Compose, GitHub Actions CI workflows, Kubernetes manifests, OpenAPI specs, and application settings where clean comments and readability matter.
Placed between --- lines at line 1 of SKILL.md or Markdown docs to declare structured metadata (name, description, tags) while the body stays Markdown.
Open any .yaml file in /app for a live Structured Tree preview, instant syntax error checking, 1-click Format YAML, and Copy as JSON.
Contains ONLY YAML data (keys, lists, nested objects). Lines starting with # are treated as comments, NOT Markdown headings.
Starts with a --- ... --- YAML header at line 1, followed by regular Markdown (# Heading, links, tables). Must use a .md extension to render as rich Markdown + a Properties card.
1.Key-Value Pairs & Scalars
config.yamlapp_name: Readme Studio version: 2.1 max_files: 30 public_mode: true deprecated: false custom_banner: null
2.Quoting & Special Characters
settings.yaml# Double quotes allow escape sequences (\n, \") title: "Readme: Fast Markdown Studio" trigger: "Use when the user asks to audit a SKILL.md file." # Keep version strings & codes from becoming numbers/booleans version_tag: "1.0" country_code: "NO" # Single quotes keep backslashes literal windows_path: 'C:\Users\dev\skills'
C:\Users\dev\skills3.Lists (Arrays / Sequences)
config.yaml# Block style (most readable for multi-item lists) supported_formats: - markdown - yaml - json - csv # Inline flow style (great for short lists) diagram_exports: ["png", "svg", "jpg", "webp"]
4.Nested Objects & Lists of Objects
server.yamlserver:
domain: readme.scribenovo.com
tls: true
limits:
max_files: 30
session_ttl_hours: 24
endpoints:
- path: /mcp
method: POST
auth: optional
- path: /app
method: GET
auth: none5.Multiline Strings (| vs >)
pipeline.yaml# Literal block (|) keeps every newline exactly as typed build_commands: | cd frontend npx tsc --noEmit npm test # Folded block (>) joins wrapped lines into one paragraph summary: > Audits multi-file agent skills for broken references, token budgets, and frontmatter compliance.
cd frontend npx tsc --noEmit npm test
Audits multi-file agent skills for broken references, token budgets, and frontmatter compliance.
6.Comments, Anchors & Aliases (& / *)
deploy.yaml# Shared defaults anchored with &default_env defaults: &default_env timeout_sec: 15 retries: 3 staging: <<: *default_env host: staging.scribenovo.com production: <<: *default_env host: readme.scribenovo.com
7.Real-World Example: GitHub Actions (.yml)
.github/workflows/ci.ymlname: Verify Build
on:
push:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Frontend Tests
working-directory: ./frontend
run: |
npm ci
npx tsc --noEmit
npm test8.YAML Frontmatter Inside Markdown (.md / SKILL.md)
SKILL.md (must be .md!)--- name: deploy-pipeline description: "Guides safe production deployments to Vercel and Render. Use when the user asks to deploy, configure DNS, or verify release health. Do NOT use for local UI styling." --- # Deploy Pipeline Follow [Pre-Flight Checks](workflows/preflight.md) before shipping.
Follow Pre-Flight Checks before shipping.
9.Common YAML Pitfalls & Validation Rules
troubleshooting.yaml# BAD: unquoted colon inside value breaks parsing # summary: Step 1: Install deps # GOOD: wrap value in double quotes summary: "Step 1: Install deps" # BAD: mixing tabs with spaces causes a syntax error # GOOD: always use 2 spaces per indentation level retries: 3 node_version: "22.0"
: in quotes."22.0" so it doesn't become float 22..yaml; Markdown + frontmatter uses .md.